|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectshared.HelperBaseCh4
shared.HelperBaseCh5
shared.HelperBaseCh6
public abstract class HelperBaseCh6
Helper base for Chapters 6 and 7.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class shared.HelperBaseCh4 |
|---|
HelperBaseCh4.SessionData |
| Field Summary | |
|---|---|
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
checked
Map of checked form elements. |
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
selected
Map of selected form elements. |
| Fields inherited from class shared.HelperBaseCh4 |
|---|
logger, request, response |
| Constructor Summary | |
|---|---|
HelperBaseCh6(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Call the super class to initialise the request and response. |
|
| Method Summary | |
|---|---|
void |
addChecked(java.lang.String group,
java.lang.String item)
Add an entry in the checked map for the group and item. |
void |
addChoice(java.lang.String list,
java.lang.String item,
AttributeType type)
Add an entry in the selected or checked map for the list and item. |
void |
addSelected(java.lang.String list,
java.lang.String item)
Add an entry in the selected map for the group and item. |
void |
clearMaps()
Clear all the sub-maps from the checked and selected maps. |
void |
clearProperty(java.lang.String property,
AttributeType type)
Delete the sub-map for a property. |
java.util.Map |
getChecked()
Accessor for the checked map, to allow JSPs to access it. |
java.util.Map |
getSelected()
Accessor for the selected map, to allow JSPs to access it. |
protected java.lang.Object |
invokeGetter(java.lang.Object obj,
java.lang.reflect.Method method)
Call the getter. |
protected void |
setCheckedAndSelected(java.lang.Object data)
Fill the checked map and selected map with values from the query string for bean properties that have been marked with the SetByAttribute annotation. |
protected void |
setCheckedAndSelected(java.lang.Object data,
java.lang.Class clazz)
Fill the checked map and selected map with values from the query string for bean properties that have been marked with the SetByAttribute annotation. |
| Methods inherited from class shared.HelperBaseCh5 |
|---|
getErrors, isValid, isValidProperty, setErrors |
| Methods inherited from class shared.HelperBaseCh4 |
|---|
addHelperToSession, addHelperToSession, copyFromSession, doGet, doPost, executeButtonMethod, executeButtonMethod, fillBeanFromRequest, invokeButtonMethod, writeError |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> checked
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> selected
| Constructor Detail |
|---|
public HelperBaseCh6(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
request - Request information encapsulated in a Java objectresponse - Response information encapsulated in a Java object| Method Detail |
|---|
protected void setCheckedAndSelected(java.lang.Object data)
data - The bean that contains the data
protected void setCheckedAndSelected(java.lang.Object data,
java.lang.Class clazz)
data - The bean that contains the dataclazz - The class of the bean that contains the data
protected java.lang.Object invokeGetter(java.lang.Object obj,
java.lang.reflect.Method method)
obj - The object that contains the method to invokemethod - The method to invoke
public java.util.Map getChecked()
public java.util.Map getSelected()
public void addChecked(java.lang.String group,
java.lang.String item)
group - The name of the HTML elementitem - The value of the HTML element
public void addSelected(java.lang.String list,
java.lang.String item)
list - The name of the HTML elementitem - The value of the HTML element
public void addChoice(java.lang.String list,
java.lang.String item,
AttributeType type)
list - The name of the HTML elementitem - The value of the HTML elementtype - The type of element: checked or selected
public void clearProperty(java.lang.String property,
AttributeType type)
property - The name of the HTML elementtype - The type of the HTML element: checked or selectedpublic void clearMaps()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||