[richfaces-issues] [JBoss JIRA] Assigned: (RF-3033) a4j:support - oncomplete handle js-code incorrect
Aleksej Yanul (JIRA)
jira-events at lists.jboss.org
Tue May 13 09:43:27 EDT 2008
[ http://jira.jboss.com/jira/browse/RF-3033?page=all ]
Aleksej Yanul reassigned RF-3033:
---------------------------------
Assignee: Aleksej Yanul (was: Tsikhon Kuprevich)
> 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
> Assigned To: Aleksej Yanul
> Fix For: 3.2.1
>
>
> 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