Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.tapestry.form
Class PropertySelection  view PropertySelection download PropertySelection.java

java.lang.Object
  extended byorg.apache.hivemind.impl.BaseLocatable
      extended byorg.apache.tapestry.AbstractComponent
          extended byorg.apache.tapestry.form.AbstractFormComponent
              extended byorg.apache.tapestry.form.PropertySelection
All Implemented Interfaces:
org.apache.tapestry.IComponent, IFormComponent, org.apache.tapestry.IRender, org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder

public abstract class PropertySelection
extends AbstractFormComponent

A component used to render a drop-down list of options that the user may select. [Component Reference]

Earlier versions of PropertySelection (through release 2.2) were more flexible, they included a renderer property that controlled how the selection was rendered. Ultimately, this proved of little value and this portion of functionality was deprecated in 2.3 and will be removed in 2.3.

Typically, the values available to be selected are defined using an org.apache.commons.lang.enum.Enum. A PropertySelection is dependent on an IPropertySelectionModel to provide the list of possible values.

Often, this is used to select a particular org.apache.commons.lang.enum.Enum to assign to a property; the EnumPropertySelectionModel class simplifies this.


Field Summary
static com.cortexeb.tools.clover.d __CLOVER_141_0
           
static IPropertySelectionRenderer DEFAULT_RADIO_RENDERER
          A shared instance of RadioPropertySelectionRenderer.
static IPropertySelectionRenderer DEFAULT_SELECT_RENDERER
          A shared instance of SelectPropertySelectionRenderer.
 
Fields inherited from class org.apache.tapestry.form.AbstractFormComponent
__CLOVER_124_0
 
Fields inherited from class org.apache.tapestry.AbstractComponent
__CLOVER_0_0
 
Fields inherited from class org.apache.hivemind.impl.BaseLocatable
 
Constructor Summary
PropertySelection()
           
 
Method Summary
abstract  IPropertySelectionModel getModel()
           
abstract  IPropertySelectionRenderer getRenderer()
           
abstract  boolean getSubmitOnChange()
           
abstract  java.lang.Object getValue()
           
abstract  boolean isDisabled()
          Returns true if this PropertySelection's disabled parameter yields true.
private  boolean isEqual(java.lang.Object left, java.lang.Object right)
           
protected  void renderComponent(org.apache.tapestry.IMarkupWriter writer, org.apache.tapestry.IRequestCycle cycle)
          Renders the component, much of which is the responsiblity of the renderer.
private  void renderWithRenderer(org.apache.tapestry.IMarkupWriter writer, org.apache.tapestry.IRequestCycle cycle, IPropertySelectionRenderer renderer)
          Renders the property selection using a IPropertySelectionRenderer.
abstract  void setValue(java.lang.Object value)
           
 
Methods inherited from class org.apache.tapestry.form.AbstractFormComponent
getDisplayName, getForm, getForm, getName, setForm, setName
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, cleanupAfterRender, finishLoad, finishLoad, format, format, format, format, formatString, formatString, formatString, formatString, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getChangeObserver, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, getString, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainer, setId, setNamespace, setPage, setProperty, setSpecification, toString
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addBody, addComponent, finishLoad, getAsset, getAssets, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, getString, renderBody, setBinding, setContainer, setId, setNamespace, setPage, setProperty, setSpecification
 
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
 

Field Detail

__CLOVER_141_0

public static com.cortexeb.tools.clover.d __CLOVER_141_0

DEFAULT_SELECT_RENDERER

public static final IPropertySelectionRenderer DEFAULT_SELECT_RENDERER
A shared instance of SelectPropertySelectionRenderer.


DEFAULT_RADIO_RENDERER

public static final IPropertySelectionRenderer DEFAULT_RADIO_RENDERER
A shared instance of RadioPropertySelectionRenderer.

Constructor Detail

PropertySelection

public PropertySelection()
Method Detail

renderComponent

protected void renderComponent(org.apache.tapestry.IMarkupWriter writer,
                               org.apache.tapestry.IRequestCycle cycle)
Renders the component, much of which is the responsiblity of the renderer. The possible options, thier labels, and the values to be encoded in the form are provided by the model.


renderWithRenderer

private void renderWithRenderer(org.apache.tapestry.IMarkupWriter writer,
                                org.apache.tapestry.IRequestCycle cycle,
                                IPropertySelectionRenderer renderer)
Renders the property selection using a IPropertySelectionRenderer. Support for this will be removed in 2.3.


isEqual

private boolean isEqual(java.lang.Object left,
                        java.lang.Object right)

getModel

public abstract IPropertySelectionModel getModel()

getRenderer

public abstract IPropertySelectionRenderer getRenderer()

getSubmitOnChange

public abstract boolean getSubmitOnChange()
Since:
2.2

getValue

public abstract java.lang.Object getValue()
Since:
2.2

setValue

public abstract void setValue(java.lang.Object value)
Since:
2.2

isDisabled

public abstract boolean isDisabled()
Returns true if this PropertySelection's disabled parameter yields true. The corresponding HTML control(s) should be disabled.