|
||||||||||
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.components.ForBean
public abstract class ForBean
IPrimaryKeyConverter
,
DefaultPrimaryKeyConverter
Nested Class Summary | |
---|---|
protected class |
ForBean.CompleteRepSource
An implementation of RepSource that provides the string representation of the given value using all methods. |
protected class |
ForBean.KeyExpressionRepSource
An implementation of RepSource that provides the string representation of the given value using just the 'keyExpression' parameter. |
protected static interface |
ForBean.RepSource
An interface that provides the string representation of a given value. |
Field Summary |
---|
Fields inherited from class org.apache.tapestry.AbstractComponent |
---|
_body, _bodyCount |
Constructor Summary | |
---|---|
ForBean()
|
Method Summary | |
---|---|
protected void |
cleanupAfterRender(IRequestCycle cycle)
Overriden so that RenderWorker doesn't get run as we've been invoking it manually already. |
protected Iterator |
evaluateFullSourceIterator()
Returns a new iterator of the values in 'fullSource'. |
protected Iterator |
evaluateSourceIterator()
Returns a new iterator of the values in 'source'. |
protected Object |
findValueWithStringRep(Iterator sourceIterator,
Iterator fullSourceIterator,
Map repToValueMap,
String rep,
ForBean.RepSource repSource)
Attempt to find a value in 'source' or 'fullSource' that generates the provided string representation. |
protected Object |
findValueWithStringRepInIterator(Iterator it,
Map repToValueMap,
String rep,
ForBean.RepSource repSource)
Attempt to find a value in the provided collection that generates the required string representation. |
protected void |
generateClientId()
|
protected boolean |
getCanTakeFocus()
For component can not take focus. |
abstract IPrimaryKeyConverter |
getConverter()
|
protected Object |
getConverterFromValue(Object value)
Uses the 'converter' parameter to determine the primary key of the given value. |
abstract DataSqueezer |
getDataSqueezer()
|
abstract Object |
getDefaultValue()
|
String |
getDisplayName()
May be implemented to return a user-presentable, localized name for the component, which is used in labels or error messages. |
abstract String |
getElement()
|
abstract ExpressionEvaluator |
getExpressionEvaluator()
|
int |
getIndex()
The index number, within the getStoredData(IRequestCycle, String) , of the the current value. |
abstract String |
getKeyExpression()
|
protected Object |
getKeyExpressionFromValue(Object value)
Uses the 'keyExpression' parameter to determine the primary key of the given value. |
abstract boolean |
getMatch()
|
protected Object |
getPrimaryKeyFromValue(Object value)
Returns the primary key of the given value. |
abstract boolean |
getRenderTag()
|
abstract ComponentRenderWorker |
getRenderWorker()
|
abstract ResponseBuilder |
getResponseBuilder()
|
protected Iterator |
getStoredData(IRequestCycle cycle,
String name)
Returns a list of the values stored as Hidden fields in the form. |
protected String |
getStringRepFromValue(Object value)
Returns the string representation of the value. |
Object |
getValue()
Returns the most recent value extracted from the source parameter. |
abstract ValueConverter |
getValueConverter()
|
protected Object |
getValueFromStringRep(Iterator sourceIterator,
Iterator fullSourceIterator,
Map repToValueMap,
String rep)
Determines the value that corresponds to the given string representation. |
abstract boolean |
getVolatile()
|
boolean |
hasNext()
|
boolean |
isDisabled()
Returns true if the component is disabled. |
protected void |
renderComponent(IMarkupWriter writer,
IRequestCycle cycle)
Gets the source binding and iterates through its values. |
protected void |
renderFormComponent(IMarkupWriter writer,
IRequestCycle cycle)
Invoked from AbstractFormComponent.renderComponent(IMarkupWriter, IRequestCycle)
to render the component. |
protected void |
rewindFormComponent(IMarkupWriter writer,
IRequestCycle cycle)
Invoked from AbstractFormComponent.renderComponent(IMarkupWriter, IRequestCycle) to rewind the
component. |
protected Iterator |
storeSourceData(IForm form,
String name)
Stores the provided data in the form and then returns the data as an iterator. |
protected void |
updateOutputParameters()
Updates the index and value output parameters if bound. |
protected void |
updatePrimaryKeysParameter(String[] stringReps)
Updates the primaryKeys parameter if bound. |
Methods inherited from class org.apache.tapestry.form.AbstractFormComponent |
---|
getForm, getIdParameter, getName, getRenderBodyOnRewind, isRequired, peekClientId, renderDelegateAttributes, renderDelegatePrefix, renderDelegateSuffix, setForm, setName, setName |
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.IFormComponent |
---|
getClientId |
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, 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 ForBean()
Method Detail |
---|
public abstract boolean getRenderTag()
public abstract String getElement()
public abstract String getKeyExpression()
public abstract IPrimaryKeyConverter getConverter()
public abstract Object getDefaultValue()
public abstract boolean getMatch()
public abstract boolean getVolatile()
public abstract DataSqueezer getDataSqueezer()
public abstract ValueConverter getValueConverter()
public abstract ExpressionEvaluator getExpressionEvaluator()
public abstract ComponentRenderWorker getRenderWorker()
getRenderWorker
in class AbstractComponent
public abstract ResponseBuilder getResponseBuilder()
public boolean hasNext()
protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
renderComponent
in class AbstractFormComponent
AbstractComponent.renderComponent(org.apache.tapestry.IMarkupWriter,
org.apache.tapestry.IRequestCycle)
protected void cleanupAfterRender(IRequestCycle cycle)
cleanupAfterRender
in class AbstractComponent
protected void generateClientId()
AbstractFormComponent
generateClientId
in class AbstractFormComponent
public final Object getValue()
public int getIndex()
getStoredData(IRequestCycle, String)
, of the the current value.
public boolean isDisabled()
IFormComponent
protected void updateOutputParameters()
protected void updatePrimaryKeysParameter(String[] stringReps)
protected void renderFormComponent(IMarkupWriter writer, IRequestCycle cycle)
AbstractFormComponent
AbstractFormComponent.renderComponent(IMarkupWriter, IRequestCycle)
to render the component.
renderFormComponent
in class AbstractFormComponent
protected void rewindFormComponent(IMarkupWriter writer, IRequestCycle cycle)
AbstractFormComponent
AbstractFormComponent.renderComponent(IMarkupWriter, IRequestCycle)
to rewind the
component. If the component is disabled
this will not be invoked.
rewindFormComponent
in class AbstractFormComponent
protected Iterator getStoredData(IRequestCycle cycle, String name)
cycle
- The current request cyclename
- The name of the HTTP parameter whether the values
protected Iterator storeSourceData(IForm form, String name)
form
- The form where the data will be storedname
- The name under which the data will be stored
protected String getStringRepFromValue(Object value)
value
-
protected Object getPrimaryKeyFromValue(Object value)
value
- The value from which the primary key should be extracted
protected Object getKeyExpressionFromValue(Object value)
value
- The value from which the primary key should be extracted
protected Object getConverterFromValue(Object value)
value
- The value from which the primary key should be extracted
protected Object getValueFromStringRep(Iterator sourceIterator, Iterator fullSourceIterator, Map repToValueMap, String rep)
rep
- the string representation for which a value should be returned
protected Object findValueWithStringRep(Iterator sourceIterator, Iterator fullSourceIterator, Map repToValueMap, String rep, ForBean.RepSource repSource)
rep
- the string representation for which a value should be returnedrepSource
- an interface providing the string representation of a given value
protected Object findValueWithStringRepInIterator(Iterator it, Map repToValueMap, String rep, ForBean.RepSource repSource)
rep
- the string representation for which a value should be returnedrepSource
- an interface providing the string representation of a given valueit
- the iterator of the collection in which a value should be searched
protected Iterator evaluateSourceIterator()
protected Iterator evaluateFullSourceIterator()
protected boolean getCanTakeFocus()
getCanTakeFocus
in class AbstractFormComponent
public String getDisplayName()
IFormComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |