|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mycompany.expense.EntryHandler
This class contains properties and methods for the JSF components in the report entry area of the sample expense report aplication.
Field Summary | |
private ReportEntry |
currentEntry
|
private java.util.List |
expenseTypeChoices
|
private java.util.Map |
expenseTypes
|
private boolean |
includeSpecial
|
private ReportHandler |
reportHandler
|
private java.util.List |
specialChoices
|
private java.util.Map |
specialTypes
|
Constructor Summary | |
EntryHandler()
|
Method Summary | |
java.lang.String |
add()
Adds the current entry to the current report by calling the addEntry() method on the ReportHandler. |
java.util.List |
getCurrentChoices()
Returns a List with SelectItem instances for the expense type choices, including the special choices if the "includeSpecial" flag is set to "true". |
ReportEntry |
getCurrentEntry()
Returns the current ReportEntry instance, or a new instance if there's no current instance. |
java.util.List |
getExpenseTypeChoices()
Returns a List with SelectItem instances for the standard expense type choices. |
java.util.List |
getI18nChoices()
Returns a List with SelectItem instances matching the standard expense type choices with labels localized for the view's locale, from a resource bundle with the base name "entryTypes". |
private java.lang.String |
getResource(java.util.ResourceBundle bundle,
java.lang.String key)
Returns the resource matching the provided key after replacing all spaces with underscores, or a String containing the key embedded in question marks if no resource matches the key. |
private java.util.List |
getSpecialChoices()
Returns a List with SelectItem instances for the special expense type choices. |
void |
setExpenseTypes(java.util.Map expenseTypes)
Sets the standard expense type choice values. |
void |
setReportHandler(ReportHandler reportHandler)
Sets a reference to the ReportHandler that this instance interacts with. |
void |
setSpecialTypes(java.util.Map specialTypes)
Sets the special expense type choice values. |
java.lang.String |
toggleTypes()
Toggles the value of the "includeSpecial" flag. |
void |
toggleTypes(javax.faces.event.ValueChangeEvent event)
Toggles the value of the "includeSpecial" flag. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private ReportHandler reportHandler
private ReportEntry currentEntry
private java.util.Map expenseTypes
private java.util.List expenseTypeChoices
private java.util.Map specialTypes
private java.util.List specialChoices
private boolean includeSpecial
Constructor Detail |
public EntryHandler()
Method Detail |
public void setReportHandler(ReportHandler reportHandler)
public void setExpenseTypes(java.util.Map expenseTypes)
public void setSpecialTypes(java.util.Map specialTypes)
public java.util.List getExpenseTypeChoices()
public java.util.List getCurrentChoices()
public java.util.List getI18nChoices()
public ReportEntry getCurrentEntry()
public java.lang.String add()
public java.lang.String toggleTypes()
public void toggleTypes(javax.faces.event.ValueChangeEvent event)
private java.util.List getSpecialChoices()
private java.lang.String getResource(java.util.ResourceBundle bundle, java.lang.String key)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |