3 Replies Latest reply on Dec 8, 2008 6:35 AM by Karl Philipp

    <rich:inputNumberSpinner> and Action Method of a CommandButt

    Karl Philipp Newbie

      I've a dialog that consists of several simple inputText elements and an inputNumberSpinner element rendered as follows (a lttle bit simplified for the forum):

      <rich:modalPanel id="spSubscriberPanel" height="300" width="400" zindex="9999" style="overflow: auto;">
       <f:facet name="header">
       <h:outputText value="Enter FLN" />
       <f:facet name="controls" />
       <a4j:include viewId="/pages/serviceProvider/addFixedlinenumbers.xhtml" />


      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       <h:panelGrid columns="2">
       <h:outputLabel for="localAreaCode" value="Local AreaCode:" />
       <h:inputText id="localAreaCode" value="#{sps.fln.localAreaCode}" />
       <h:outputLabel for="fixedLineNumber" value="Fixed Line Number:" />
       <h:inputText id="fixedLineNumber" value="#{sps.fln.fixedLineNumber}" />
       <h:outputLabel for="statusId" value="Status Id" />
       <rich:inputNumberSpinner id="statusId" minValue="1" maxValue="10" step="1" value="#{sps.fln.statusId}" />
       <a4j:commandButton value="Close" reRender="sp" action="#{sps.addFLN}">
       <rich:componentControl for="spSubscriberPanel" event="onclick" operation="hide" />
       <a4j:commandButton value="Cancel" action="#{sps.cancelSubscriberData}">
       <rich:componentControl for="spSubscriberPanel" event="onclick" operation="hide" />

      I figured out that the action method sps.addFLN (attached to the commanButton "Close") is only performed if the user has changed the value of the input field represented by the rich:inputNumberSpinner element.

      Is it possible to change this behaviour? That is, the action method sps.addFLN shall be always performed, independent of the fact that the user has NOT changed the value of rich:inputNumberSpinner field. I set aside the question, whether it makes sense (for now).

      Facelets 1.1.14 | RF 3.2.2.SR1 | Apache MyFaces 1.2 | JBoss 4.2.3.GA