public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException, ELException { ctx.extendClient(this); boolean found = false; try { found = ctx.includeDefinition(parent, this.name); } finally { ctx.popClient(this); } if (!found) { this.nextHandler.apply(ctx, parent); } }
protected void applyNextHandler(FaceletContext ctx, UIComponent c) throws IOException, FacesException, ELException { // first allow c to get populated this.nextHandler.apply(ctx, c); } }
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 apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException, ELException { String path = this.src.getValue(ctx); VariableMapper orig = ctx.getVariableMapper(); ctx.setVariableMapper(new VariableMapperWrapper(orig)); try { this.nextHandler.apply(ctx, null); ctx.includeFacelet(parent, path); } finally { ctx.setVariableMapper(orig); } } }
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 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); } }
/** * If the id TagAttribute was specified, get it's value, otherwise generate * a unique id from our tagId. * * @see TagAttribute#getValue(FaceletContext) * @param ctx * FaceletContext to use * @return what should be a unique Id */ protected String getId(FaceletContext ctx) { if (this.id != null) { return this.id.getValue(ctx); } return ctx.generateUniqueId(this.tagId); }
public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException, ELException { this.next.apply(ctx, parent); ctx.getFacesContext().getExternalContext().getRequestMap().put("facelets.Encoding", this.encoding); }
/** * Returns a new DateTimeConverter * * @see DateTimeConverter * @see com.sun.facelets.tag.jsf.ConvertHandler#createConverter(com.sun.facelets.FaceletContext) */ protected Converter createConverter(FaceletContext ctx) throws FacesException, ELException, FaceletException { return ctx.getFacesContext().getApplication().createConverter(DateTimeConverter.CONVERTER_ID); }
public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException, ELException { FunctionMapper orig = ctx.getFunctionMapper(); ctx.setFunctionMapper(new CompositeFunctionMapper(this, orig)); try { next.apply(ctx, parent); } finally { ctx.setFunctionMapper(orig); } }
public UserConverterHandlerFactory(String converterId, Class type) { this.converterId = converterId; this.type = type; try { this.constructor = this.type.getConstructor(CONS_SIG); } catch (Exception e) { throw new FaceletException( "Must have a Constructor that takes in a ConverterConfig", e); } }
public void writeState(FacesContext context) throws IOException { if (handledByFacelets(context.getViewRoot().getViewId())) { // Tell the StateWriter that we're about to write state StateWriter.getCurrentInstance().writingState(); // Write the STATE_KEY out. Unfortunately, this will // be wasteful for pure server-side state managers where nothing // is actually written into the output, but this cannot // programatically be discovered context.getResponseWriter().write(STATE_KEY); } else { this.parent.writeState(context); } }
/** * Returns a new NumberConverter * * @see NumberConverter * @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(NumberConverter.CONVERTER_ID); }
public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException, ELException { for (int i = 0; i < len; i++) { this.children[i].apply(ctx, parent); } }
public UserValidatorHandlerFactory(String validatorId, Class type) { this.validatorId = validatorId; this.type = type; try { this.constructor = this.type.getConstructor(CONS_SIG); } catch (Exception e) { throw new FaceletException( "Must have a Constructor that takes in a ConverterConfig", e); } }
public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException, ELException { this.nextHandler.apply(ctx, parent); }
/** * @param handlerType */ public UserComponentHandlerFactory(String componentType, String renderType, Class type) { this.componentType = componentType; this.renderType = renderType; this.type = type; try { this.constructor = this.type.getConstructor(CONS_SIG); } catch (Exception e) { throw new FaceletException( "Must have a Constructor that takes in a ComponentConfig", e); } }
public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException, ELException { this.nextHandler.apply(ctx, parent); }
public void applyDefinition(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException, ELException { this.nextHandler.apply(ctx, parent); }
public boolean apply(FaceletContext ctx, UIComponent parent, String name) throws IOException, FacesException, FaceletException, ELException { if (this.name == name || this.name != null && this.name.equals(name)) { this.nextHandler.apply(ctx, parent); return true; } return false; } }