[richfaces-issues] [JBoss JIRA] Created: (RF-3033) a4j:support - oncomplete handle js-code incorrect

Andreas Höhmann (JIRA) jira-events at lists.jboss.org
Fri Apr 11 04:39:55 EDT 2008


a4j:support - oncomplete handle js-code incorrect
-------------------------------------------------

                 Key: RF-3033
                 URL: http://jira.jboss.com/jira/browse/RF-3033
             Project: RichFaces
          Issue Type: Bug
    Affects Versions: 3.2.0
         Environment: myfaces 1.2.2
jdk 1.5
tomcat 6.0.14
            Reporter: Andreas Höhmann


I have a selectbox with 5 options: 1..4 numbers and -1 as a "special value" :)
If the user select the special value i want open a dialog ... here is my code:

    <h:selectOneMenu id="quantity" value="#{bean.quantity}" styleClass="addToBasketAmount">
        <c:forEach begin="1" end="3" var="i">
          <f:selectItem itemValue="#{i * quantity}"/>
        </c:forEach>
        <f:selectItem itemValue="#{bean.userQuantity}"/>
        <f:selectItem itemValue="-1" itemLabel="[enter]" />
        <a4j:support event="onchange"
                                oncomplete="if(this.value == -1){Richfaces.showModalPanel('orderQuantityDialog')}" />
    </h:selectOneMenu>

The dialog will not open ... but ... if i change the code to this:

    <h:selectOneMenu id="quantity" value="#{bean.quantity}" styleClass="addToBasketAmount">
        <c:forEach begin="1" end="3" var="i">
          <f:selectItem itemValue="#{i * quantity}"/>
        </c:forEach>
        <f:selectItem itemValue="#{bean.userQuantity}"/>
        <f:selectItem itemValue="-1" itemLabel="[enter]" />
        <a4j:support event="onchange"
                                oncomplete="alert(this.value);if(this.value == -1){Richfaces.showModalPanel('orderQuantityDialog')}" />
    </h:selectOneMenu>

a alertbox is shown (-1) and then the dialog is shown.

is this a bug?

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

       




More information about the richfaces-issues mailing list