JSF: Hide input when typing in the text box -
i want hide first 6 characters of ssn when user types in text box. *--1234 there built in tag can achieve this. in advance.
the "built in" components of standard jsf implementation represents standard html elements. functional requirement not covered of html elements, standard jsf implementation won't have well. closest 1 html <input type="password"> provided jsf <h:inputsecret> component, mask all characters instead of specified subset.
also no 3rd party jsf component libraries comes mind able this. have 2 options, easy 1 , harder one.
split ssn on 2 input fields. 1
<h:inputsecret>, 1<h:inputtext>. add if necessaryonkeyupjavascript helper code auto-tabs next field when 6 characters entered. in server side glue 2 parts together.use
<h:inputhidden>value , normal<input type="text">onkeydownjavascript helper code fills hidden input , returns masked character visible input first 6 characters.
Comments
Post a Comment