+ Start a Discussion
Rahul SharmaRahul Sharma 

Displaying the list retrieved by remote function to a Page block table

Hi Board,

 

What i'm trying to do is to create a List of wrapper class in JS remote method and display it to page.

I'm passing multiple values from JS to Remote function as a parameter.

I have the list to be displayed in remote function, but the problem is i'm not able to store this list in any property( which is get set) so that i could display this to Page.

Even if i assign the created list to a property i get the value as null.

That might be due to the Remote method executes in a seperate instance.

Please point me some direction. 

 

Thanks for your time.

Best Answer chosen by Admin (Salesforce Developers) 
Rahul SharmaRahul Sharma

Hi Shailesh P.,

My issue was that, I was calling a apex remote method from JS and in the apex method i was generating a list.

Now issue was i wanted to store this list to a controller property. But as its a static method, it was displaying a null value in that list (Controller Property). That might due to the fact that remote/Static method have seperate call/Instance.

But thanks for your reply.

Finally its been resolved with use of apex:actionFunction.

 

All Answers

Richa KRicha K

Hi Rahul,

 

Please elaborate some more. Some technical expossure. 

 

Rahul SharmaRahul Sharma

Hi Shailesh P.,

My issue was that, I was calling a apex remote method from JS and in the apex method i was generating a list.

Now issue was i wanted to store this list to a controller property. But as its a static method, it was displaying a null value in that list (Controller Property). That might due to the fact that remote/Static method have seperate call/Instance.

But thanks for your reply.

Finally its been resolved with use of apex:actionFunction.

 

This was selected as the best answer