-1

I have a visualforce page with a CommandLink that calls a controller method. In the controller method I set the properties in VF page(public with getters n setters). However, from the javascript in page, when I try to get those values, it is shown as not set.

user36984
  • 1
  • 1

1 Answers1

0

I am assuming that there are input fields on the VF page into which the User enters data and that you have a a JS function that is trying to access those values in the Controller. I have found that the Controller isn't updated with the input values in real time. Those values only get updated when an action is taken. My solution (which may not be be the correct method) is to have a function in my controller to touch those fields so that they get pulled into the controller. Then I have an apex:action function in the VF page to call the "toucher" method. In my JS function I call that apex:action first so the controller gets updated.

Rob Davis
  • 1,112
  • 9
  • 23