public void addComponent(FaceletContext ctx, UIComponent parent, UIComponent c) { // possible facet scoped String facetName = this.getFacetName(ctx, parent); if (facetName == null) { parent.getChildren().add(c); } else { ComponentSupport.addFacet(ctx, parent, c, facetName); } }
facet = createFacetUIPanel(ctx, parent, facetName); facet.getChildren().add(child); facet.getChildren().add(c); facet = createFacetUIPanel(ctx, parent, facetName); facet.getChildren().add(oldPanel); facet.getChildren().add(c);
public UIComponent findChildByTagId(FaceletContext ctx, UIComponent parent, String id) { UIComponent c = null; UIViewRoot root = ComponentSupport.getViewRoot(ctx, parent); Iterator<UIComponent> itr = root.getFacets().values().iterator(); while (itr.hasNext() && c == null) { UIComponent facet = itr.next(); c = ComponentSupport.findChildByTagId(facet, id); } return c; }
UIComponent c = ComponentSupport.findChildByTagId(parent, id); boolean componentFound = false; if (c != null) ComponentSupport.markForDeletion(c); UIViewRoot root = ComponentSupport.getViewRoot(ctx, parent); if (root != null) ComponentSupport.finalizeForDeletion(c);
c = ComponentSupport.findChildInFacetByTagId(parent, id, facetName); c = ComponentSupport.findChildInChildrenByTagId(parent, id); uniqueIdVendor = ComponentSupport.getViewRoot(ctx, parent); UIComponent c1 = ComponentSupport.findChildInChildrenByTagId(parent, id); if (c1 == null) facetName = ComponentSupport.findChildInFacetsByTagId(parent, id); ComponentSupport.setCachedFacesContext(c, facesContext); ComponentSupport.removeFacet(ctx, parent, c, facetName); ComponentSupport.setCachedFacesContext(c, null); facesContext.setProcessingEvents(oldProcessingEvents); ComponentSupport.setCachedFacesContext(c, facesContext); ComponentSupport.addFacet(ctx, parent, c, facetName); ComponentSupport.setCachedFacesContext(c, null); facesContext.setProcessingEvents(oldProcessingEvents);
c = ComponentSupport.findChildByTagId(parent, id); uniqueIdVendor = ComponentSupport.getViewRoot(ctx, parent); ComponentSupport.removeFacet(ctx, parent, c, facetName); ComponentSupport.addFacet(ctx, parent, c, facetName);
@Override public void onComponentCreated(FaceletContext ctx, UIComponent c, UIComponent parent) { UIWebsocket component = (UIWebsocket) c; component.getAttributes().put("initComponentId", ComponentSupport.getViewRoot(ctx, parent).createUniqueId()+"_wsinit"); }
c = ComponentSupport.findChildInFacetByTagId(parent, id, facetName); c = ComponentSupport.findChildInChildrenByTagId(parent, id); if (uniqueIdVendor == null) uniqueIdVendor = ComponentSupport.getViewRoot(ctx, parent); ComponentSupport.removeFacet(ctx, parent, c, facetName); ComponentSupport.addFacet(ctx, parent, c, facetName);
String uniqueId = actx.generateUniqueFaceletTagId( fcc.startComponentUniqueIdSection(), tagId); Boolean restoredValue = (Boolean) ComponentSupport.restoreInitialTagState(ctx, fcc, parent, uniqueId); boolean b = false; boolean markInitialState = false; ComponentSupport.saveInitialTagState(ctx, fcc, parent, uniqueId, b); if (fcc.isUsingPSSOnThisView() && fcc.isRefreshTransientBuildOnPSS() && !fcc.isRefreshingTransientBuild()) ComponentSupport.markComponentToRestoreFully(ctx.getFacesContext(), parent); ComponentSupport.markComponentToRefreshDynamically(ctx.getFacesContext(), parent);
ELException UIViewRoot root = ComponentSupport.getViewRoot(ctx, parent); if (root != null) root.setLocale(ComponentSupport.getLocale(ctx, this.locale));
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); } //AbstractFaceletContext actx = (AbstractFaceletContext) ctx; if (FaceletCompositionContext.getCurrentInstance(ctx). isMarkInitialStateAndIsRefreshTransientBuildOnPSS()) { //Mark the parent component to be saved and restored fully. ComponentSupport.markComponentToRestoreFully(ctx.getFacesContext(), parent); } }
public void setAttributes(FaceletContext ctx, Object obj) { super.setAttributes(ctx, obj); NumberConverter c = (NumberConverter) obj; if (this.locale != null) { c.setLocale(ComponentSupport.getLocale(ctx, this.locale)); } }
FaceletState restoredFaceletState = ComponentSupport.getFaceletState(ctx, parent, false); IterationState restoredSavedOption = (restoredFaceletState == null) ? null : (IterationState) restoredFaceletState.getState(uniqueId); ComponentSupport.markComponentToRestoreFully(ctx.getFacesContext(), parent); ComponentSupport.markComponentToRefreshDynamically(ctx.getFacesContext(), parent);
ComponentSupport.saveInitialTagState(ctx, fcc, parent, uniqueId, savedOption); if (fcc.isUsingPSSOnThisView() && fcc.isRefreshTransientBuildOnPSS() && !fcc.isRefreshingTransientBuild()) ComponentSupport.markComponentToRestoreFully(ctx.getFacesContext(), parent); ComponentSupport.markComponentToRefreshDynamically(ctx.getFacesContext(), parent);
ComponentSupport.markComponentToRestoreFully(ctx.getFacesContext(), parent); ComponentSupport.markComponentToRefreshDynamically(ctx.getFacesContext(), parent);
public static void encodeRecursive(FacesContext context, UIComponent toRender) throws IOException, FacesException { if (toRender.isRendered()) { toRender.encodeBegin(context); if (toRender.getRendersChildren()) { toRender.encodeChildren(context); } else if (toRender.getChildCount() > 0) { for (int i = 0, childCount = toRender.getChildCount(); i < childCount; i++) { UIComponent child = toRender.getChildren().get(i); encodeRecursive(context, child); } } toRender.encodeEnd(context); } }
UIComponent c = ComponentSupport.findChildByTagId(parent, id); boolean componentFound = false; if (c != null) ComponentSupport.markForDeletion(c); UIViewRoot root = ComponentSupport.getViewRoot(ctx, parent); if (root != null) ComponentSupport.finalizeForDeletion(c);
c = ComponentSupport.findChildByTagId(parent, id); uniqueIdVendor = ComponentSupport.getViewRoot(ctx, parent); ComponentSupport.removeFacet(ctx, parent, c, facetName); ComponentSupport.addFacet(ctx, parent, c, facetName);
public static FaceletState getFaceletState(FaceletContext ctx, UIComponent parent, boolean create) { UIViewRoot root = getViewRoot(ctx, parent); FaceletState map = (FaceletState) root.getAttributes().get(FACELET_STATE_INSTANCE); if (map == null && create) { map = new FaceletState(); root.getAttributes().put(FACELET_STATE_INSTANCE, map); } return map; }
String restoredPath = (String) ComponentSupport.restoreInitialTagState(ctx, fcc, parent, uniqueId); if (restoredPath != null) ComponentSupport.saveInitialTagState(ctx, fcc, parent, uniqueId, path); ComponentSupport.markComponentToRestoreFully(ctx.getFacesContext(), parent); ComponentSupport.markComponentToRefreshDynamically(ctx.getFacesContext(), parent);