Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 39 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. <h:inputText id="username" value="#{mylogin.username}" required="true" />
  2.    
  3. <h:inputText id="username" value="some_value" required="true" />
  4.    
  5. FacesContext ctx = FacesContext.getCurrentInstance();
  6. HttpServletRequest request =
  7.       (HttpServletRequest)ctx.getExternalContext().getRequest();
  8. request.getParameter("username");
  9.    
  10. FacesContext ctx = FacesContext.getCurrentInstance();
  11. HttpServletRequest request =
  12.       (HttpServletRequest)ctx.getExternalContext().getSession(false);
  13.    
  14. <h:inputText id="username" value="#{mylogin.username}" required="true" />
  15.    
  16. <h:inputText id="username" value="some_value" required="true" />
  17.    
  18. FacesContext facesContext = FacesContext
  19.     .getCurrentInstance();
  20. ExternalContext extContext = facesContext
  21.     .getExternalContext();
  22. Map<String, String> params = extContext
  23.     .getRequestParameterMap();
  24.    
  25. <h:inputText id="username" value="some_value" required="true"
  26.     binding="#{mylogin.usernameField}" />
  27.    
  28. private UIInput usernameField;
  29.  
  30. public void setUsernameField(UIInput usernameField) {
  31.     this.usernameField = usernameField;
  32. }
  33. public UIInput getUsernameField() {
  34.     return usernameField;
  35. }
  36.    
  37. Object value = usernameField.getValue();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top