Guest User

Untitled

a guest
Feb 20th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.01 KB | None | 0 0
  1.  public void apply(FaceletContext ctxObj, UIComponent parent)
  2.             throws IOException {
  3.         FaceletContextImplBase ctx = (FaceletContextImplBase) ctxObj;
  4.         FacesContext facesContext=ctx.getFacesContext();
  5.         String highlight=facesContext.getExternalContext().
  6.     getRequestParameterMap().get("highlight");
  7.         if(!Boolean.parseBoolean(highlight)) {
  8.             ctx.extendClient(this);
  9.             boolean found = false;
  10.             try {
  11.                 found = ctx.includeDefinition(parent, this.name);
  12.             } finally {
  13.                 ctx.popClient(this);
  14.             }
  15.             if (!found) {
  16.                 this.nextHandler.apply(ctx, parent);
  17.             }
  18.         } else {
  19.            
  20.             HtmlOutputText text=new HtmlOutputText();
  21.             text.setValue(this.name);
  22.             text.setStyle("color:red;font-weight:bold;background:white;border:1px dashed red;text-align:center;display:block;margin-left:auto;margin-right:auto;");
  23.             parent.getChildren().add(text);
  24.            
  25.         }
  26.     }
Add Comment
Please, Sign In to add comment