|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.taggercat.handlers.AbstractRequestHandler
com.taggercat.handlers.ExecuteMethodRequestHandler
public class ExecuteMethodRequestHandler
This request handler is used to execute a method on a scope accessible
object, A.K.A. an Action or Managed Bean.
You can use this request handler to call methods on objects
rather than always needing to create a custom request handler.
The method to execute can simply be set with the actionName parameter,
or optionally a request parameter named executeMethodName:
The dot delimited name can optionally be prefixed with a scope identifier. The supported explicit scope identifiers are:
Example method names
Example 1: sessionScope.CustomerBean.primaryContact.notify
Processing Steps:
Calls to nested sub-objects can be to any level. For example"CustomerBean.orders.accounts.currentAccount.update.
Example 2: CustomerBean.primaryContact.notify
Processing Steps:
Example 3: CustomerBean.processOrder
Processing Steps:
The called method must meet the following requirements:
If the method signature accepting the HttpServletRequest and HttpServletResponse parameters is found, then that method is called with the current request and response objects. Otherwise, the no argument version is called. If the method returns "success" then the request has completed without error, and the response page is issued, or the next request handler in the request handler chain is called. Otherwise, the request has failed, and the error page is issued.

| Constructor Summary | |
|---|---|
ExecuteMethodRequestHandler()
|
|
| Method Summary | |
|---|---|
java.lang.String |
executeMethod(java.lang.Object startingObject,
java.lang.String scopedMethodName)
Executes the named method. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExecuteMethodRequestHandler()
| Method Detail |
|---|
public java.lang.String executeMethod(java.lang.Object startingObject,
java.lang.String scopedMethodName)
throws javax.servlet.ServletException
javax.servlet.ServletExceptionstartingObject - the source, or starting object to execute the method onscopedMethodName - the name of the scoped method of the form = "sessionScope.Test9.test8.test7.foo";
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||