Search This Blog

Tuesday, 16 April 2013

Simple way to convert af:inputText to upperCase,lowerCase,InitCap


Simple way to convert af:inputText to upperCase,lowerCase,InitCap

Environment (JDeveloper 11.1.2.2.0,ADF Faces)
Sometimes you need to force the user to enter upperCase or lowerCase or capitalize letters for input text component. fortunately, there is an easy way to do this by setting contentStyle of the input text.
  • To enforce the user to enter upperCase text use this style:
<af:inputText label="Label 1" id="it1" contentStyle="text-transform:uppercase;"/>
  • To enforce the user to enter lowerCase text use this style:
<af:inputText label="Label 1" id="it1" contentStyle="text-transform:lowercase;"/>
  • To enforce the user to enter InitCap text use this style:
<af:inputText label="Label 1" id="it1" contentStyle="text-tran

No comments:

Post a Comment