0 Replies Latest reply on Jun 28, 2011 1:29 PM by Junior Joseph

    InputNumberSpinner in ExtendedDataTable events not catched

    Junior Joseph Newbie

      Hi to the community,

       

      I am new in Richfaces and I have a problem:

       

      Infact, I have an extendedDataTable which has InputNumberSpinner as component. The problem is that I can not reach the InputNumberSpinner's events for me to launch a calculation. The first InputNumberSpinner is for quantity the second for the unit cost and I want to calculate the total cost directly. Here is the code:

      <a4j:outputPanel id="deliveryItemsPanel">

       

                          <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">

       

                              <tr>

                                  <td width="100%" align="left" colspan="7">

       

                                      <fieldset class="fieldSetStyle" id="DeliveryItems">

                                          <legend>

                                              <h:outputText value="#{messages['estock.detail.tabpanel.items.title']}"/>

                                          </legend>

       

                                          <rich:extendedDataTable

                                              id="DeliveryItemListDataTable"

                                              rendered="true"

                                              rows="25"

                                              var="deliveryItem"

                                              rowKeyVar="row"

                                              width="100%"

                                              height="250px"

                                              value="#{deliveryListPanel.deliveryDialog.deliveryItems}"

                                              selection="#{deliveryListPanel.deliveryDialog.selection}"

                                              rowClasses="row-style-impair, row-style-pair"

                                              cellpadding="0"

                                              selectionMode="multi"

                                              selectedClass="row-style-selected"

                                              noDataLabel="#{messages['deliveryitemlist.datalist.nodata']}"

                                              reRender="colItemPC,colItemCommandedQuantity,colItemAlreadyDeliveredQuantity">

       

                                              <rich:column id="colItemNum" width="5%">

                                                  <f:facet name="header">

                                                      <h:panelGroup>

                                                          <h:outputText value="#{messages['estock.deliveryitem.list.colitem.number.title']}"/>

                                                      </h:panelGroup>

                                                  </f:facet>

                                                  <h:outputText value="row" />

                                              </rich:column>   

       

                                              <rich:column id="colItemPC" width="25%" selfSorted="true">

                                                  <f:facet name="header">

                                                      <h:panelGroup>

                                                          <h:outputText value="#{messages['estock.deliveryitem.list.colitem.productconditionment.title']}"/>

                                                      </h:panelGroup>

                                                  </f:facet>

                                                  <h:outputText value="#{deliveryItem.productConditionment.product.designation} [#{deliveryItem.productConditionment.conditionment.designation}(#{deliveryItem.productConditionment.quantity})]" />

                                              </rich:column>                       

       

                                              <rich:column id="colItemCommandedQuantity" width="15%" selfSorted="true">

                                                  <f:facet name="header">

                                                      <h:panelGroup>

                                                          <h:outputText value="#{messages['estock.deliveryitem.list.colitem.Commandedquantity.title']}"/>

                                                      </h:panelGroup>

                                                  </f:facet>

                                                  <h:outputText value="#{deliveryItem.commandQuantity}" />

                                              </rich:column>

       

                                              <rich:column id="colItemAlreadyDeliveredQuantity" width="15%">

                                                  <f:facet name="header">

                                                      <h:panelGroup>

                                                          <h:outputText value="#{messages['estock.deliveryitem.list.colitem.AlreadyDeliveredquantity.title']}"/>

                                                      </h:panelGroup>

                                                  </f:facet>

                                                  <h:outputText value="#{deliveryItem.commandAlreadyDeliveredQuantity}" />

                                              </rich:column>

       

                                              <rich:column id="colItemDeliveringQuantity" width="15%">

                                                  <f:facet name="header">

                                                      <h:panelGroup>

                                                          <h:outputText value="#{messages['estock.deliveryitem.list.colitem.Deliveringquantity.title']}"/>

                                                      </h:panelGroup>

                                                  </f:facet>

                                                  <h:panelGroup>

                                                       <rich:inputNumberSpinner id="txtDeliveringQuantity" value="#{deliveryItem.deliveringQuantity}" minValue="0" style="width = 100%" step="1" enableManualInput="true" maxValue ="999999999"/>

                                                       <a4j:support event="onchange" render = "colItemProductTotalCost" action = "#{deliveryDialog.totalCostItemsListener}" ajaxSingle="true"/>

                                                  </h:panelGroup>

                                              </rich:column>

       

                                              <rich:column id="colItemUnitCost" width="15%">

                                                  <f:facet name="header">

                                                      <h:panelGroup>

                                                          <h:outputText value="#{messages['estock.deliveryitem.list.colitem.Cost.title']}"/>

                                                      </h:panelGroup>

                                                  </f:facet>

                                                  <h:panelGroup>

                                                      <rich:inputNumberSpinner id="txtDeliveryCost" value="#{deliveryItem.cost}" minValue="0" style="width = 100%" step="1" enableManualInput="true" maxValue ="999999999" onchange="alert()"/>

                                                      <a4j:support event="onchange" render = "colItemProductTotalCost" action = "#{deliveryDialog.totalCostItemsListener}" ajaxSingle="true"/>

                                                  </h:panelGroup>

                                              </rich:column>

       

                                              <rich:column id="colItemProductTotalCost" width="15%">

                                                  <f:facet name="header">

                                                      <h:panelGroup>

                                                          <h:outputText value="#{messages['estock.deliveryitem.list.colitem.total.Cost.title']}"/>

                                                      </h:panelGroup>

                                                  </f:facet>

                                                  <h:outputText value="#{deliveryItem.cost*deliveryItem.deliveringQuantity}"/>

                                              </rich:column>

       

                                              <f:facet name="footer">

                                                  <rich:datascroller pageIndexVar="pageIndex" pagesVar="allPages">

                                                      <f:facet name="pages">

                                                          <h:outputText value="#{pageIndex}/#{allPages}" />

                                                      </f:facet>

                                                  </rich:datascroller>

                                              </f:facet>

       

                                          </rich:extendedDataTable>

       

                                      </fieldset>

       

                                  </td>

       

                              </tr>

       

                          </table>

       

                      </a4j:outputPanel>

       

                      </rich:tab>

       

      Can Some one help me by telling why InputNumberSpinner events are not catched?