|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectProcessPopulate
public class ProcessPopulate
Implement the processPopulate stage of the Struts / PageFlow request
processing lifecycle. The populate(HttpServletRequest, HttpServletResponse, ActionForm, boolean)
method is
invoked in order to take request parameters from the HttpServletRequest
use the key / value pairs from the request to perform an update to the underlying
JavaBean objects.
Updates are performed on a key / value pair if the key is an expression; otherwise,
the updates are delegated to the Struts processPopulate infrastructure.
Nested Class Summary | |
---|---|
static class |
ProcessPopulate.ExpressionUpdateNode
An inner class that represnts the data that will be used to perform an update. |
Field Summary | |
---|---|
static String |
IDMAP_PARAMETER_NAME
This defines the name of the parameter that will contain the NetUI ID map.. |
Constructor Summary | |
---|---|
ProcessPopulate()
|
Method Summary | |
---|---|
static void |
populate(HttpServletRequest request,
HttpServletResponse response,
ActionForm form,
boolean requestHasPopulated)
Use the request parameters to populate all properties that have expression keys into the underlying JavaBeans. |
static void |
registerPrefixHandler(String prefix,
RequestParameterHandler handler)
Register a RequestParameterHandler that is added to handle a
particular prefix which be present as a prefix to a request parameter
key. |
static String |
writeHandlerName(String handler,
String expression)
Write the handler name specified onto the given expression. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String IDMAP_PARAMETER_NAME
Constructor Detail |
---|
public ProcessPopulate()
Method Detail |
---|
public static void registerPrefixHandler(String prefix, RequestParameterHandler handler)
RequestParameterHandler
that is added to handle a
particular prefix which be present as a prefix to a request parameter
key. For keys that match the prefix, the key / value from the request
are put in an ProcessPopulate.ExpressionUpdateNode
struct and handed to the
RequestParameterHandler
for processing. The returned ProcessPopulate.ExpressionUpdateNode
is used to perform an expression update.
prefix
- the String prefix that will be appended to request paramters that
should pass through the RequestParameterHandler
before being updated.handler
- the handler that should handle all request paramters with
the given prefix
public static String writeHandlerName(String handler, String expression)
public static void populate(HttpServletRequest request, HttpServletResponse response, ActionForm form, boolean requestHasPopulated) throws ServletException
java.util.Map
of objects that will be consumed by
Struts processPopulate. This includes all request attributes that
were not expressions
request
- the current HttpServletRequest
form
- if this request references an action and it has an ActionForm
associated with it, then the form
parameter is non-null.
ServletException
- when an error occurs in populating data after
the request; failure here can be caused by failures in creating
or executing update expressions.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |