Refine search
public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException, ELException { if (parent == null) { throw new TagException(this.tag, "Parent UIComponent was null"); } parent.getAttributes().put(KEY, this.name.getValue(ctx)); try { this.nextHandler.apply(ctx, parent); } finally { parent.getAttributes().remove(KEY); } }
root = (UIViewRoot) parent; } else { root = ctx.getFacesContext().getViewRoot(); UIViewRoot.METADATA_FACET_NAME); try { this.nextHandler.apply(ctx, root); } finally { root.getAttributes().remove(FacetHandler.KEY); Application app = ctx.getFacesContext().getApplication(); UIComponent panelGroup = app.createComponent(UIPanel.COMPONENT_TYPE); panelGroup.getChildren().add(facetComponent); root.getFacets().put(UIViewRoot.METADATA_FACET_NAME, panelGroup); facetComponent = panelGroup; facetComponent.setId(UIViewRoot.METADATA_FACET_NAME);
throw new TagException(this.tag, "Parent UIComponent "+parent.getId()+" should be instance of UIViewRoot"); isBuildingViewMetadata(ctx.getFacesContext())) UIComponent metadataFacet = parent.getFacet(UIViewRoot.METADATA_FACET_NAME); if (metadataFacet == null) metadataFacet = ctx.getFacesContext().getApplication().createComponent(UIPanel.COMPONENT_TYPE); metadataFacet.setId(UIViewRoot.METADATA_FACET_NAME); metadataFacet.getAttributes().put(ComponentSupport.FACET_CREATED_UIPANEL_MARKER, true); parent.getFacets().put(UIViewRoot.METADATA_FACET_NAME, metadataFacet); try this.nextHandler.apply(ctx, parent);
public void apply(FaceletContext ctx, UIComponent parent) throws IOException { assert(ctx.getFacesContext().getAttributes().containsKey(FaceletViewHandlingStrategy.IS_BUILDING_METADATA)); (null == (parent = parent.getParent())) || !(ComponentHandler.isNew(parent))) { return; parent.getAttributes().get(UIComponent.BEANINFO_KEY); if (null == componentBeanInfo) { throw new TagException(this.tag, "Error: I have an EditableValueHolder tag, but no enclosing composite component"); targetList.add(target); ValueExpression ve = name.getValueExpression(ctx, String.class); String strValue = (String) ve.getValue(ctx); if (null != strValue) { ve = targets.getValueExpression(ctx, String.class); target.setTargetsList(ve); this.nextHandler.apply(ctx, parent);
public void apply(FaceletContext ctx, UIComponent parent) throws IOException { FacesContext context = ctx.getFacesContext(); // only process if it's been created // Do not process if we're simply building metadata if (FaceletViewHandlingStrategy.isBuildingMetadata(context)) { imbueComponentWithMetadata(ctx, parent); this.nextHandler.apply(ctx, parent); } else { if (ProjectStage.Development == context.getApplication().getProjectStage()) { validateComponent(context, parent); } } }
(null == (parent = parent.getParent())) || !(ComponentHandler.isNew(parent))) { return; Map<String, Object> componentAttrs = parent.getAttributes(); ValueExpression ve = name.getValueExpression(ctx, String.class); String strValue = (String) ve.getValue(ctx); BeanDescriptor componentBeanDescriptor = componentBeanInfo.getBeanDescriptor(); String attributeName = tagAttribute.getLocalName(); PropertyHandler handler = ATTRIBUTE_MANAGER.getHandler(ctx, attributeName); if (handler != null) { this.nextHandler.apply(ctx, parent);
(CompositeComponentBeanInfo) compositeBaseParent.getAttributes() .get(UIComponent.BEANINFO_KEY); descriptor.setName(_name.getValue(ctx)); _componentType.getValueExpression(ctx, String.class)); if (ctx.getFacesContext().isProjectStage(ProjectStage.Development)) STANDARD_ATTRIBUTES_SORTED, ctx); nextHandler.apply(ctx, parent);
public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException, ELException { this.next.apply(ctx, parent); if (this.encoding == null) { if (!ctx.getFacesContext().getExternalContext().getRequestMap().containsKey("facelets.Encoding")) { ctx.getFacesContext().getExternalContext().getRequestMap().put("facelets.Encoding", "UTF-8"); } } else { //Encoding of document takes precedence over f:view contentType ctx.getFacesContext().getExternalContext().getRequestMap().put("facelets.Encoding", this.encoding); } }
public void apply(FaceletContext ctx, UIComponent parent) throws IOException { if (parent == null) { throw new TagException(this.tag, "Parent UIComponent was null"); } parent.getAttributes().put(KEY, getFacetName(ctx)); try { this.nextHandler.apply(ctx, parent); } finally { parent.getAttributes().remove(KEY); } }
@Override 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), b); } if (b) { this.nextHandler.apply(ctx, parent); } }
public void apply(FaceletContext ctx, UIComponent parent) throws IOException { try { this.nextHandler.apply(ctx, parent); } catch (Exception e) { if (this.var != null) { ctx.setAttribute(this.var.getValue(ctx), e); } } }
String path = this.src.getValue(ctx); if (path == null || path.length() == 0) VariableMapper orig = ctx.getVariableMapper(); ctx.setVariableMapper(new VariableMapperWrapper(orig)); try this.nextHandler.apply(ctx, null); if (ctx.getFacesContext().isProjectStage(ProjectStage.Development) && ERROR_PAGE_INCLUDE_PATH.equals(path)) ctx.setVariableMapper(orig); if ( !src.isLiteral() && FaceletCompositionContext.getCurrentInstance(ctx). isMarkInitialStateAndIsRefreshTransientBuildOnPSS())
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); } } }
public void apply(FaceletContext ctx, UIComponent parent) throws IOException { FacesContext context = ctx.getFacesContext(); Map<Object,Object> ctxAttributes = context.getAttributes(); ctxAttributes.put("facelets.compilationMessages", this.messageHolder); this.next.apply(ctx, parent); ctxAttributes.remove("facelets.compilationMessages"); this.messageHolder.processCompilationMessages(ctx.getFacesContext()); if (!ctxAttributes.containsKey(RIConstants.FACELETS_ENCODING_KEY)) { ctx.getFacesContext().getAttributes().put(RIConstants.FACELETS_ENCODING_KEY, this.encoding); } }
@Override public void apply(FaceletContext context, UIComponent parent) throws IOException { List<UIComponent> oldChildren = new ArrayList<>(parent.getChildren()); nextHandler.apply(context, parent); if (ComponentHandler.isNew(parent)) { List<UIComponent> newChildren = new ArrayList<>(parent.getChildren()); newChildren.removeAll(oldChildren); applyMassAttribute(context, newChildren); } }
@Override public void apply(FaceletContext ctx, UIComponent parent) throws IOException { if (!FaceletViewHandlingStrategy.isBuildingMetadata(ctx.getFacesContext())) { this.nextHandler.apply(ctx, parent); } }
@Override public void apply(FaceletContext ctx, UIComponent parent) throws IOException { FunctionMapper orig = ctx.getFunctionMapper(); pushMapper(ctx.getFacesContext(), this); ctx.setFunctionMapper(new CompositeFunctionMapper(this, orig)); try { next.apply(ctx, parent); } finally { ctx.setFunctionMapper(orig); } }
ctx.getFacesContext().getAttributes().put(FaceletContext.FACELET_CONTEXT_KEY, ctxWrapper); _root.apply(ctxWrapper, parent); ctx.getFacesContext().getAttributes().put(FaceletContext.FACELET_CONTEXT_KEY, ctx); this.markApplied(parent);
/** * {@inheritDoc} */ public void apply(FaceletContext ctx, UIComponent parent) throws IOException { for (int i = 0; i < len; i++) { this.children[i].apply(ctx, parent); } }
public void apply(FaceletContext ctx, UIComponent parent) throws IOException { String templatePath = this.template.getValue(ctx); for (Object child : this.children) { try { if (child instanceof DecoratedChild) { ((DecoratedChild) child).apply(ctx, parent, templatePath); } else { ((FaceletHandler) child).apply(ctx, parent); } } catch (IOException e) { throw new TagAttributeException(this.tag, this.template, "Invalid path : " + templatePath); } } }