protected void generateClientId() { String id = getSpecifiedId(); if (id != null && getPage() != null && getPage().getRequestCycle() != null) setClientId(getPage().getRequestCycle().getUniqueId(TapestryUtils.convertTapestryIdToNMToken(id))); }
/** * {@inheritDoc} */ public String peekClientId() { if (getPage() == null) return null; String id = getSpecifiedId(); if (id == null) return null; return getPage().getRequestCycle().peekUniqueId(TapestryUtils.convertTapestryIdToNMToken(id)); }
public BeanProvider(IComponent component) { _component = component; Infrastructure infrastructure = component.getPage().getRequestCycle().getInfrastructure(); _resolver = infrastructure.getClassResolver(); INamespace namespace = component.getNamespace(); _packageList = namespace.getPropertyValue("org.apache.tapestry.bean-class-packages"); _classFinder = infrastructure.getClassFinder(); }
/** @since 3.0 * */ public static BindingException createRequiredParameterException(IComponent component, String parameterName) { return new BindingException(format("required-parameter", parameterName, component.getExtendedId()), component, null, component.getBinding(parameterName), null); }
/** * @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); }
/** * Creates a new ComponentAddress object that carries the identification information of the * given component (the page name and the ID path). * * @param component * the component to get the address of */ public ComponentAddress(IComponent component) { this(component.getPage().getPageName(), component.getIdPath()); }
/** * Creates an exception indicating the binding value is null. * * @since 3.0 */ public static BindingException createNullBindingException(IBinding binding) { return new BindingException(getMessage("null-value-for-binding"), binding); }
/** * Finds a component with the current address using the given RequestCycle. * * @param cycle * the RequestCycle to use to locate the component * @return IComponent a component that has been initialized for the given RequestCycle */ public IComponent findComponent(IRequestCycle cycle) { IPage objPage = cycle.getPage(_pageName); return objPage.getNestedComponent(_idPath); }
/** * By default, pages are not protected and this method does nothing. */ public void validate(IRequestCycle cycle) { Tapestry.addMethodInvocation(Tapestry.ABSTRACTPAGE_VALIDATE_METHOD_ID); firePageValidate(); }
/** * Loads the template for the component, then invokes * {@link AbstractComponent#finishLoad(IRequestCycle, IPageLoader, IComponentSpecification)}. * Subclasses must invoke this method first, before adding any additional behavior, though its * usually simpler to override {@link #finishLoad()}instead. */ public void finishLoad(IRequestCycle cycle, IPageLoader loader, IComponentSpecification specification) { readTemplate(cycle, loader); super.finishLoad(cycle, loader, specification); } }
/** @since 3.0 * */ protected void prepareForRender(IRequestCycle cycle) { super.prepareForRender(cycle); TapestryUtils.storeForm(cycle, this); }
public BeanProvider(IComponent component) { _component = component; Infrastructure infrastructure = component.getPage().getRequestCycle().getInfrastructure(); _resolver = infrastructure.getClassResolver(); INamespace namespace = component.getNamespace(); _packageList = namespace.getPropertyValue("org.apache.tapestry.bean-class-packages"); _classFinder = infrastructure.getClassFinder(); }
protected void generateClientId() { String id = getSpecifiedId(); if (id != null && getPage() != null && getPage().getRequestCycle() != null) setClientId(getPage().getRequestCycle().getUniqueId(TapestryUtils.convertTapestryIdToNMToken(id))); }
/** @since 3.0 * */ public static BindingException createRequiredParameterException(IComponent component, String parameterName) { return new BindingException(format("required-parameter", parameterName, component.getExtendedId()), component, null, component.getBinding(parameterName), null); }
/** * {@inheritDoc} */ public String peekClientId() { if (getPage() == null) return null; String id = getSpecifiedId(); if (id == null) return null; return getPage().getRequestCycle().peekUniqueId(TapestryUtils.convertTapestryIdToNMToken(id)); }
/** * Creates an exception indicating the binding value is null. * * @since 3.0 */ public static BindingException createNullBindingException(IBinding binding) { return new BindingException(getMessage("null-value-for-binding"), binding); }
/** * Finds a component with the current address using the given RequestCycle. * * @param cycle * the RequestCycle to use to locate the component * @return IComponent a component that has been initialized for the given RequestCycle */ public IComponent findComponent(IRequestCycle cycle) { IPage objPage = cycle.getPage(_pageName); return objPage.getNestedComponent(_idPath); }
/** * By default, pages are not protected and this method does nothing. */ public void validate(IRequestCycle cycle) { Tapestry.addMethodInvocation(Tapestry.ABSTRACTPAGE_VALIDATE_METHOD_ID); firePageValidate(); }