2 Replies Latest reply on Nov 18, 2007 12:17 PM by wporzo

    Seam Security & Richfaces (a4j) form problem

    wporzo

      Hello.

      My application uses Seam 2.0 and RichFaces 3.2.0-SNAPSHOT

      I've got simple login form:

      <h:form>
       <rich:messages id="messages" globalOnly="true"/>
       <h:panelGrid columns="2">
       <h:outputText value="#{msg['login.username']}" />
       <h:inputText value="#{identity.username}" required="true" />
       <h:outputText value="#{msg['login.password']}" />
       <h:inputSecret value="#{identity.password}" required="true" />
       <a4j:status>
       <f:facet name="start">
       <h:graphicImage value="/images/ajax/ajax_process.gif"/>
       </f:facet>
       </a4j:status>
       <a4j:commandButton type="submit" value="#{msg['login.logIn']}" action="#{identity.login}"/>
       </h:panelGrid>
      </h:form>


      And it works almost fine ;)
      When I press button.. request is made and if login and password are good there is a redirect to other page. If provided data are incorrect proper message will be shown (without page refresh). This is functionality that satisfied me in 100%.

      Problem occurs when I want to submit form without clicking on button but by pushing enter button in username or password inputText component. If username and password are wrong, message is shown. But if they are OK, there is no redirection to other page and a4j:status component is in "In progress" state. User is logged in.. but what I want to achieve is the same functionality as in button case (redirection to other page)

      Best regards !
      Michal