Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. <ui:param name="userCase" value="229501"/>
  2.  
  3. FaceletContext faceletContext = (FaceletContext) FacesContext.getAttributes().get(FaceletContext.FACELET_CONTEXT_KEY);
  4. if (faceletContext != null) {
  5. String userCase = (String) faceletContext.getAttribute("userCase");
  6. // check permission
  7. if (!hasPermission(userCase)) {
  8. // redirect
  9. NavigationHandler nh = facesContext.getApplication().getNavigationHandler();
  10. nh.handleNavigation(facesContext, null, url);
  11. facesContext.renderResponse();
  12. }
  13. }
  14.  
  15. <context-param>
  16. <param-name>javax.faces.FACELETS_BUFFER_SIZE</param-name>
  17. <param-value>65535</param-value><!-- 64KB -->
  18. </context-param>
  19.  
  20. <c:set var = "userCase" value = "229501" scope = "request" />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement