6 Replies Latest reply on Jan 18, 2011 4:10 AM by Sarwo Edi Wibowo

    Maximum decimal input text in richfaces

    Sarwo Edi Wibowo Newbie

      Hallo All,


      Please help me. I have a problem with decimal. I need to check it for maximum length is 4 digit with coma in the middle. And 4 digit is maximum value. So suppose I insert 4444 in my input text, it will be automatically convert into 44.44 .So data that will store in database is 44.44. And if I insert 44444, it will change to 44.44. If I input 44447, it will be converted into 44.45.


      I tried use this way


      <h:inputText id="gradePoint"

                                                                            value="#{myBean.gradePoint}" size="5" maxlength="5"

                                                                            readonly="#{myFormAction.formMode == 'VIEW'}">

                                                                            <f:convertNumber maxFractionDigits="2" groupingUsed="false" pattern="#.##"/>

                                                                            <a4j:support event="onblur" reRender="gradePoint" />



      but still not working


      Please help me guys. I really need your hand