Win a copy of Securing DevOps this week in the Security forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can we add restrictions to input text control in JSF  RSS feed

 
Ranch Hand
Posts: 121
Chrome Eclipse IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

JSF inputtext control will allow alphanumeric values, if we dont want numbers to be entered into text box, we can restrict using javascript.
but is there any way to restrict user from entering numbers into text box?
 
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may like to use a4j onkeyup/onblur event and do customized validations.
 
Bartender
Posts: 19217
85
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't quite understand this, but you can use the same javascript to block entry of non-numeric characters into a JSF inputText control as you would in a traditional HTML 'input type="text"' control. Even the event attribute name is the same (I think it's onkeyup).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!