You need to sign in to do that
Don't have an account?
Sibasish Panigrahi
Re-render issue (JS wipes off and also doesn't display data from controller)
I have a vf page where i'm fetching data from controller.
I face issue when i click on a button and the panel get refreshed. After refresh i sometime get's the data on vf page from controller and sometimes not, but in debug i always get the required data in controller. If my data doesn't show up, i refresh the whole page 2-3 times and then again click the button and the required data get's displayed. But after 1-2 times it again fails to do the same and i have to repeat the procedure again.
It's wierd and also i'm not getting how to solve it and also unable to get the root cause.
Thanks.
I face issue when i click on a button and the panel get refreshed. After refresh i sometime get's the data on vf page from controller and sometimes not, but in debug i always get the required data in controller. If my data doesn't show up, i refresh the whole page 2-3 times and then again click the button and the required data get's displayed. But after 1-2 times it again fails to do the same and i have to repeat the procedure again.
It's wierd and also i'm not getting how to solve it and also unable to get the root cause.
Thanks.
Can you please share your code
Below is the partial code of that particular panel which gives this wierd bug.
The {!replyTo} and {!replyCc} is getting displayed sometime and sometime it shows empty, even though the value of those to variables are coming in controller in debug.
Thanks.
Cannot get fully idea without seeing the full code. I guess when you click on a button you may call js function and then you call an action function.
inside the action function mention the particular output panel Id which you need to refresh inside the "reRender" attribute.
Sorry for the trouble, but the whole code is more than 2k lines and i don't have the auth to show the code too.
You are right, when we click a button, it calls a JS function and then action function is called. I checked it and the panel Id is correct in "reRender" attribute. And also it also works sometimes, displaying the desired output in that particular panel.
Issue is we aren't sure why it's not working always and why just sometime even though we are getting the value of that particular variable in the controller funtion {!activeReply} all the time when it's executed on call action function.
Hope this gives a bit clear idea of what the actual issue is.
Thanks.
Ok.. I guess your page get post back when you click on button. Just try to call the js function by adding 'return flase'. then it is avoiding the fully page reload.
onclick="getWrp('sendCc');return false;"
regards
I tried with "return false;" but still the issue continues.
Thanks.
Did you mean that it is not rerender the panel when you click a button which is inside the panel or the button is belongs to other panel?
Is 'sendPanel' not renderring totally or it is rendering but not refreshing?
Here is a sample code which I created by your code given and it is working for me.
The button is in another pannel and you are right, 'sendPanel' is rendering but the values are not refreshing with new one's.
In constructor, the value of replyTo is given null. (replyTo is String).
Only in activeReply it's values are populated.
Whenever the code executes the replyTo values can be seen in system debug always but not in vf page always. Sometimes it shows and sometimes it doesn't.
Sorry if i'm unable to clear things well.
Thanks.
I'm sorry to say that I'm unable to find a solution without seeing the full code.
Here is my email( sampathjt@gmail.com). If you are Ok to share the VF/Apex code, please email it to me.
regards
I have mailed you. Can you please check once?
Thanks.