2 Replies Latest reply on Nov 12, 2008 4:01 AM by Ilya Shaikovsky

    Problem when user reloads page

    diet ice Newbie

      Hi! I'm kind of new to Ajax4JSF and I ran into a little problem earlier.

      I have some components in my page that depend on the value of other components. For example, suppose I have a Country select list. If the user selects United States, then the Zip Code input text should be enabled; otherwise, it should remain disabled, including when no country is selected.

      This is working fine with Ajax4JSF.

      The problem is when the user hits the reload button on the browser.

      When the user first enters the page, the default value for the Country select list is blank (no country selected), so, the Zip Code input text is disabled.

      If the user selects United States, the Zip Code is correctly enabled. But if the users reloads the page, United States is still selected, but the Zip Code is now disabled.

      I debugged the method that controls that. When the user reloads the page, the value of the Country select list is NOT United States. It must be setting the sometime after that (I don't know when). So, since it is not the US, it disables the Zip Code input text.

      Any suggestions on how should I proceed?

      Thanks in advance!

      PS: I'm using Ajax4JSF only, no RichFaces. I posted on the Ajax4JSF Users forum, but someone told me to post here.