2 Replies Latest reply on Mar 10, 2010 3:03 PM by alanhay

    Formatting <rich:inputNumberSpinner/>


      I have some spinners being used to select hours and minutes and would like to format the output to be in the DecimalFormat "00".


      I have attached a converter so that the output is displayed in the correct format when the form loads, viz. 8 is initialised to "08". However when the Spinner value is changed, the output in the textfield is no longer output in the correct format. I would kind of expect this to be the case and would assume that that I need to add some client side JS to catch events and format the output accordingly.


      I would expect this to be relatively straightforward but while I can detect the event and call some JS function,  I cannot work out how I get a handle on the text field and the value when an event fires.


      Anyone help?





                           <rich:inputNumberSpinner id="runStartMinuteSpinner"
                              minValue="0" maxValue="59" inputSize="1"
                              inputStyle="text-align:right;" style="padding-left:2px;"
                              enableManualInput="false" step="10">
                              <f:convertNumber pattern="00" />


      Message was edited by: Alan Hay