You need to sign in to do that
Don't have an account?
Karthik@TMC
VisualForce Remoting
Hi,
My Controller code is
@RemoteAction
global static void getAttachment(List<String> IdList1){
system.debug('IdList--'+IdList1);
//IdList.addAll(IdList1);
List<Attachment> atList = [Select Id,Name,ParentId from Attachment where Id IN: IDList1];
//attList.addAll(atList);
}
how do i invoke this method from js.
Thanks in advance
Use <apex:param> between <apex:actionFunction> tags.
Regards,
Magulan D
Salesforce.com certified Force.com Developer.
SFDC Blog
If this post is your solution, kindly mark this as the solution.
All Answers
http://infallibletechie.blogspot.in/2012/10/calling-controller-method-using.html
Check the above link.
Regards,
Magulan D
Salesforce.com certified Force.com Developer.
SFDC Blog
If this post is your solution, kindly mark this as the solution.
Hi Magulan,
I need to pass values from JS Method to Controller , so how would i accomplish this through action function..
Thanks for the quick Reply
http://infallibletechie.blogspot.in/2012/10/calling-controller-method-using.html
Check this link
Regards,
Magulan D
Salesforce.com certified Force.com Developer.
SFDC Blog
If this post is your solution, kindly mark this as the solution.
Use <apex:param> between <apex:actionFunction> tags.
Regards,
Magulan D
Salesforce.com certified Force.com Developer.
SFDC Blog
If this post is your solution, kindly mark this as the solution.
The variables are local to JS Method. so, i cant use Param as it uses controller variables.
Any suggestions how to resolve?
Hi,
I had the same problem than you. Here is the way I did to pass value from JS to controller using apex:actionFunction, apex:param and JS.
Apex controller, then VF page
Did you read the Visualforce Remoting documentation?
var ids = [];
MyController.getAttachment(ids, function(e,r) { ... });
http://www.salesforce.com/us/developer/docs/pages/Content/pages_js_remoting_example.htm