com.microstrategy.web.beans.WebEvent |
![]() |
This interface abstracts user interaction with a WebComponent
in
a Web application. Any user interaction may be viewed as an event.
In a Web application, a WebEvent
could appear as a URL link or
a HTML form data, or whatever appropriate to the Web application.
A WebEvent
is attached to a WebEventHandler
, which in
turn is associated with a particular WebComponent
.
The WebEventHandler
knows how to generate and handle its event.
A WebEvent
has a list of WebEvent.Argument
identified by their unique ID within an event handler,
which could also be uniquely identified by its own ID within an application.
Each Argument
may have many values.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | WebEvent.Argument | The Argument interface represents a WebEvent argument. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract String |
getArgumentName(int id)
Returns the argument name with the specified
id at index 0. | ||||||||||
abstract String |
getArgumentName(int id, int index)
Returns the argument name with the specified
id at the
specified index . | ||||||||||
abstract String |
getArgumentValue(int argumentID)
Returns the current value of the argument.
| ||||||||||
abstract String |
getArgumentValue(int argumentID, int index)
Returns the current value of the argument.
| ||||||||||
abstract int |
getArgumentValueCount(int argumentID)
Returns the number of values at different indices for the argument.
| ||||||||||
abstract Enumeration |
getArguments()
Returns an Enumeration over all the
WebEvent.Argument
in this WebEvent . | ||||||||||
abstract String |
getDeprecatedMessage()
If this event has been marked deprecated, this method returns instructions on the new usage (usually the alternate event). | ||||||||||
abstract String |
getFlatState()
| ||||||||||
abstract String |
getHiddenInputs(int paramType, int howMuchChildState)
This method is deprecated.
As of WU 8.0, replaced by
addEventInfo(WebEvent, int, int) .
Callers should first access a ParameterBuilder and pass it into
addEventInfo(WebEvent, int, int) to be populated with event information. To get a
ParameterBuilder object, see
newURIParameterBuilder() ,
newHiddenInputParameterBuilder() ,
DefaultHiddenInputBuilderImpl or
DefaultURIBuilderImpl .
| ||||||||||
abstract int |
getID()
Returns the event ID of this event.
| ||||||||||
abstract String |
getName()
Returns the name of this event.
| ||||||||||
abstract WebComponent |
getSource()
Returns the event source, a
WebComponent object which knows
how to generate and handle this event. | ||||||||||
abstract String |
getSourcePath()
Returns the path of a
WebComponent which knows how to generate
and handle this WebEvent. | ||||||||||
abstract String |
getTargetWindow()
returns the target specified for this event
| ||||||||||
abstract String |
getURLLink(int paramType)
This method is deprecated.
As of WU 8.0, replaced by
addEventInfo(WebEvent, int, int) .
Callers should first access a ParameterBuilder and pass it into
addEventInfo(WebEvent, int, int) to be populated with event information. To get a
ParameterBuilder object, see
newURIParameterBuilder() ,
newHiddenInputParameterBuilder() ,
DefaultHiddenInputBuilderImpl or
DefaultURIBuilderImpl .
| ||||||||||
abstract String |
getURLLink()
This method is deprecated.
As of WU 8.0, replaced by
addEventInfo(WebEvent, int, int) .
Callers should first access a ParameterBuilder and pass it into
addEventInfo(WebEvent, int, int) to be populated with event information. To get a
ParameterBuilder object, see
newURIParameterBuilder() ,
newHiddenInputParameterBuilder() ,
DefaultHiddenInputBuilderImpl or
DefaultURIBuilderImpl .
The caller can then use the toString() method to retrieve the string representation of all the parameters
Depending on the type of ParameterBuilder that is used, the string representation varies. For getting a url link, the caller should use the
DefaultURIBuilderImpl
| ||||||||||
abstract String |
getURLParameters()
This method is deprecated.
As of WU 8.0, replaced by
addEventInfo(WebEvent, int, int) .
Callers should first access a ParameterBuilder and pass it into addEventInfo(WebEvent, int, int)
to be populated with event information. | ||||||||||
abstract void |
initFromKeys(RequestKeys keys)
Initialize the event with the given request keys
| ||||||||||
abstract boolean |
initFromXML(String xml)
Initializes this event based on its specified XML definition.
| ||||||||||
abstract void | putArgument(int id, String name, String value) | ||||||||||
abstract void | putArgument(int id, String name) | ||||||||||
abstract void | putArgument(int id, String name, int required) | ||||||||||
abstract void |
setArgumentValue(int id, String value)
Sets a value to the argument with the specified
id at
index 0. | ||||||||||
abstract void |
setArgumentValue(int id, int index, String value)
Sets a value to the argument with the specified
id at the
specified index . | ||||||||||
abstract void |
setID(int id)
Sets an event id to the current
WebEvent . | ||||||||||
abstract void |
setSource(WebComponent source)
Sets a
WebComponent instance which knows how to generate
and handle this WebEvent. | ||||||||||
abstract void |
setSourcePath(String source)
Sets the path of a
WebComponent which knows how to generate
and handle this WebEvent. | ||||||||||
abstract void |
setTargetWindow(String target)
Sets the target attribute for this event.
|
Returns the argument name with the specified id
at index 0.
A WebEventHandler
uses this argument name to retrieve its
value from an RequestKeys
instance.
id | the argument ID. |
---|
Returns the argument name with the specified id
at the
specified index
. A WebEventHandler
uses this
argument name to retrieve its value from an RequestKeys
instance.
By default, if the an argument name at the given index is null, this method returns the string concatenation of the argument name at index 0, the underscore character '_', and the index value, i.e. arg_1. If the argument name at index 0 is also null, then a null string is returned.
id | an argument ID. |
---|---|
index | the index to an argument name. |
Returns the current value of the argument. The default value is returned if one is specified in the definition of this event.
If not, the value set explicitly is returned. If the value is set with multiple indices, then the value at index 0 is returned
If the argument is not found or no value is set, null is returned
argumentID | the ID of the argument |
---|
Returns the current value of the argument. The default value is returned if one is specified in the definition of this event.
If not, the value set explicitly is returned.
If the argument is not found or no value is set, null is returned
argumentID | ID of the argument |
---|---|
index | the index into the set of argument values |
Returns the number of values at different indices for the argument.
argumentID | ID of the argument |
---|
Returns an Enumeration over all the WebEvent.Argument
in this WebEvent
. The enumeration is backed up this event.
WebEvent.Argument.
If this event has been marked deprecated, this method returns instructions on the new usage (usually the alternate event). Null is returned if the event hasn't been deprecated.
FlatStateSerializer
representation of event. Structure is as follows:
id:nextStr, src:nextStr, [argName:nextStr, argValue:nextStr]*
This method is deprecated.
As of WU 8.0, replaced by addEventInfo(WebEvent, int, int)
.
Callers should first access a ParameterBuilder
and pass it into
addEventInfo(WebEvent, int, int)
to be populated with event information. To get a
ParameterBuilder
object, see
newURIParameterBuilder()
,
newHiddenInputParameterBuilder()
,
DefaultHiddenInputBuilderImpl
or
DefaultURIBuilderImpl
.
Returns HTML form hidden inputs for the current WebEvent
.
The format is like: <INPUT TYPE=HIDDEN NAME="" VALUE="" ID="" >.
If the paramType
is equal to
EnumParameterType.ParameterTypeEventOnly
, no source
component's state is included; otherwise, the states of the source
WebComponent
along with all its descendants are included.
paramType | a bitwise value from EnumParameterType indicating what to
include in the generated URL link. |
---|---|
howMuchChildState | how much state of EnumWebPersistableState to return from its children |
Returns the event ID of this event. The ID is unique within an event handler.
Returns the name of this event.
Returns the event source, a WebComponent
object which knows
how to generate and handle this event.
Returns the path of a WebComponent
which knows how to generate
and handle this WebEvent.
returns the target specified for this event
This method is deprecated.
As of WU 8.0, replaced by addEventInfo(WebEvent, int, int)
.
Callers should first access a ParameterBuilder
and pass it into
addEventInfo(WebEvent, int, int)
to be populated with event information. To get a
ParameterBuilder
object, see
newURIParameterBuilder()
,
newHiddenInputParameterBuilder()
,
DefaultHiddenInputBuilderImpl
or
DefaultURIBuilderImpl
.
Returns a URL link representing the current WebEvent
with the specified paramType
.
This method is equivalent to call
getURLLink(paramType, EnumWebPersistableState.TYPICAL_STATE_INFO)
paramType | a bitwise value indicating what to include in the generated URL link. |
---|
This method is deprecated.
As of WU 8.0, replaced by addEventInfo(WebEvent, int, int)
.
Callers should first access a ParameterBuilder
and pass it into
addEventInfo(WebEvent, int, int)
to be populated with event information. To get a
ParameterBuilder
object, see
newURIParameterBuilder()
,
newHiddenInputParameterBuilder()
,
DefaultHiddenInputBuilderImpl
or
DefaultURIBuilderImpl
.
The caller can then use the toString()
method to retrieve the string representation of all the parameters
Depending on the type of ParameterBuilder that is used, the string representation varies. For getting a url link, the caller should use the
DefaultURIBuilderImpl
Returns a URL link representing the current WebEvent
.
The generated URL link includes the target name, event id, event source,
as well as non-null arguments.
This method is equivalent to call
getURLLink(EnumParameterType.ParameterTypeSystem + EnumParameterType.ParameterTypeUserNonNull, EnumWebPersistableState.TYPICAL_STATE_INFO)
This method is deprecated.
As of WU 8.0, replaced by addEventInfo(WebEvent, int, int)
.
Callers should first access a ParameterBuilder
and pass it into addEventInfo(WebEvent, int, int)
to be populated with event information.
Returns a URL link including event id, event source and user arguments whose value is not null, but excluding the source component's state.
This method call is equivalent to call
getURLParameters(EnumParameterType.ParameterTypeSystem + EnumParameterType.ParameterTypeUserNonNull)
Initialize the event with the given request keys
keys | the request keys to be used by this event |
---|
Initializes this event based on its specified XML definition.
xml | an XML string representing a WebEvent . |
---|
Sets a value to the argument with the specified id
at
index 0. A new argument with null
name is created if there
is no such an argument at index 0.
id | an argument ID. |
---|---|
value | the argument value to set. |
Sets a value to the argument with the specified id
at the
specified index
. A new argument is created if there is no
such an argument.
The name of the new argument by default is the string concatenation of the argument name at index 0, the character underscore '_' and the index value, i.e. arg_1. If the argument at index 0 does not exist either, null is assigned.
id | an argument ID. |
---|---|
index | an index where the value is set. |
value | an argument value to set. |
Sets an event id to the current WebEvent
.
id | an event id to set. |
---|
Sets a WebComponent
instance which knows how to generate
and handle this WebEvent.
source | a WebComponent instance. |
---|
Sets the path of a WebComponent
which knows how to generate
and handle this WebEvent.
source | the path of a WebComponent |
---|
Sets the target attribute for this event. This is useful in redirecting the result of an action into a separate browser When a link for this event is generated, the target attribute is included if a non null value is set.