org.apache.tapestry.form
Class DefaultOptionRenderer

java.lang.Object
  extended by org.apache.tapestry.form.DefaultOptionRenderer
All Implemented Interfaces:
IOptionRenderer

public class DefaultOptionRenderer
extends Object
implements IOptionRenderer

The default implementation of IOptionRenderer which is used by the PropertySelection component if no other renderer is specified in the component parameters.


Field Summary
static IOptionRenderer DEFAULT_INSTANCE
          Default instance used by PropertySelection if no custom renderer is specified.
 
Constructor Summary
DefaultOptionRenderer()
           
 
Method Summary
protected  boolean isEqual(Object left, Object right)
           
 void renderOptions(IMarkupWriter writer, IRequestCycle cycle, IPropertySelectionModel model, Object selected)
          Called after the initial <select> tag has been rendered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_INSTANCE

public static final IOptionRenderer DEFAULT_INSTANCE
Default instance used by PropertySelection if no custom renderer is specified.

Constructor Detail

DefaultOptionRenderer

public DefaultOptionRenderer()
Method Detail

renderOptions

public void renderOptions(IMarkupWriter writer,
                          IRequestCycle cycle,
                          IPropertySelectionModel model,
                          Object selected)
Called after the initial <select> tag has been rendered. It is expected that implementations will then do whatever is necessary to render each option available in the model and defer writing the end </select> to the calling component.

Specified by:
renderOptions in interface IOptionRenderer
Parameters:
writer - The markup writer to use.
cycle - The associated cycle.
model - Model containing values / labels / etc..
selected - The currently selected object value, if any. Will be null if no value is currently selected.

isEqual

protected boolean isEqual(Object left,
                          Object right)


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.