private DelegatingVariableMapper getDelegatingVariableMapper(FaceletContext context) { VariableMapper variableMapper = context.getVariableMapper(); if (variableMapper instanceof DelegatingVariableMapper) { return (DelegatingVariableMapper) variableMapper; } DelegatingVariableMapper delegatingVariableMapper = new DelegatingVariableMapper(variableMapper); context.setVariableMapper(delegatingVariableMapper); return delegatingVariableMapper; }
private DelegatingVariableMapper getDelegatingVariableMapper(FaceletContext context) { VariableMapper variableMapper = context.getVariableMapper(); if (variableMapper instanceof DelegatingVariableMapper) { return (DelegatingVariableMapper) variableMapper; } DelegatingVariableMapper delegatingVariableMapper = new DelegatingVariableMapper(variableMapper); context.setVariableMapper(delegatingVariableMapper); return delegatingVariableMapper; }
public void apply(FaceletContext ctx, UIComponent parent) throws IOException { String path = this.src.getValue(ctx); if (path == null || path.length() == 0) { return; } VariableMapper orig = ctx.getVariableMapper(); ctx.setVariableMapper(new VariableMapperWrapper(orig)); try { this.nextHandler.apply(ctx, null); WebConfiguration webConfig = WebConfiguration.getInstance(); if (path.startsWith(webConfig.getOptionValue(WebConfiguration.WebContextInitParameter.WebAppContractsDirectory))) { throw new TagAttributeException(this.tag, this.src, "Invalid src, contract resources cannot be accessed this way : " + path); } ctx.includeFacelet(parent, path); } catch (IOException e) { if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, e.toString(), e); } throw new TagAttributeException(this.tag, this.src, "Invalid path : " + path); } finally { ctx.setVariableMapper(orig); } } }
@Override public void apply(FaceletContext ctx, UIComponent parent) throws IOException { String path = this.src.getValue(ctx); if (path == null || path.length() == 0) { return; } VariableMapper orig = ctx.getVariableMapper(); ctx.setVariableMapper(new VariableMapperWrapper(orig)); try { this.nextHandler.apply(ctx, null); WebConfiguration webConfig = WebConfiguration.getInstance(); if (path.startsWith(webConfig.getOptionValue(WebConfiguration.WebContextInitParameter.WebAppContractsDirectory))) { throw new TagAttributeException(this.tag, this.src, "Invalid src, contract resources cannot be accessed this way : " + path); } ctx.includeFacelet(parent, path); } catch (IOException e) { if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, e.toString(), e); } throw new TagAttributeException(this.tag, this.src, "Invalid path : " + path); } finally { ctx.setVariableMapper(orig); } } }
@Override public void apply(FaceletContext ctx, UIComponent parent) throws IOException { String path = this.src.getValue(ctx); if (path == null || path.length() == 0) { return; } VariableMapper orig = ctx.getVariableMapper(); ctx.setVariableMapper(new VariableMapperWrapper(orig)); try { this.nextHandler.apply(ctx, null); WebConfiguration webConfig = WebConfiguration.getInstance(); if (path.startsWith(webConfig.getOptionValue(WebConfiguration.WebContextInitParameter.WebAppContractsDirectory))) { throw new TagAttributeException(this.tag, this.src, "Invalid src, contract resources cannot be accessed this way : " + path); } ctx.includeFacelet(parent, path); } catch (IOException e) { if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, e.toString(), e); } throw new TagAttributeException(this.tag, this.src, "Invalid path : " + path); } finally { ctx.setVariableMapper(orig); } } }
@Override public void apply(FaceletContext ctx, UIComponent parent) throws IOException { String path = this.src.getValue(ctx); if (path == null || path.length() == 0) { return; } VariableMapper orig = ctx.getVariableMapper(); ctx.setVariableMapper(new VariableMapperWrapper(orig)); try { this.nextHandler.apply(ctx, null); WebConfiguration webConfig = WebConfiguration.getInstance(); if (path.startsWith(webConfig.getOptionValue(WebConfiguration.WebContextInitParameter.WebAppContractsDirectory))) { throw new TagAttributeException(this.tag, this.src, "Invalid src, contract resources cannot be accessed this way : " + path); } ctx.includeFacelet(parent, path); } catch (IOException e) { if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, e.toString(), e); } throw new TagAttributeException(this.tag, this.src, "Invalid path : " + path); } finally { ctx.setVariableMapper(orig); } } }
ctx.setVariableMapper(wrapper); ctx.setVariableMapper(orig);
ctx.setVariableMapper(wrapper); ctx.setVariableMapper(orig);
ctx.setVariableMapper(wrapper); ctx.setVariableMapper(orig);
public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException, ELException { VariableMapper orig = ctx.getVariableMapper(); if (_params != null) { VariableMapper vm = new VariableMapperWrapper(orig); ctx.setVariableMapper(vm); for (int i = 0; i < _params.length; i++) { _params[i].apply(ctx, parent); } } AbstractFaceletContext actx = (AbstractFaceletContext) ctx; actx.pushClient(this); try { ctx.includeFacelet(parent, _template.getValue(ctx)); } finally { ctx.setVariableMapper(orig); actx.popClient(this); } }
public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException, ELException { VariableMapper orig = ctx.getVariableMapper(); if (_params != null) { VariableMapper vm = new VariableMapperWrapper(orig); ctx.setVariableMapper(vm); for (int i = 0; i < _params.length; i++) { _params[i].apply(ctx, parent); } } AbstractFaceletContext actx = (AbstractFaceletContext) ctx; actx.pushClient(this); try { ctx.includeFacelet(parent, _template.getValue(ctx)); } finally { ctx.setVariableMapper(orig); actx.popClient(this); } }
ctx.setVariableMapper(wrapper); ctx.setVariableMapper(orig);
ctx.setVariableMapper(vm); for (int i = 0; i < _params.length; i++) ctx.setVariableMapper(orig);
ctx.setVariableMapper(vm); for (int i = 0; i < _params.length; i++) ctx.setVariableMapper(orig);
ctx.setVariableMapper(vm); for (int i = 0; i < _params.length; i++) ctx.setVariableMapper(orig);
try faceletContext.setVariableMapper(new VariableMapperWrapper(orig)); actx.pushCompositeComponentClient(this); actx.applyCompositeComponent(compositeFacetPanel, _resource); faceletContext.setVariableMapper(orig);
ctx.setVariableMapper(varMapper); ctx.setVariableMapper(orig);
ctx.setVariableMapper(varMapper); ctx.setVariableMapper(orig);
public void apply(FaceletContext ctx, final UIComponent parent, String templatePath) throws IOException { AbstractFaceletContext faceletContextImpl = (AbstractFaceletContext) ctx; VariableMapper originalVariableMapper = ctx.getVariableMapper(); if (this.paramHandlers != null) { ctx.setVariableMapper(new VariableMapperWrapper(originalVariableMapper)); for (ParamHandler paramHandler : this.paramHandlers) { paramHandler.apply(ctx, parent); } } TemplateClient client = new TemplateClient() { public boolean apply(FaceletContext ctx, UIComponent parent, String name) throws IOException { return applyTemplate(ctx, parent, name); } }; faceletContextImpl.pushClient(client); try { ctx.includeFacelet(parent, templatePath); } finally { faceletContextImpl.popClient(client); faceletContextImpl.setVariableMapper(originalVariableMapper); } }
public void apply(FaceletContext ctx, final UIComponent parent, String templatePath) throws IOException { FaceletContextImplBase faceletContextImpl = (FaceletContextImplBase) ctx; VariableMapper originalVariableMapper = ctx.getVariableMapper(); if (this.paramHandlers != null) { ctx.setVariableMapper(new VariableMapperWrapper(originalVariableMapper)); for (ParamHandler paramHandler : this.paramHandlers) { paramHandler.apply(ctx, parent); } } TemplateClient client = new TemplateClient() { public boolean apply(FaceletContext ctx, UIComponent parent, String name) throws IOException { return applyTemplate(ctx, parent, name); } }; faceletContextImpl.pushClient(client); try { ctx.includeFacelet(parent, templatePath); } finally { faceletContextImpl.popClient(client); faceletContextImpl.setVariableMapper(originalVariableMapper); } }