1 14 15 package com.sun.facelets.tag.jsf.core; 16 17 import java.io.IOException ; 18 import java.util.Iterator ; 19 20 import javax.el.ELException; 21 import javax.faces.component.UIComponent; 22 23 import com.sun.facelets.FaceletContext; 24 import com.sun.facelets.tag.TextHandler; 25 import com.sun.facelets.tag.jsf.ComponentConfig; 26 import com.sun.facelets.tag.jsf.ComponentHandler; 27 28 34 public final class VerbatimHandler extends ComponentHandler { 35 public VerbatimHandler(ComponentConfig config) { 36 super(config); 37 } 38 39 protected void onComponentCreated(FaceletContext ctx, UIComponent c, UIComponent parent) { 40 StringBuffer content = new StringBuffer (); 41 Iterator iter = findNextByType(TextHandler.class); 42 while (iter.hasNext()) { 43 TextHandler text = (TextHandler) iter.next(); 44 content.append(text.getText(ctx)); 45 } 46 47 c.getAttributes().put("value", content.toString()); 48 c.getAttributes().put("escape", Boolean.FALSE); 49 c.setTransient(true); 50 } 51 52 protected void applyNextHandler(FaceletContext ctx, UIComponent c) { 53 } 54 } 55 | Popular Tags |