org.olat.core.gui.control.generic.choice
Class ChoiceController

java.lang.Object
  extended by org.olat.core.gui.control.DefaultController
      extended by org.olat.core.gui.control.controller.BasicController
          extended by org.olat.core.gui.components.form.flexible.impl.FormBasicController
              extended by org.olat.core.gui.control.generic.choice.ChoiceController
All Implemented Interfaces:
Controller, ControllerEventListener, Disposable

public class ChoiceController
extends FormBasicController

Description:
Multiple/single choice controller with at least a Submit FormItem.

One could add a Reset FormItem, if neccessary. (see: addReset() method)

Initial Date: 06.08.2007

Author:
Lavinia Dumitrescu

Field Summary
 
Fields inherited from class org.olat.core.gui.components.form.flexible.impl.FormBasicController
LAYOUT_CUSTOM, LAYOUT_DEFAULT, LAYOUT_HORIZONTAL, LAYOUT_VERTICAL
 
Constructor Summary
ChoiceController(UserRequest ureq, WindowControl wControl, java.lang.String[] keys, java.lang.String[] translatedKeys, java.lang.String[] selectedKeys, boolean singleSelection, boolean layoutVertical, java.lang.String submitI18nKey)
           
 
Method Summary
 void addReset(java.lang.String i18nKey)
          Adds a Reset FormItem to the current FormLayoutContainer.
 java.util.List<java.lang.String> getSelectedEntries()
          Gets the list of the selected entry's keys.
 
Methods inherited from class org.olat.core.gui.components.form.flexible.impl.FormBasicController
dispose, event
 
Methods inherited from class org.olat.core.gui.control.DefaultController
addControllerListener, addLoggingResourceable, dispatchEvent, dispatchEvent, getControllerCount, getInitialComponent, getUserActivityLogger, getWindowControlForDebug, isDisposed, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChoiceController

public ChoiceController(UserRequest ureq,
                        WindowControl wControl,
                        java.lang.String[] keys,
                        java.lang.String[] translatedKeys,
                        java.lang.String[] selectedKeys,
                        boolean singleSelection,
                        boolean layoutVertical,
                        java.lang.String submitI18nKey)
Parameters:
ureq -
wControl -
keys -
translatedKeys -
selectedKeys -
singleSelection -
layoutVertical -
submitI18nKey -
Method Detail

addReset

public void addReset(java.lang.String i18nKey)
Adds a Reset FormItem to the current FormLayoutContainer.

Parameters:
i18nKey -

getSelectedEntries

public java.util.List<java.lang.String> getSelectedEntries()
Gets the list of the selected entry's keys.

Do call this at event reception!

Returns:
a not null selected keys List.