Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void apply(FaceletContext ctxObj, UIComponent parent)
- throws IOException {
- FaceletContextImplBase ctx = (FaceletContextImplBase) ctxObj;
- FacesContext facesContext=ctx.getFacesContext();
- String highlight=facesContext.getExternalContext().
- getRequestParameterMap().get("highlight");
- if(!Boolean.parseBoolean(highlight)) {
- ctx.extendClient(this);
- boolean found = false;
- try {
- found = ctx.includeDefinition(parent, this.name);
- } finally {
- ctx.popClient(this);
- }
- if (!found) {
- this.nextHandler.apply(ctx, parent);
- }
- } else {
- HtmlOutputText text=new HtmlOutputText();
- text.setValue(this.name);
- text.setStyle("color:red;font-weight:bold;background:white;border:1px dashed red;text-align:center;display:block;margin-left:auto;margin-right:auto;");
- parent.getChildren().add(text);
- }
- }
Add Comment
Please, Sign In to add comment