public class

ServletEvent

extends GenericWebEvent
java.lang.Object
   ↳ com.microstrategy.web.beans.GenericWebEvent
     ↳ com.microstrategy.web.app.beans.ServletEvent

Class Overview

Title: ServletEvent. Description: This class extends the GenericWebEvent by providing a target page. This page is configured in the appBeanEvents.xml Company: MicroStrategy

Summary

[Expand]
Inherited Constants
From interface com.microstrategy.web.beans.WebEventTags
[Expand]
Inherited Fields
From class com.microstrategy.web.beans.GenericWebEvent
Public Constructors
ServletEvent()
Just calls super()
Public Methods
void addEventInfo(ParameterBuilder paramBldr, int eventElements, int howMuchChildState)
Adds event information into an existing ParameterBuilder instance.
RequestKeys getRequestKeys()
Returns a reference to the RequestKeys associated wih the event
String getSourcePath()
Extends getSourcePath by returning the path of the Source element as found in the RequestKeys.
String getTargetPage()
Returns the page the execution will be redirected to when the event is handled
boolean initFromRequest(RequestKeys keys)
Initialize the event with the given request keys
boolean initFromXML(Element node)
This method is deprecated. The ServletEventHandler is not responsible to read the xml structure.
void setID(int id)
Extends setID by filtering the request keys to use only the event and source of the given event id.
void setTargetPage(String page)
Sets the page the execution will be redirected to when the event is handled
Protected Methods
void init(EventInfo info)
[Expand]
Inherited Methods
From class com.microstrategy.web.beans.GenericWebEvent
From class java.lang.Object
From interface com.microstrategy.web.beans.WebEvent

Public Constructors

public ServletEvent ()

Just calls super()

Public Methods

public void addEventInfo (ParameterBuilder paramBldr, int eventElements, int howMuchChildState)

Adds event information into an existing ParameterBuilder instance. It is up to the supplied ParameterBuilder to determine how this information is serialized. Extends addEventInfo by automatically setting the value of the arguments if the Event has been initialized with a RequestKeys.
If the value of any of the Arguments of this event is found in the request, it will will automatically take that value.

Parameters
paramBldr The ParameterBuilder instance which has child state information added to it.
eventElements A bit mask value composed of constants from EnumEventElement. These determine what elements of the event is added.
howMuchChildState If children state is to be added, this parameter (whose values come from EnumWebPersistableState) determines how much state.

public RequestKeys getRequestKeys ()

Returns a reference to the RequestKeys associated wih the event

Returns
  • RequestKeys

public String getSourcePath ()

Extends getSourcePath by returning the path of the Source element as found in the RequestKeys.
If the SourcePath has not been specifically set for this event (by calling setSourcePath(), and if this Event has been initialized with a RequestKeys, then the event checks if the RequestKeys contains the URL_SOURCE_NAME and if so return it as the SourcePath.

Returns
  • the path to the WebComponent source of this event.

public String getTargetPage ()

Returns the page the execution will be redirected to when the event is handled

Returns
  • String the name of the page. This page should exist in the pageConfig.xml file

public boolean initFromRequest (RequestKeys keys)

Initialize the event with the given request keys

Parameters
keys the request keys to be used by this event
Returns
  • true

public boolean initFromXML (Element node)

This method is deprecated.
The ServletEventHandler is not responsible to read the xml structure.

Extendes initFromXml by reading a target attribute. If this node doesn't have a target attribute it returns false

Parameters
node the xmlNode with the event information
Returns
  • true if the node contains valid information. false otherwise

public void setID (int id)

Extends setID by filtering the request keys to use only the event and source of the given event id.

Parameters
id an event id to set.

public void setTargetPage (String page)

Sets the page the execution will be redirected to when the event is handled

Parameters
page a valid page name defined in the pageConfig.xml file

Protected Methods

protected void init (EventInfo info)