2 Replies Latest reply on Feb 6, 2012 1:57 PM by kamal_khadka

    how to rewrite user input in h:inputText

    kamal_khadka Newbie

      I have the following in my code


      <h:inputText value=#{entityCustomer.phone}/>


      user enters their 10 digit phone number. Phone number can be (1234567890). I want the phone number stored as 123-456-7890 in the data source.


      Right now customer can enter either 1234567890 or 123-456-7890. So If the customer enters the number like 1234567890 then it should be saved as 123-456-7890 is this possible.



      How should I go about doing this?


      Thank you