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.

  1. split ssn on 2 input fields. 1 <h:inputsecret> , 1 <h:inputtext>. add if necessary onkeyup javascript helper code auto-tabs next field when 6 characters entered. in server side glue 2 parts together.

  2. use <h:inputhidden> value , normal <input type="text"> onkeydown javascript helper code fills hidden input , returns masked character visible input first 6 characters.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -