[richfaces-issues] [JBoss JIRA] Closed: (RF-2750) a4j:commandButton and t:selectItems conflicts
Soul Spirit (JIRA)
jira-events at lists.jboss.org
Tue Mar 25 09:47:40 EDT 2008
[ http://jira.jboss.com/jira/browse/RF-2750?page=all ]
Soul Spirit closed RF-2750.
---------------------------
Resolution: Rejected
Not a bug.
The bug were in application code.
> a4j:commandButton and t:selectItems conflicts
> ---------------------------------------------
>
> Key: RF-2750
> URL: http://jira.jboss.com/jira/browse/RF-2750
> Project: RichFaces
> Issue Type: Bug
> Affects Versions: 3.1.4
> Environment: jdk 1.5.0_12, myfaces-1.1, tomhawk-1.1.6
> Reporter: Soul Spirit
>
> Having a t:selectItems tag in a form, prevents a4j:commandButton from working properly: the action specified is not executed, and no errors are generated.
> Switching to f:selectItems solves the problem
> In this real example the action #{employee.update} defined by the a4j:commandButton "saveCommand" is never called if the t:selectItems within the h:selectOneMenu "variationType" is present;
> <h:form id="employeesForm">
> <h:panelGrid columns="2">
> <h:outputText value="#{msg.organic_cdc_name}"/>
> <h:selectOneMenu id="cdc" value="#{organic.selectedCdcCode}" >
> <f:selectItem itemValue=""/>
> <t:selectItems value="#{organic.cdcs}" var="el" itemLabel="#{el.ucDescription}, #{el.description}" itemValue="#{el.code}"/>
> <a4j:support event="onblur" reRender="employees" eventsQueue="q1" ignoreDupResponses="true"/>
> </h:selectOneMenu>
> </h:panelGrid>
> <table width="0">
> <tr>
> <td valign="top">
> <rich:panel id="employees" header="#{msg.organic_employees_title}">
> <f:verbatim><script type="text/javascript">var rowId = 0</script></f:verbatim>
> <rich:dataTable rowKeyVar="rowId" var="employee" value="#{organic.employees}" id="employeesTable" rows="3">
> <f:facet name="header">
> <rich:columnGroup>
> <h:column><h:outputText value="#{msg.organic_employee_code}"/></h:column>
> <h:column><h:outputText value="#{msg.organic_employee_name}"/></h:column>
> <h:column><h:outputText value="#{msg.organic_employee_type}"/></h:column>
> <h:column><h:outputText value="#{msg.organic_employee_variation}"/></h:column>
> <h:column><h:outputText value="#{msg.organic_notes}"/></h:column>
> <h:column><h:outputText value="#{msg.commons_actions}"/></h:column>
> </rich:columnGroup>
> </f:facet>
> <h:column>
> <h:outputText id="code" value="#{employee.code}"/>
> </h:column>
> <h:column>
> <h:outputText value="#{employee.name}"/>
> </h:column>
> <h:column>
> <h:outputText value="#{employee.type}"/>
> </h:column>
> <h:column>
> <h:selectOneMenu id="variationType" value="#{employee.variationType}" onchange="$('employeesForm:employeesTable:#{rowId}:saveCommand').show();">
> <f:selectItem itemValue=""/>
> <t:selectItems value="#{employee.variationTypeList}" var="vt" itemLabel="#{vt.description}" itemValue="#{vt.code}"/>
> </h:selectOneMenu>
> </h:column>
> <h:column>
> <h:inputText id="notes" value="#{employee.variationNotes}" onchange="$('employeesForm:employeesTable:#{rowId}:saveCommand').show();"/>
> </h:column>
> <h:column>
> <a4j:commandButton id="saveCommand" action="#{employee.update}" value="#{msg.commons_save}" oncomplete="$('employeesForm:employeesTable:#{rowId}:saveCommand').hide();"/>
> <f:verbatim>
> <script type="text/javascript">
> $('employeesForm:employeesTable:' + rowId++ + ':saveCommand').hide();
> </script>
> </f:verbatim>
> </h:column>
> </rich:dataTable>
> <rich:datascroller for="employeesTable"/>
> </rich:panel>
> </td>
> </tr>
> </table>
> </h:form>
--
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