You need to sign in to do that
Don't have an account?

List value getting reset
Hi,
Scenario 1:
--------------------
I am using a Wrapper class to prepare a List<Wrapper> in ctrlr using action function.
When the action function gets invoked, I am able to prepare the List<Wrapper>.
I have declared the List<Wrapper>. as Controller variable.
Scenario 2:
----------------
Upon another ui action(say on click of radio button), am invoking another action function.
In the controller,when I tried to access the List<Wrapper> prepared earlier, I am getting null.
The constructor doesnot get invoked between scenario1 and scenario 2.
Could any one please help me.
Remove that and you are ready to go.
[Static & Transient variables are not saved in the viewstate and hence are get lost after a http invocation]
Thanks for your immediate reply Avi.
Am not using any static or transient key word.
Iam using this list in an <apex :repeat>
In the <apex:repeat> am displaying a radio button group.
on click of a radio button am calling another action function(say A()).
In the method A() am trying to use the updated list(i.e trying to get the radio button selected value).
But am getting an empty list..
Apart from that I tried to declare a string variable in ctrlr and
I have initialised it in prepareAnnualSectionWrapper().
I tried to debug the string in displaySectionQues().
Here am getting the string as null..
Hi,
I am unable to find out, from where you are calling the first actionFunction.
I f you want to access the list prepared from calling the first actionFunction then you have to make sure that the action associated with the earlier actionFunction should neccessarilly be called before accessing the wrapper list.
The constructor will be called prior to any method, so you must intantiate the annualWrapperList in the constructor.
If you want to make sure that annualWrapperList is populated before you access it from the "displaySectionQues()" method then try calling "prepareAnnualSectionWrapper()" method from the constructor or define it in action attribute of the page.
Important :
Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other's benefit.