by using usage property we can show only number pad to end user.
<af:inputText label="Label 1" id="it1" usage="#{'tel'}"/>
<af:inputText label="Label 1" id="it1" usage="#{'tel'}"/>
class FreshJuice { enum FreshJuiceSize{ SMALL, MEDIUM, LARGE } FreshJuiceSize size; } public class FreshJuiceTest { public static void main(String args[]){ FreshJuice juice = new FreshJuice(); juice.size = FreshJuice.FreshJuiceSize.MEDIUM ; System.out.println("Size: " + juice.size); } }
Note: enums can be declared as their own or inside a class. Methods, variables, constructors can be defined inside enums as well.
ADFContext adfCtx = ADFContext.getCurrent();
SecurityContext secCntx = adfCtx.getSecurityContext();
String user = secCntx.getUserPrincipal().getName();
String _user = secCntx.getUserName();
#{securityContext.userName}
To displayed the logged-in user in the AMX page –
<amx:outputText value=” #{securityContext.userName}” id=”ot1″ />
To get the logged-in user in the Managed Bean –
String username = (String)AdfmfJavaUtilities.evaluateELExpression(“#{securityContext.userName}”);int x =Integer.parseInt(s); int b = Integer.parseInt("444",16);
char c=(char)i;
double d = Double.parseDouble("20");