|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.rave.web.ui.component.util.event.Handler
public class Handler
This class contains the information necessary to invoke a Handler. The
HandlerDefinition
class provides a definition of how to invoke
a Handler, this class uses that information with in conjuction with
information provided in this class to execute the handler
method. This class typically will hold input values and
specify where output should be stored.
The handler method to be invoked must have the following method signature:
public void beginDisplay(HandlerContext handlerCtx)
void
above can return a value. Depending on the type of
event, return values may be handled differently.
Constructor Summary | |
---|---|
Handler(HandlerDefinition handlerDef)
Constructor |
Method Summary | |
---|---|
HandlerDefinition |
getHandlerDefinition()
|
protected java.util.Map |
getInputMap()
This method returns a Map of NVPs representing the input to this handler. |
java.lang.Object |
getInputValue(HandlerContext ctx,
java.lang.String name)
This method returns the value for the named input. |
java.lang.Object |
getInputValue(java.lang.String name)
This method simply returns the named input value, null if not found. |
OutputMapping |
getOutput(java.lang.String name)
|
java.lang.Object |
getOutputValue(HandlerContext context,
java.lang.String name)
This method retrieves an output value. |
java.lang.Object |
invoke(HandlerContext handlerContext)
|
boolean |
isStatic()
This method determines if the handler is static. |
protected void |
setHandlerDefinition(HandlerDefinition handler)
This method sets the HandlerDefinition used by this Handler. |
void |
setInputValue(java.lang.String name,
java.lang.Object value)
|
void |
setOutputMapping(java.lang.String outputName,
java.lang.String targetKey,
java.lang.String targetType)
This method adds a new OutputMapping to this handler. |
void |
setOutputValue(HandlerContext context,
java.lang.String name,
java.lang.Object value)
This method stores an output value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Handler(HandlerDefinition handlerDef)
Method Detail |
---|
public HandlerDefinition getHandlerDefinition()
protected void setHandlerDefinition(HandlerDefinition handler)
This method sets the HandlerDefinition used by this Handler.
public void setInputValue(java.lang.String name, java.lang.Object value)
protected java.util.Map getInputMap()
This method returns a Map of NVPs representing the input to this handler.
public java.lang.Object getInputValue(java.lang.String name)
This method simply returns the named input value, null if not found. It will not attempt to resolve $...{...} expressions or do modifications of any kind. If you are looking for a method to do these types of operations, try:
getInputValue(FacesContext, String).
name
- The name used to identify the input value.public java.lang.Object getInputValue(HandlerContext ctx, java.lang.String name)
This method returns the value for the named input. Input values are not stored in this HandlerContext itself, but in the Handler. If you are trying to set input values for a handler, you must create a new Handler object and set its input values.
This method attempts to resolve $...{...} expressions. It also will return the default value if the value is null. If you don't want these things to happen, look at Handler.getInputValue(String).
name
- The input name
public java.lang.Object getOutputValue(HandlerContext context, java.lang.String name)
This method retrieves an output value. Output values are stored in the location specified by the OutputType in the Handler.
context
- The HandlerContextname
- The output name
public void setOutputValue(HandlerContext context, java.lang.String name, java.lang.Object value)
This method stores an output value. Output values are stored as specified by the OutputType in the Handler.
context
- The HandlerContextname
- The name the Handler uses for the outputvalue
- The value to setpublic void setOutputMapping(java.lang.String outputName, java.lang.String targetKey, java.lang.String targetType)
This method adds a new OutputMapping to this handler. An OutputMapping allows the handler to return a value and have it "mapped" to the location of your choice. The "outputType" corresponds to a registered OutputType (see OutputTypeManager).
outputName
- The Handler's name for the output valuetargetKey
- The 'key' the OutputType uses to store the outputtargetType
- The OutputType implementation map the outputpublic OutputMapping getOutput(java.lang.String name)
public boolean isStatic()
This method determines if the handler is static.
public java.lang.Object invoke(HandlerContext handlerContext) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |