|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hivemind.impl.BaseLocatable
org.apache.tapestry.AbstractComponent
org.apache.tapestry.form.AbstractFormComponent
org.apache.tapestry.form.PropertySelection
org.trails.component.AbstractPropertySelection
org.trails.component.AssociationSelect
org.trails.component.FilteredAssociationSelect
public abstract class FilteredAssociationSelect
Component that renders a select element based on the annotations
InitialValue and PossibleValues.
PossibleValues annotation, the select will
render its options evaluating the expression passed as the value of the
annotation.InitialValue it will render all
instances of that property type and resubmit the form every time the value
changes, so the related select values can be filtered.
| Field Summary |
|---|
| Fields inherited from class org.apache.tapestry.AbstractComponent |
|---|
_body, _bodyCount |
| Constructor Summary | |
|---|---|
FilteredAssociationSelect()
|
|
| Method Summary | |
|---|---|
org.apache.tapestry.form.IPropertySelectionModel |
buildSelectionModel()
Creates an IPropertySelectionModel based on properties annotated
with PossibleValues and InitialValue. |
java.lang.String |
getOnChangeJavascript()
If the property is annotated with InitialValue, this
method generates javascript code to submit the form and update the options
for the filtered property. |
abstract java.lang.Object |
getPageModel()
|
protected void |
prepareForRender(org.apache.tapestry.IRequestCycle cycle)
Sets the initial value for the property based on the expression declared in the InitialValue annotation. |
| Methods inherited from class org.trails.component.AssociationSelect |
|---|
getClassDescriptor, getDescriptorService, getPersistenceService |
| Methods inherited from class org.trails.component.AbstractPropertySelection |
|---|
getIdParameter, getInstances, getModel, getNoneLabel, getOptionRenderer, getPropertyDescriptor, getValidatableFieldSupport, getValue, isAllowNone, setAllowNone, setInstances, setModel, setNoneLabel, setPropertyDescriptor, setValue |
| Methods inherited from class org.apache.tapestry.form.PropertySelection |
|---|
isRequired, renderFormComponent, rewindFormComponent |
| Methods inherited from class org.apache.tapestry.form.AbstractFormComponent |
|---|
generateClientId, getCanTakeFocus, getForm, getName, getRenderBodyOnRewind, peekClientId, renderComponent, renderDelegateAttributes, renderDelegatePrefix, renderDelegateSuffix, setForm, setName, setName |
| Methods inherited from class org.apache.tapestry.AbstractComponent |
|---|
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, equals, finishLoad, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getBoundId, getClientId, getComponent, getComponents, getContainedComponent, getContainedRenderers, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getInnerRenderers, getListeners, getMessages, getNamespace, getPage, getRenderWorker, getSpecification, getSpecifiedId, getTemplateTagName, hasEvents, hashCode, isInActiveState, isParameterBound, isRendering, isStateful, pageEndRender, render, renderBody, renderIdAttribute, renderInformalParameters, setBinding, setClientId, setContainedComponent, setContainer, setHasEvents, setId, setNamespace, setPage, setTemplateTagName, toString, triggerEvent |
| Methods inherited from class org.apache.hivemind.impl.BaseLocatable |
|---|
getLocation, setLocation |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.tapestry.form.ValidatableField |
|---|
getValidators |
| Methods inherited from interface org.apache.tapestry.form.IFormComponent |
|---|
getClientId, getDisplayName, getForm, getName, isDisabled, setName |
| Methods inherited from interface org.apache.tapestry.IComponent |
|---|
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainedComponent, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getListeners, getMessages, getNamespace, getPage, getSpecification, getSpecifiedId, getTemplateTagName, isRendering, peekClientId, renderBody, setBinding, setClientId, setContainedComponent, setContainer, setId, setNamespace, setPage, setTemplateTagName |
| Methods inherited from interface org.apache.tapestry.IRender |
|---|
render |
| Methods inherited from interface org.apache.hivemind.LocationHolder |
|---|
setLocation |
| Methods inherited from interface org.apache.hivemind.Locatable |
|---|
getLocation |
| Constructor Detail |
|---|
public FilteredAssociationSelect()
| Method Detail |
|---|
@Parameter(required=true) public abstract java.lang.Object getPageModel()
protected void prepareForRender(org.apache.tapestry.IRequestCycle cycle)
InitialValue annotation.
prepareForRender in class org.apache.tapestry.AbstractComponentcycle - the request cycle, it's never null.public org.apache.tapestry.form.IPropertySelectionModel buildSelectionModel()
IPropertySelectionModel based on properties annotated
with PossibleValues and InitialValue.
buildSelectionModel in class AssociationSelectpublic java.lang.String getOnChangeJavascript()
InitialValue, this
method generates javascript code to submit the form and update the options
for the filtered property.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||