org.apache.struts2.showcase.jsf
Class JsfEmployeeAction
java.lang.Object
com.opensymphony.xwork2.ActionSupport
org.apache.struts2.showcase.action.AbstractCRUDAction
org.apache.struts2.showcase.action.EmployeeAction
org.apache.struts2.showcase.jsf.JsfEmployeeAction
- All Implemented Interfaces:
- Action, LocaleProvider, Preparable, TextProvider, Validateable, 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
|
Constructor Summary |
JsfEmployeeAction()
Creating a default employee and main skill, since the JSF EL can't handle
creating new objects as necessary |
| 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 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 |
JsfEmployeeAction
public JsfEmployeeAction()
- Creating a default employee and main skill, since the JSF EL can't handle
creating new objects as necessary
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-2010 Apache Software Foundation. All Rights Reserved.