XPUSP - Home

br.usp.ime.xpusp.modules.screens
Class SelectDisciplines

java.lang.Object
  |
  +--org.apache.turbine.modules.Assembler
        |
        +--org.apache.turbine.modules.Screen
              |
              +--org.apache.turbine.modules.screens.TemplateScreen
                    |
                    +--org.apache.turbine.modules.screens.VelocityScreen
                          |
                          +--br.usp.ime.xpusp.modules.screens.UnsecureScreen
                                |
                                +--br.usp.ime.xpusp.modules.screens.SelectDisciplines

public class SelectDisciplines
extends UnsecureScreen

Screens used to select disciplines. Note that department code is only checked if there is a unit and so forth.


Parameters
Parameter Name Parameter Type Parameter Description
unitid int The unit
departmentcode String The department
returnurl String the url that should be displayed as a return url
Context
Context Name Context Type Context Description
returnurl String the url send as returnurl param
units Vector of Units ordered by name If unitid is not present
unit Unit The unit choosen by unitid (only if present)
departments Vector of Departments ordered by name If unitid is present and departmentcode is not, all the departments for this unit
department Department The dept choosen by departmentcode (only if present)
disciplines A vector of disciplines for the selected department orderd by name read before

SourceForge LogoSource Forge Info
CVS File :SelectDisciplines.java
User :krico
Version :1.3
Date :2002/05/07 20:28:11


Fields inherited from class org.apache.turbine.modules.Screen
filter, minFilter
 
Constructor Summary
SelectDisciplines()
           
 
Method Summary
 boolean checkForDepartment(org.apache.turbine.util.RunData data, org.apache.velocity.context.Context context)
          This method assumes there is a unit on the context.
 boolean checkForUnit(org.apache.turbine.util.RunData data, org.apache.velocity.context.Context context)
          Check if there is a unit selected and if so, grab that unit, put it on the context and return true.
 void doBuildTemplate(org.apache.turbine.util.RunData data, org.apache.velocity.context.Context context)
           
 java.util.Vector getUnits()
           
 
Methods inherited from class org.apache.turbine.modules.screens.VelocityScreen
buildTemplate, doBuildTemplate, getContext
 
Methods inherited from class org.apache.turbine.modules.screens.TemplateScreen
doBuild, doPostBuildTemplate, doRedirect, doRedirect, setTemplate
 
Methods inherited from class org.apache.turbine.modules.Screen
, build, getLayout, htmlFilter, htmlMinFilter, prepareText, prepareTextMinimum, setLayout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

SelectDisciplines

public SelectDisciplines()
Method Detail

doBuildTemplate

public void doBuildTemplate(org.apache.turbine.util.RunData data,
                            org.apache.velocity.context.Context context)
Overrides:
doBuildTemplate in class UnsecureScreen

checkForDepartment

public boolean checkForDepartment(org.apache.turbine.util.RunData data,
                                  org.apache.velocity.context.Context context)
                           throws java.lang.Exception
This method assumes there is a unit on the context. Then it places the departments in the context ordered by name (only the unit's depts). If there is a departmentcode this department is fetched (from the unit) and placed on the context
Returns:
true only if there is a dept and it was found

checkForUnit

public boolean checkForUnit(org.apache.turbine.util.RunData data,
                            org.apache.velocity.context.Context context)
                     throws java.lang.Exception
Check if there is a unit selected and if so, grab that unit, put it on the context and return true.
Returns:
true if there is a unit selected false otherwise

getUnits

public java.util.Vector getUnits()
                          throws java.lang.Exception

XPUSP - Home