private void setCycleStack(IRequestCycle cycle, Stack currStack) { cycle.setAttribute(TreeHelper.class.getName(), currStack); }
/** * @see org.apache.tapestry.BaseComponent#renderComponent(org.apache.tapestry.IMarkupWriter, * org.apache.tapestry.IRequestCycle) */ protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle) { Object objExistedTreeModelSource = cycle .getAttribute(ITreeRowSource.TREE_ROW_SOURCE_ATTRIBUTE); cycle.setAttribute(ITreeRowSource.TREE_ROW_SOURCE_ATTRIBUTE, this); super.renderComponent(writer, cycle); cycle.setAttribute(ITreeRowSource.TREE_ROW_SOURCE_ATTRIBUTE, objExistedTreeModelSource); }
/** * @see org.apache.tapestry.AbstractComponent#renderBody(org.apache.tapestry.IMarkupWriter, * org.apache.tapestry.IRequestCycle) */ public void renderBody(IMarkupWriter writer, IRequestCycle cycle) { Object objExistedTreeModelSource = cycle .getAttribute(ITreeRowSource.TREE_ROW_SOURCE_ATTRIBUTE); cycle.setAttribute(ITreeRowSource.TREE_ROW_SOURCE_ATTRIBUTE, this); super.renderBody(writer, cycle); cycle.setAttribute(ITreeRowSource.TREE_ROW_SOURCE_ATTRIBUTE, objExistedTreeModelSource); }
/** * @see org.apache.tapestry.BaseComponent#renderComponent(org.apache.tapestry.IMarkupWriter, * org.apache.tapestry.IRequestCycle) */ protected void renderComponent(IMarkupWriter arg0, IRequestCycle arg1) { Object objExistedTreeModelSource = arg1 .getAttribute(ITreeModelSource.TREE_MODEL_SOURCE_ATTRIBUTE); arg1.setAttribute(ITreeModelSource.TREE_MODEL_SOURCE_ATTRIBUTE, this); super.renderComponent(arg0, arg1); arg1.setAttribute(ITreeModelSource.TREE_MODEL_SOURCE_ATTRIBUTE, objExistedTreeModelSource); }
/** * @see org.apache.tapestry.BaseComponent#renderComponent(IMarkupWriter, * IRequestCycle) */ protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle) { Object objOldValue = cycle .getAttribute(ITableRowSource.TABLE_ROW_SOURCE_ATTRIBUTE); cycle.setAttribute(ITableRowSource.TABLE_ROW_SOURCE_ATTRIBUTE, this); super.renderComponent(writer, cycle); cycle.setAttribute(ITableRowSource.TABLE_ROW_SOURCE_ATTRIBUTE, objOldValue); // set the current row to null when the component is not active m_objTableRow = null; }
/** * @see org.apache.tapestry.BaseComponent#renderComponent(IMarkupWriter, * IRequestCycle) */ protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle) { Object oldValueUp = cycle.getAttribute(TABLE_COLUMN_ARROW_UP_ATTRIBUTE); Object oldValueDown = cycle.getAttribute(TABLE_COLUMN_ARROW_DOWN_ATTRIBUTE); try { cycle.setAttribute(TABLE_COLUMN_ARROW_UP_ATTRIBUTE, getArrowUpAsset()); cycle.setAttribute(TABLE_COLUMN_ARROW_DOWN_ATTRIBUTE, getArrowDownAsset()); super.renderComponent(writer, cycle); } finally { cycle.setAttribute(TABLE_COLUMN_ARROW_UP_ATTRIBUTE, oldValueUp); cycle.setAttribute(TABLE_COLUMN_ARROW_DOWN_ATTRIBUTE, oldValueDown); // set the current column to null when the component is not active m_objTableColumn = null; } }
/** * @see org.apache.tapestry.BaseComponent#renderComponent(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle) */ protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle) { Object objOtherGroup = cycle.getAttribute(CHECKBOX_GROUP_ATTRIBUTE); cycle.setAttribute(CHECKBOX_GROUP_ATTRIBUTE, this); initialize(cycle); super.renderComponent(writer, cycle); // clear the registered checkbox names after rendering // allows the component to be used in cycles getCheckboxNames().clear(); cycle.setAttribute(CHECKBOX_GROUP_ATTRIBUTE, objOtherGroup); }
void mapFormNames(IRequestCycle cycle, IForm form) { List names = (List)cycle.getAttribute(FORM_NAME_LIST + form.getExtendedId()); if (names == null) { names = new ArrayList(); cycle.setAttribute(FORM_NAME_LIST + form.getExtendedId(), names); } names.add(form.getName()); }
/** * Stores a pointer to this component in the Request Cycle while rendering * so that wrapped components have access to it. * * @see org.apache.tapestry.BaseComponent#renderComponent(IMarkupWriter, * IRequestCycle) */ protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle) { Object objOldValue = cycle.getAttribute(ITableModelSource.TABLE_MODEL_SOURCE_ATTRIBUTE); cycle.setAttribute(ITableModelSource.TABLE_MODEL_SOURCE_ATTRIBUTE, this); initialize(); validateValues(); super.renderComponent(writer, cycle); cycle.setAttribute(ITableModelSource.TABLE_MODEL_SOURCE_ATTRIBUTE, objOldValue); }
void mapFormNames(IRequestCycle cycle, IForm form) { List names = (List)cycle.getAttribute(FORM_NAME_LIST + form.getExtendedId()); if (names == null) { names = new ArrayList(); cycle.setAttribute(FORM_NAME_LIST + form.getExtendedId(), names); } names.add(form.getName()); }
public void write(StringBuffer buffer, ScriptSession session) { IRequestCycle cycle = session.getRequestCycle(); Location location = getLocation(); String tag = "<unique> " + location.toString(); if (cycle.getAttribute(tag) != null) return; cycle.setAttribute(tag, Boolean.TRUE); writeChildren(buffer, session); }
public void write(StringBuffer buffer, ScriptSession session) { IRequestCycle cycle = session.getRequestCycle(); Location location = getLocation(); String tag = "<unique> " + location.toString(); if (cycle.getAttribute(tag) != null) return; cycle.setAttribute(tag, Boolean.TRUE); writeChildren(buffer, session); }
/** * @see org.apache.tapestry.AbstractComponent#prepareForRender(org.apache.tapestry.IRequestCycle) */ protected void prepareForRender(IRequestCycle cycle) { IComponent outer = (IComponent) cycle.getAttribute(ATTRIBUTE_NAME); if (outer != null) throw new ApplicationRuntimeException(FormMessages.linkSubmitMayNotNest(this, outer), this, getLocation(), null); cycle.setAttribute(ATTRIBUTE_NAME, this); }
/** * @see org.apache.tapestry.AbstractComponent#prepareForRender(org.apache.tapestry.IRequestCycle) */ protected void prepareForRender(IRequestCycle cycle) { super.prepareForRender(cycle); if (cycle.getAttribute(ATTRIBUTE_NAME) != null) throw new ApplicationRuntimeException(Tapestry.getMessage("Select.may-not-nest"), this, null, null); cycle.setAttribute(ATTRIBUTE_NAME, this); _rendering = true; _nextOptionId = 0; }
/** * @see org.apache.tapestry.AbstractComponent#prepareForRender(org.apache.tapestry.IRequestCycle) */ protected void prepareForRender(IRequestCycle cycle) { super.prepareForRender(cycle); if (cycle.getAttribute(ATTRIBUTE_NAME) != null) throw new ApplicationRuntimeException(Tapestry.getMessage("Select.may-not-nest"), this, null, null); cycle.setAttribute(ATTRIBUTE_NAME, this); _rendering = true; _nextOptionId = 0; }
/** * @see org.apache.tapestry.AbstractComponent#prepareForRender(org.apache.tapestry.IRequestCycle) */ protected void prepareForRender(IRequestCycle cycle) { IComponent outer = (IComponent) cycle.getAttribute(ATTRIBUTE_NAME); if (outer != null) throw new ApplicationRuntimeException(FormMessages.linkSubmitMayNotNest(this, outer), this, getLocation(), null); cycle.setAttribute(ATTRIBUTE_NAME, this); }
/** * @see org.apache.tapestry.AbstractComponent#prepareForRender(org.apache.tapestry.IRequestCycle) */ protected void prepareForRender(IRequestCycle cycle) { super.prepareForRender(cycle); if (cycle.getAttribute(ATTRIBUTE_NAME) != null) throw new ApplicationRuntimeException(Tapestry.getMessage("RadioGroup.may-not-nest"), this, null, null); cycle.setAttribute(ATTRIBUTE_NAME, this); _rendering = true; _nextOptionId = 0; }
/** * @see org.apache.tapestry.AbstractComponent#prepareForRender(org.apache.tapestry.IRequestCycle) */ protected void prepareForRender(IRequestCycle cycle) { super.prepareForRender(cycle); if (cycle.getAttribute(ATTRIBUTE_NAME) != null) throw new ApplicationRuntimeException(Tapestry.getMessage("RadioGroup.may-not-nest"), this, null, null); cycle.setAttribute(ATTRIBUTE_NAME, this); _rendering = true; _nextOptionId = 0; }
/** * @see AbstractComponent#renderComponent(IMarkupWriter, IRequestCycle) */ protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle) { if (cycle.getAttribute(ATTRIBUTE_NAME) != null) throw new ApplicationRuntimeException(Tapestry.getMessage("Card.cards-may-not-nest"), this, null, null); cycle.setAttribute(ATTRIBUTE_NAME, this); writer.begin("card"); String title = getTitle(); if (HiveMind.isNonBlank(title)) writer.attribute("title", title); renderInformalParameters(writer, cycle); IMarkupWriter nestedWriter = writer.getNestedWriter(); renderBody(nestedWriter, cycle); nestedWriter.close(); writer.end(); cycle.removeAttribute(ATTRIBUTE_NAME); }
/** * @see AbstractComponent#renderComponent(IMarkupWriter, IRequestCycle) */ protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle) { if (cycle.getAttribute(ATTRIBUTE_NAME) != null) throw new ApplicationRuntimeException(Tapestry.getMessage("Card.cards-may-not-nest"), this, null, null); cycle.setAttribute(ATTRIBUTE_NAME, this); writer.begin("card"); String title = getTitle(); if (HiveMind.isNonBlank(title)) writer.attribute("title", title); renderInformalParameters(writer, cycle); IMarkupWriter nestedWriter = writer.getNestedWriter(); renderBody(nestedWriter, cycle); nestedWriter.close(); writer.end(); cycle.removeAttribute(ATTRIBUTE_NAME); }