Tag parentTag = (Tag) pageContext.peekTopTag(Tag.class); tag.setParent(parentTag); tag.setPageContext(pageContext); setupTag(tag, args, pageContext.getObjectWrapper());
/** * Constructor for a tag with the specified attribute map. * If the specified tag is not an instance of <code>TagSupport</code>, * the methods that delegate to <code>TagSupport</code> specific methods * throw an exception. * @param tag the tag * @param pageContext the corresponding <code>PageContext</code> * @param attributes the attribute map */ public NestedStandardTag(Tag tag, PageContext pageContext, Map attributes) { this.tag = tag; this.pageContext = pageContext; tag.setPageContext(pageContext); childs = new ArrayList(); this.attributes = attributes; doRelease = false; }
/** * Constructor for a tag with the specified attribute map. * If the specified tag is not an instance of <code>TagSupport</code>, * the methods that delegate to <code>TagSupport</code> specific methods * throw an exception. * @param tag the tag * @param pageContext the corresponding <code>PageContext</code> * @param attributes the attribute map */ public NestedStandardTag(Tag tag, PageContext pageContext, Map attributes) { this.tag = tag; this.pageContext = pageContext; tag.setPageContext(pageContext); childs = new ArrayList(); this.attributes = attributes; doRelease = false; }
/** * Constructor for a tag with the specified attribute map. * If the specified tag is not an instance of <code>TagSupport</code>, * the methods that delegate to <code>TagSupport</code> specific methods * throw an exception. * @param tag the tag * @param pageContext the corresponding <code>PageContext</code> * @param attributes the attribute map */ public NestedStandardTag(Tag tag, PageContext pageContext, Map attributes) { this.tag = tag; this.pageContext = pageContext; tag.setPageContext(pageContext); childs = new ArrayList(); this.attributes = attributes; doRelease = false; }
/** * Delegates to wrapped tag. Also calls <code>setPageContext</code> * for all child tags. */ public void setPageContext(PageContext pageContext) { this.pageContext = pageContext; tag.setPageContext(pageContext); for(int ii = 0; ii < childs.size(); ii++) { Object child = childs.get(ii); if(child instanceof Tag) { ((Tag)child).setPageContext(pageContext); } /*else if(child instanceof SimpleTag) { ((SimpleTag)child).setJspContext(pageContext); }*/ } }
/** * Delegates to wrapped tag. Also calls <code>setPageContext</code> * for all child tags. */ public void setPageContext(PageContext pageContext) { this.pageContext = pageContext; tag.setPageContext(pageContext); for(int ii = 0; ii < childs.size(); ii++) { Object child = childs.get(ii); if(child instanceof Tag) { ((Tag)child).setPageContext(pageContext); } /*else if(child instanceof SimpleTag) { ((SimpleTag)child).setJspContext(pageContext); }*/ } }
/** * Delegates to wrapped tag. Also calls <code>setPageContext</code> * for all child tags. */ public void setPageContext(PageContext pageContext) { this.pageContext = pageContext; tag.setPageContext(pageContext); for (Object child : childs) { if (child instanceof Tag) { ((Tag) child).setPageContext(pageContext); } else if (child instanceof SimpleTag) { ((SimpleTag) child).setJspContext(pageContext); } } }
public TagTemplate(PageContext pageContext, T tag, B parent) { this.tag = tag; tag.setPageContext(pageContext); if (parent != null) { tag.setParent(parent); } }
/** * Sets the <code>JspContext</code>. Also calls <code>setJspContext</code> * (or <code>setPageContext</code>) for all child tags. * <code>setPageContext</code> is only called if the specified <code>JspContext</code> * is an instance of <code>PageContext</code>. * @param jspContext the <code>JspContext</code> */ public void setJspContext(JspContext jspContext) { this.jspContext = jspContext; for (Object child : childs) { if (child instanceof Tag && jspContext instanceof PageContext) { ((Tag) child).setPageContext((PageContext) jspContext); } else if (child instanceof SimpleTag) { ((SimpleTag) child).setJspContext(jspContext); } } }
/** * Delegates to wrapped tag. Also calls <code>setPageContext</code> * for all child tags. */ public void setPageContext(PageContext pageContext) { this.pageContext = pageContext; tag.setPageContext(pageContext); for(int ii = 0; ii < childs.size(); ii++) { Object child = childs.get(ii); if(child instanceof Tag) { ((Tag)child).setPageContext(pageContext); } /*else if(child instanceof SimpleTag) { ((SimpleTag)child).setJspContext(pageContext); }*/ } }
/** * Delegates to wrapped tag. Also calls <code>setPageContext</code> * for all child tags. */ public void setPageContext(PageContext pageContext) { this.pageContext = pageContext; tag.setPageContext(pageContext); for(int ii = 0; ii < childs.size(); ii++) { Object child = childs.get(ii); if(child instanceof Tag) { ((Tag)child).setPageContext(pageContext); } /*else if(child instanceof SimpleTag) { ((SimpleTag)child).setJspContext(pageContext); }*/ } }
/** * Assert that the return value of doStartTag is equal to an expectedValue * @param expectedValue value to check against doStartTag */ public void assertDoStartTag(final int expectedValue) throws JspException { testSubject.setPageContext(pageContext); checkReturnValue("doStartTag", expectedValue, testSubject.doStartTag()); }
/** * Delegates to wrapped tag. Also calls <code>setPageContext</code> * for all child tags. */ public void setPageContext(PageContext pageContext) { this.pageContext = pageContext; tag.setPageContext(pageContext); for (Object child : childs) { if (child instanceof Tag) { ((Tag) child).setPageContext(pageContext); } else if (child instanceof SimpleTag) { ((SimpleTag) child).setJspContext(pageContext); } } }
protected void setUpTag(final FacesContext context, final PageContext pageContext, final Tag tag, final Tag parentTag) throws JspException { if (parentTag != null) { tag.setParent(parentTag); } tag.setPageContext(pageContext); setupProperties(tag); composeComponentTreeChildren(context, pageContext, tag); }
protected Tag getLoadedTag() { Tag tag = (Tag) CycleUtil.getLocalVariable(LOADED_TAG_KEY, this, null); if (tag == null) { tag = getTagPool().borrowTag(); tag.setPageContext(_pageContext); CycleUtil.setLocalVariable(LOADED_TAG_KEY, this, tag); } return tag; }
protected void process(final PageContext pageContext, final Tag tag, final Tag parentTag) throws JspException { if (parentTag != null) { tag.setParent(parentTag); } tag.setPageContext(pageContext); setupProperties(tag); if (tag instanceof BodyTag) { processBodyTag(pageContext, (BodyTag) tag); } else if (tag instanceof IterationTag) { processIterationTag(pageContext, (IterationTag) tag); } else { processTag(pageContext, tag); } }
private static void writeTagInternal( PageContext context, Tag tag, Tag parentTag ) throws JspException { tag.setPageContext( context ); tag.setParent( parentTag );
Tag parentTag = (Tag) pageContext.peekTopTag(Tag.class); tag.setParent(parentTag); tag.setPageContext(pageContext); setupTag(tag, args, pageContext.getObjectWrapper());
Tag parentTag = (Tag) pageContext.peekTopTag(Tag.class); tag.setParent(parentTag); tag.setPageContext(pageContext); setupTag(tag, args, pageContext.getObjectWrapper());
Tag parentTag = (Tag)pageContext.peekTopTag(Tag.class); tag.setParent(parentTag); tag.setPageContext(pageContext); setupTag(tag, args, pageContext.getObjectWrapper());