org.apache.tapestry.form
Class SelectPropertySelectionRenderer

java.lang.Object
  extended by org.apache.tapestry.form.SelectPropertySelectionRenderer
All Implemented Interfaces:
IPropertySelectionRenderer

public class SelectPropertySelectionRenderer
extends Object
implements IPropertySelectionRenderer

Implementation of IPropertySelectionRenderer that produces a <select> element (containing <option> elements).

Version:
$Id: SelectPropertySelectionRenderer.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship

Constructor Summary
SelectPropertySelectionRenderer()
           
 
Method Summary
 void beginRender(PropertySelection component, IMarkupWriter writer, IRequestCycle cycle)
          Writes the <select> element.
 void endRender(PropertySelection component, IMarkupWriter writer, IRequestCycle cycle)
          Closes the <select> element.
 void renderOption(PropertySelection component, IMarkupWriter writer, IRequestCycle cycle, IPropertySelectionModel model, Object option, int index, boolean selected)
          Writes an <option> element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectPropertySelectionRenderer

public SelectPropertySelectionRenderer()
Method Detail

beginRender

public void beginRender(PropertySelection component,
                        IMarkupWriter writer,
                        IRequestCycle cycle)
Writes the <select> element. If the PropertySelection is disabled then a disabled attribute is written into the tag (though Navigator 4 will ignore this).

Specified by:
beginRender in interface IPropertySelectionRenderer

endRender

public void endRender(PropertySelection component,
                      IMarkupWriter writer,
                      IRequestCycle cycle)
Closes the <select> element.

Specified by:
endRender in interface IPropertySelectionRenderer

renderOption

public void renderOption(PropertySelection component,
                         IMarkupWriter writer,
                         IRequestCycle cycle,
                         IPropertySelectionModel model,
                         Object option,
                         int index,
                         boolean selected)
Writes an <option> element.

Specified by:
renderOption in interface IPropertySelectionRenderer