public abstract class RadioGroup extends AbstractFormComponent implements ValidatableField
Radio
components. The Radio and
Radio
group components work together to update a property of some other object, much like
a more flexible version of a PropertySelection
. [ Component Reference ]
As of 4.0, this component can be validated.
Constructor and Description |
---|
RadioGroup() |
Modifier and Type | Method and Description |
---|---|
protected void |
cleanupAfterRender(IRequestCycle cycle)
Invoked by
AbstractComponent.render(IMarkupWriter, IRequestCycle) after the component renders. |
static RadioGroup |
get(IRequestCycle cycle) |
protected boolean |
getAlwaysRenderBodyOnRewind()
A small number of components should always render their body on rewind (even if the component
is itself disabled) and should override this method to return true.
|
protected boolean |
getCanTakeFocus()
This component can not take focus.
|
int |
getNextOptionId() |
abstract ValidatableFieldSupport |
getValidatableFieldSupport()
Injected.
|
boolean |
isRequired()
Returns false.
|
boolean |
isRewinding() |
boolean |
isSelected(int option)
Used by
Radio components when rewinding to see if their value was submitted. |
boolean |
isSelection(java.lang.Object value)
Returns true if the value is equal to the current selection for the group.
|
protected void |
prepareForRender(IRequestCycle cycle)
Invoked by
AbstractComponent.render(IMarkupWriter, IRequestCycle) to prepare the component to render. |
protected void |
renderFormComponent(IMarkupWriter writer,
IRequestCycle cycle) |
protected void |
rewindFormComponent(IMarkupWriter writer,
IRequestCycle cycle) |
void |
updateSelection(java.lang.Object value)
Invoked by the
Radio which is selected to update the property bound to the selected
parameter. |
getForm, getIdParameter, getName, renderComponent, renderDelegateAttributes, renderDelegatePrefix, renderDelegateSuffix, renderIdAttribute, setClientId, setForm, setName, setName
addAsset, addBody, addComponent, checkActiveLock, enterActiveState, finishLoad, finishLoad, format, format, format, format, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getComponent, getComponents, getContainedComponent, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isInActiveState, isParameterBound, isRendering, pageEndRender, render, renderBody, renderInformalParameters, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getValidators
getClientId, getDisplayName, getForm, getName, isDisabled, setName
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainedComponent, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isRendering, renderBody, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty
public RadioGroup()
public static RadioGroup get(IRequestCycle cycle)
public int getNextOptionId()
public boolean isRewinding()
public boolean isSelection(java.lang.Object value)
Radio
during rendering to determine if it should be marked 'checked'.public void updateSelection(java.lang.Object value)
Radio
which is selected to update the property bound to the selected
parameter.public boolean isSelected(int option)
Radio
components when rewinding to see if their value was submitted.protected void prepareForRender(IRequestCycle cycle)
AbstractComponent
AbstractComponent.render(IMarkupWriter, IRequestCycle)
to prepare the component to render.
This implementation sets JavaBeans properties from matching bound parameters. This
implementation does nothing.prepareForRender
in class AbstractComponent
AbstractComponent.prepareForRender(org.apache.tapestry.IRequestCycle)
protected void cleanupAfterRender(IRequestCycle cycle)
AbstractComponent
AbstractComponent.render(IMarkupWriter, IRequestCycle)
after the component renders. This
implementation does nothing.cleanupAfterRender
in class AbstractComponent
AbstractComponent.cleanupAfterRender(org.apache.tapestry.IRequestCycle)
protected void renderFormComponent(IMarkupWriter writer, IRequestCycle cycle)
renderFormComponent
in class AbstractFormComponent
org.apache.tapestry.form.AbstractRequirableField#renderFormComponent(org.apache.tapestry.IMarkupWriter,
org.apache.tapestry.IRequestCycle)
protected void rewindFormComponent(IMarkupWriter writer, IRequestCycle cycle)
public abstract ValidatableFieldSupport getValidatableFieldSupport()
public boolean isRequired()
AbstractFormComponent
isRequired
in interface IFormComponent
isRequired
in class AbstractFormComponent
AbstractFormComponent.isRequired()
protected boolean getCanTakeFocus()
getCanTakeFocus
in class AbstractFormComponent
protected boolean getAlwaysRenderBodyOnRewind()
AbstractFormComponent
AbstractFormComponent.rewindFormComponent(IMarkupWriter, IRequestCycle)
should leave this method returning
false. Remember that if the component is disabled
then
AbstractFormComponent.rewindFormComponent(IMarkupWriter, IRequestCycle)
won't be invoked.getAlwaysRenderBodyOnRewind
in class AbstractFormComponent
org.apache.tapestry.form.AbstractFormComponent#getRenderBodyOnRewind()