1

I have a requirement where I need to display the header and footer based upon the value in the URL parameters. Everything works fine. But the URL params are lost after JSF validations. This happens only when I click submit. Works fine for the ajax validations.

          <h:panelGrid columns="1" id="lnamePanel">
          <h:inputText tabindex="1" maxlength="50"  id="lastName"  value="#{registrationBean.last_name}" required="true" requiredMessage="Last Name is a required field"  validatorMessage="Not a valid last name">
          <f:validateRegex pattern="^[A-Za-z-_.\s]{2,50}$"/>
          <f:ajax event="blur" render="lnamePanel" />
          </h:inputText>
          <h:message for="lastName" display="text" style="color:red;"/>
          </h:panelGrid>



          <h:commandButton value="Submit" actionListener="#{registrationBean.handleSubmit}" ajax="true"/>

How do I retain the url parameters after JSF validation? In this case, I cannot manipulate the URL inside the backing bean as the backing bean method is not getting called.

Any help would be appreciated.

Real Chembil
  • 261
  • 2
  • 7
  • 23
  • possible duplicate of [CommandButton performs action and redirect](http://stackoverflow.com/questions/17734230/commandbutton-performs-action-and-redirect) – BalusC Aug 30 '13 at 14:04
  • @BalusC In my case,the backing bean method is not getting called. The URL parameters are getting cleared after JSF validation errors. The issue is somewhat similar to this stackoverflow.com/questions/6885887/… .I tried with the latest JSF implementation, same issue – Real Chembil Sep 02 '13 at 15:32
  • I have the problem that my url parameter is cleared after a ajax update. Do you know how to fix it ? – Z3RP Jan 09 '19 at 08:46

0 Answers0