3 Replies Latest reply on Jan 27, 2009 12:39 PM by Damian Harvey

    s:defaultAction only works 1 time

    Susanne Jarl Newbie

      I use the s:defaultAction and it works the first time i hit enter, but if the inputtextfield is not validated and/or I get an error message, and then hit enter in the inputtextfield again it does not work. But if I click the submitbutton instead the second time it works. So there is a difference between clicking the button and hit enter the second time.

      This is my code:

      <h:panelGrid columns="2">
      <h:outputLabel value="#{messages['programkey.writePin']}:" for="pinCode" title="#{messages['handin.pinCode.title']}" />
      <s:decorate for="pinCode">
      <h:inputSecret id="pinCode" label="#{messages['programkey.writePin']}" value="#{agentHandler.pinCode}" size="4" required="true" />
      <h:message for="pinCode" styleClass="errorMessage" />
      <a4j:commandButton action="#{handin.handin}" value="#{messages['generic.button.ok']}" reRender="pollForProgrammingResult, pinCodePanel, feedbackPanel">
      <s:button value="#{messages['generic.button.cancel']}" onclick="Richfaces.hideModalPanel('programModalPanel')"/>

      I have this form in a RichFaces (version 3.1.4) modal panel.

      Seam version: 2.0.1 GA

      Here is a link to this topic in the old forum

      Question is: Is this a bug that you will resolve or can I not use it with the a4j:commandButton or is there some other problem with my code?