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, 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
 Collection getAvailableItems()
          Returning a List because the JSF dataGrid can't handle a Set for some reason
 Map getAvailableLevelsAsMap()
          Converting the list into a map
 Map<String,String> getAvailablePositionsAsMap()
          Changing the String array into a Map
 Map<String,String> getAvailableSkills()
          Converting the Skill object list into a map
 List<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, hasKey, input, pause, setActionErrors, setActionMessages, setContainer, 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 Collection getAvailableItems()
Returning a List because the JSF dataGrid can't handle a Set for some reason

Overrides:
getAvailableItems in class AbstractCRUDAction

getAvailablePositionsAsMap

public Map<String,String> getAvailablePositionsAsMap()
Changing the String array into a Map


getAvailableLevelsAsMap

public Map getAvailableLevelsAsMap()
Converting the list into a map


getAvailableSkills

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


getSelectedSkillsAsList

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



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