org.apache.struts2.showcase.jsf
Class JsfEmployeeAction

java.lang.Object
  extended by com.opensymphony.xwork2.ActionSupport
      extended by org.apache.struts2.showcase.action.AbstractCRUDAction
          extended by org.apache.struts2.showcase.action.EmployeeAction
              extended by org.apache.struts2.showcase.jsf.JsfEmployeeAction
All Implemented Interfaces:
com.opensymphony.xwork2.Action, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.Preparable, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, com.opensymphony.xwork2.ValidationAware, java.io.Serializable

public class JsfEmployeeAction
extends EmployeeAction

Overriding the EmployeeAction to main provide getters returning the data in the form required by the JSF components

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.struts2.showcase.action.EmployeeAction
employeeDao
 
Fields inherited from class com.opensymphony.xwork2.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork2.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
JsfEmployeeAction()
          Creating a default employee and main skill, since the JSF EL can't handle creating new objects as necessary
 
Method Summary
 java.util.Collection getAvailableItems()
          Returning a List because the JSF dataGrid can't handle a Set for some reason
 java.util.Map getAvailableLevelsAsMap()
          Converting the list into a map
 java.util.Map<java.lang.String,java.lang.String> getAvailablePositionsAsMap()
          Changing the String array into a Map
 java.util.Map<java.lang.String,java.lang.String> getAvailableSkills()
          Converting the Skill object list into a map
 java.util.List<java.lang.String> getSelectedSkillsAsList()
          Gets the selected Skill objects as a list
 void setSkillDao(SkillDao skillDao)
           
 
Methods inherited from class org.apache.struts2.showcase.action.EmployeeAction
execute, getAvailableLevels, getAvailablePositions, getCurrentEmployee, getDao, getEmpId, getSelectedSkills, prepare, save, setCurrentEmployee, setEmpId, setEmployeeDao, setSelectedSkills
 
Methods inherited from class org.apache.struts2.showcase.action.AbstractCRUDAction
delete, fetch, getToDelete, list, setToDelete
 
Methods inherited from class com.opensymphony.xwork2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, doDefault, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, input, pause, setActionErrors, setActionMessages, setFieldErrors, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsfEmployeeAction

public JsfEmployeeAction()
Creating a default employee and main skill, since the JSF EL can't handle creating new objects as necessary

Method Detail

setSkillDao

public void setSkillDao(SkillDao skillDao)

getAvailableItems

public java.util.Collection getAvailableItems()
Returning a List because the JSF dataGrid can't handle a Set for some reason

Overrides:
getAvailableItems in class AbstractCRUDAction

getAvailablePositionsAsMap

public java.util.Map<java.lang.String,java.lang.String> getAvailablePositionsAsMap()
Changing the String array into a Map


getAvailableLevelsAsMap

public java.util.Map getAvailableLevelsAsMap()
Converting the list into a map


getAvailableSkills

public java.util.Map<java.lang.String,java.lang.String> getAvailableSkills()
Converting the Skill object list into a map


getSelectedSkillsAsList

public java.util.List<java.lang.String> getSelectedSkillsAsList()
Gets the selected Skill objects as a list



Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.