private final String getVarStatusName(FaceletContext ctx) { if (this.varStatus != null) { return this.varStatus.getValue(ctx); } return null; }
public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException, ELException { String varStr = this.var.getValue(ctx); ValueExpression veObj = this.value.getValueExpression(ctx, Object.class); ctx.getVariableMapper().setVariable(varStr, veObj); } }
private final String getVarName(FaceletContext ctx) { if (this.var != null) { return this.var.getValue(ctx); } return null; }
public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException, ELException { String nameStr = this.name.getValue(ctx); ValueExpression valueVE = this.value.getValueExpression(ctx, Object.class); ctx.getVariableMapper().setVariable(nameStr, valueVE); }
public void apply(FaceletContext faceletContext, UIComponent parent) throws IOException, FacesException, ELException { String name = basename.getValue(faceletContext); BundleMapWrapper map = new BundleMapWrapper(name); FacesContext facesContext = faceletContext.getFacesContext(); // TODO find a better way facesContext.getExternalContext(). getSessionMap().put(var.getValue(faceletContext), map); //getRequestMap().put(var.getValue(faceletContext), map); } }
protected void onComponentCreated(FaceletContext faceletContext, UIComponent wizard, UIComponent parent) { if (outcomeAttribute != null) { if (outcomeAttribute.isLiteral()) { wizard.getAttributes().put("outcome", outcomeAttribute.getValue(faceletContext)); } else { ValueExpression expression = outcomeAttribute.getValueExpression(faceletContext, String.class); ELAdaptor.setExpression(wizard, "outcome", expression); } } super.onComponentCreated(faceletContext, wizard, parent); }
/** * Uses the specified "validatorId" to get a new Validator instance from the * Application. * * @see javax.faces.application.Application#createValidator(java.lang.String) * @see com.sun.facelets.tag.jsf.ValidateHandler#createValidator(com.sun.facelets.FaceletContext) */ protected Validator createValidator(FaceletContext ctx) { return ctx.getFacesContext().getApplication().createValidator( this.validatorId.getValue(ctx)); }
public void applyMetadata(FaceletContext ctx, Object instance) { if (attribute.isLiteral()) { ((Position) instance).setTop(Measure.parse(attribute.getValue())); } else { ValueExpression expression = attribute.getValueExpression(ctx, Object.class); ELAdaptor.setExpression((UIComponent) instance, Attributes.TOP, expression); } } }
/** * Uses the specified "converterId" to pull an instance from the Application * * @see javax.faces.application.Application#createComponent(java.lang.String) * @see com.sun.facelets.tag.jsf.ConverterHandler#createConverter(com.sun.facelets.FaceletContext) */ protected Converter createConverter(FaceletContext ctx) throws FacesException, ELException, FaceletException { return ctx.getFacesContext().getApplication().createConverter( this.converterId.getValue(ctx)); }
public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException, ELException { try { this.nextHandler.apply(ctx, parent); } catch (Exception e) { if (this.var != null) { ctx.setAttribute(this.var.getValue(ctx), e); } } }
public void applyMetadata(FaceletContext ctx, Object instance) { UIFlowLayout gridLayout = (UIFlowLayout) instance; gridLayout.setMarginLeft(Measure.valueOf(attribute.getValue())); } }
public void applyMetadata(FaceletContext ctx, Object instance) { UIFlowLayout gridLayout = (UIFlowLayout) instance; gridLayout.setMarginTop(Measure.valueOf(attribute.getValue())); } }
public void applyMetadata(FaceletContext ctx, Object instance) { UIFlowLayout gridLayout = (UIFlowLayout) instance; gridLayout.setMargin(Measure.valueOf(attribute.getValue())); } }
public void applyMetadata(FaceletContext ctx, Object instance) { UIGridLayout gridLayout = (UIGridLayout) instance; gridLayout.setMarginTop(Measure.valueOf(attribute.getValue())); } }
public void applyMetadata(FaceletContext ctx, Object instance) { UIGridLayout gridLayout = (UIGridLayout) instance; gridLayout.setMarginRight(Measure.valueOf(attribute.getValue())); } }
public void applyMetadata(FaceletContext ctx, Object instance) { UIGridLayout gridLayout = (UIGridLayout) instance; gridLayout.setMarginBottom(Measure.valueOf(attribute.getValue())); } }
public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, ELException { boolean b = this.test.getBoolean(ctx); if (this.var != null) { ctx.setAttribute(var.getValue(ctx), new Boolean(b)); } if (b) { this.nextHandler.apply(ctx, parent); } }
/** * @param config */ public DefineHandler(TagConfig config) { super(config); TagAttribute attr = this.getRequiredAttribute("name"); if (!attr.isLiteral()) { throw new TagAttributeException(this.tag, attr, "Must be Literal"); } this.name = attr.getValue(); }
@Override protected Validator createValidator(FaceletContext ctx) { StellaIEValidator validator = new StellaIEValidator(); validator.setEstadoComponentId(estadoId.getValue()); if (formatted != null) { validator.setFormatted(formatted.getBoolean(ctx)); } else { validator.setFormatted(false); } return validator; }
@Override protected Validator createValidator(FaceletContext ctx) { StellaIEValidator validator = new StellaIEValidator(); validator.setEstadoComponentId(estadoId.getValue()); if (formatted != null) { validator.setFormatted(formatted.getBoolean(ctx)); } else { validator.setFormatted(false); } return validator; }