1 14 15 package com.sun.facelets.tag.ui; 16 17 import java.io.IOException ; 18 19 import javax.el.ELException; 20 import javax.el.ValueExpression; 21 import javax.faces.FacesException; 22 import javax.faces.component.UIComponent; 23 24 import com.sun.facelets.FaceletContext; 25 import com.sun.facelets.FaceletException; 26 import com.sun.facelets.tag.TagAttribute; 27 import com.sun.facelets.tag.TagConfig; 28 import com.sun.facelets.tag.TagHandler; 29 30 34 public class ParamHandler extends TagHandler { 35 36 private final TagAttribute name; 37 38 private final TagAttribute value; 39 40 43 public ParamHandler(TagConfig config) { 44 super(config); 45 this.name = this.getRequiredAttribute("name"); 46 this.value = this.getRequiredAttribute("value"); 47 } 48 49 55 public void apply(FaceletContext ctx, UIComponent parent) 56 throws IOException , FacesException, FaceletException, ELException { 57 String nameStr = this.name.getValue(ctx); 58 ValueExpression valueVE = this.value.getValueExpression(ctx, 59 Object .class); 60 ctx.getVariableMapper().setVariable(nameStr, valueVE); 61 } 62 63 } 64 | Popular Tags |