[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-2658) s:defaultAction only works 1 submit

Damian Harvey (JIRA) jira-events at lists.jboss.org
Tue Jan 27 06:30:44 EST 2009


    [ https://jira.jboss.org/jira/browse/JBSEAM-2658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12449832#action_12449832 ] 

Damian Harvey commented on JBSEAM-2658:
---------------------------------------

I have this problem only on Firefox and only when you reRender (via ajax4jsf) the button/link that has the defaultAction. And then only when you reRender the form as well as the elements within it.

Safari = OK
Chrome = OK
IE7 = OK
Firefox 3.0.5 (Mac) = ERROR
Firefox 3.0.1 (Win Vista) = ERROR

Here's a small example (the page scoped backing Bean - testBean - just outputs to system out) :
<s:div id="testDiv">
  <h:form>
    <h:inputText size="20" value="#{testBean.name}"/>
    <a:commandButton id="testButton"
      value="Test Default Action"
      action="#{testBean.hello}"
      status="testStatus"
      reRender="testDiv">
      <s:defaultAction/>
    </a:commandButton>
    <a:status id="testStatus">
      <f:facet name="start">
        <h:outputText value="Processing..."/>
      </f:facet>
    </a:status>
  </h:form>
</s:div>

Note that if you move the testDiv inside the form then it works fine.

> s:defaultAction only works 1 submit
> -----------------------------------
>
>                 Key: JBSEAM-2658
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-2658
>             Project: Seam
>          Issue Type: Bug
>          Components: JSF Controls
>    Affects Versions: 2.0.1.GA
>         Environment: JBoss 4.2.2, RichFaces 3.1.4, Firefox 2.0.0.12, Windows XP
>            Reporter: Susanne Jarl
>            Assignee: Pete Muir
>             Fix For: 2.0.2.CR1, 2.1.0.BETA1
>
>
> 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:form>
> <s:validateAll>
> <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" />
> </s:decorate> 
> <a4j:commandButton action="#{handin.handin}" value="#{messages['generic.button.ok']}" reRender="pollForProgrammingResult, pinCodePanel, feedbackPanel">
> <s:defaultAction/>
> </a4j:commandButton>
> <s:button value="#{messages['generic.button.cancel']}" onclick="Richfaces.hideModalPanel('programModalPanel')"/>
> </h:panelGrid>
> </s:validateAll>
> </h:form> 
> I have this form in a RichFaces modal panel.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list