org.sakaiproject.tool.section.jsf.backingbean
Class AddSectionsBean

java.lang.Object
  extended byorg.sakaiproject.tool.section.jsf.backingbean.InitializableBean
      extended byorg.sakaiproject.tool.section.jsf.backingbean.CourseDependentBean
          extended byorg.sakaiproject.tool.section.jsf.backingbean.AddSectionsBean
All Implemented Interfaces:
PhaseAware, Serializable

public class AddSectionsBean
extends CourseDependentBean
implements Serializable

Controls the add sections page.

Author:
Josh Holtzman
See Also:
Serialized Form

Nested Class Summary
 class AddSectionsBean.LocalSectionModel
           
 
Field Summary
 
Fields inherited from class org.sakaiproject.tool.section.jsf.backingbean.InitializableBean
messageBundle
 
Constructor Summary
AddSectionsBean()
           
 
Method Summary
 String addSections()
          Adds the sections, or generates validation messages for bad inputs.
 String getCategory()
           
 List getCategoryItems()
           
 int getNumToAdd()
           
 String getRowStyleClasses()
           
 List getSections()
           
 void init()
          JSF doesn't provide a way to configure an initialization method which will be called after the contructor and all framework setters.
 void processChangeSections(ValueChangeEvent event)
          Responds to a change in the sections selector in the UI.
 void setCategory(String category)
           
 void setNumToAdd(int numToAdd)
           
protected  boolean validationFails()
          Since the validation and conversion rules rely on the *relative* values of one component to another, we can't use JSF validators and converters.
 
Methods inherited from class org.sakaiproject.tool.section.jsf.backingbean.CourseDependentBean
getAllSiteSections, getCategoryName, getCourse, getMyEnrolledSections, getPrefs, getSectionCategories, getSectionManager, getSiteContext, getUsedCategories, getUserUid, isSectionEnrollmentMangementEnabled, isSectionManagementEnabled, isSectionOptionsManagementEnabled, isSectionTaManagementEnabled, isViewAllSectionsEnabled, isViewOwnSectionsEnabled
 
Methods inherited from class org.sakaiproject.tool.section.jsf.backingbean.InitializableBean
endProcessUpdates, endProcessValidators, isNotValidated, setConfigured, setNotValidated, startRenderResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddSectionsBean

public AddSectionsBean()
Method Detail

init

public void init()
Description copied from class: InitializableBean
JSF doesn't provide a way to configure an initialization method which will be called after the contructor and all framework setters. By convention, our backing beans use this method. It's triggered either by a Faces configuration file setting "configured" to true, or by a JSF component directly calling "startRenderResponse". For greater subclassing flexibility, the init method is not declared to be abstract.

Overrides:
init in class InitializableBean

processChangeSections

public void processChangeSections(ValueChangeEvent event)
Responds to a change in the sections selector in the UI.

Parameters:
event -

addSections

public String addSections()
Adds the sections, or generates validation messages for bad inputs.

Returns:

validationFails

protected boolean validationFails()
Since the validation and conversion rules rely on the *relative* values of one component to another, we can't use JSF validators and converters. So we check everything here.

Returns:

getCategory

public String getCategory()

setCategory

public void setCategory(String category)

getNumToAdd

public int getNumToAdd()

setNumToAdd

public void setNumToAdd(int numToAdd)

getCategoryItems

public List getCategoryItems()

getSections

public List getSections()

getRowStyleClasses

public String getRowStyleClasses()