com.tonbeller.wcf.selection
Class SelectionMgr

java.lang.Object
  extended bycom.tonbeller.wcf.selection.SelectionMgr
All Implemented Interfaces:
FormListener, RenderListener

public class SelectionMgr
extends java.lang.Object
implements FormListener, RenderListener

Selection Manager

Author:
av

Constructor Summary
SelectionMgr(Dispatcher dispatcher, Form form)
           
SelectionMgr(Dispatcher dispatcher, Form form, SelectionModel selectionModel)
           
 
Method Summary
 SelectionModel getSelectionModel()
          Returns the model.
 TitleProvider getTitleProvider()
          if set creates title attribute
 boolean isReadOnly()
           
 void renderButton(org.w3c.dom.Element parent, java.lang.Object obj)
          if selection is enabled adds a checkbox or radiobutton element to the parent.
 void revert(RequestContext context)
          reverts this component to model values
 void setReadOnly(boolean readOnly)
           
 void setSelectionModel(SelectionModel selectionModel)
          Sets the model.
 void setTitleProvider(TitleProvider provider)
          if set creates title attribute
 void startRendering(RequestContext context)
          must be called once before rendering
 void stopRendering()
          must be called once after rendering
 boolean validate(RequestContext context)
          validates user input and updates the model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectionMgr

public SelectionMgr(Dispatcher dispatcher,
                    Form form)

SelectionMgr

public SelectionMgr(Dispatcher dispatcher,
                    Form form,
                    SelectionModel selectionModel)
Method Detail

startRendering

public void startRendering(RequestContext context)
must be called once before rendering

Specified by:
startRendering in interface RenderListener

stopRendering

public void stopRendering()
must be called once after rendering

Specified by:
stopRendering in interface RenderListener

renderButton

public void renderButton(org.w3c.dom.Element parent,
                         java.lang.Object obj)
if selection is enabled adds a checkbox or radiobutton element to the parent.


getSelectionModel

public SelectionModel getSelectionModel()
Returns the model.

Returns:
SelectionModel

setSelectionModel

public void setSelectionModel(SelectionModel selectionModel)
Sets the model.


revert

public void revert(RequestContext context)
Description copied from interface: FormListener
reverts this component to model values

Specified by:
revert in interface FormListener

validate

public boolean validate(RequestContext context)
Description copied from interface: FormListener
validates user input and updates the model

Specified by:
validate in interface FormListener
Returns:
true if validation was successful

getTitleProvider

public TitleProvider getTitleProvider()
if set creates title attribute


setTitleProvider

public void setTitleProvider(TitleProvider provider)
if set creates title attribute


isReadOnly

public boolean isReadOnly()

setReadOnly

public void setReadOnly(boolean readOnly)