ilog.views.servlet
Class ServerActionEvent

java.lang.Object
  extended by java.util.EventObject
      extended by ilog.views.servlet.ServerActionEvent
All Implemented Interfaces:
Serializable

public class ServerActionEvent
extends EventObject

An event object that is sent to listeners of actions requested from the client side. An action is generated from the client side when the IlvView.performAction method is called. This method queries the server for a new image, but additional parameters are sent in the image request so that an action such as adding, removing, or selecting objects can be performed before the image is generated. An action is defined by a name and a list of parameters. To implement the action on the client side, you will implement the ServerActionListener interface and check the action name and parameters in the event.

Since:
JViews 3.5
See Also:
IlvView.performAction(java.lang.String, java.lang.String[]), IlvManagerServlet.addServerActionListener(ilog.views.servlet.ServerActionListener), Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ServerActionEvent(javax.servlet.http.HttpServletRequest request, IlvManagerView view, String action, IlvManagerServletSupport support, String[] params)
          Creates an action event.
ServerActionEvent(javax.servlet.http.HttpServletRequest request, IlvManagerView view, String action, String[] params)
          Deprecated. Beginning with JViews 8.0 use ServerActionEvent(HttpServletRequest, IlvManagerView, String, IlvManagerServletSupport, String[]) instead.
 
Method Summary
 String getActionName()
          Returns the name of the action corresponding to this event.
 float getFloatParameter(int index)
          Returns a float parameter at the specified index.
 int getIntParameter(int index)
          Returns an int parameter at the specified index.
 IlvManagerView getManagerView()
          Returns the manager view to which the action applies.
 String[] getParameters()
          Returns the array of all parameters of this action.
 IlvPoint getPointParameter(int index)
          Returns an IlvPoint parameter at the specified index.
 IlvRect getRectParameter(int index)
          Returns an IlvRect parameter at the specified index.
 javax.servlet.http.HttpServletRequest getRequest()
          Returns the request origin of the action.
 IlvManagerServletSupport getServletSupport()
          Returns the IlvManagerServletSupport that created that event.
 String getStringParameter(int index)
          Returns a string parameter at the specified index.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerActionEvent

public ServerActionEvent(javax.servlet.http.HttpServletRequest request,
                         IlvManagerView view,
                         String action,
                         String[] params)
Deprecated. Beginning with JViews 8.0 use ServerActionEvent(HttpServletRequest, IlvManagerView, String, IlvManagerServletSupport, String[]) instead.

Creates an action event.


ServerActionEvent

public ServerActionEvent(javax.servlet.http.HttpServletRequest request,
                         IlvManagerView view,
                         String action,
                         IlvManagerServletSupport support,
                         String[] params)
Creates an action event.

Since:
JViews 8.0
Method Detail

getActionName

public String getActionName()
Returns the name of the action corresponding to this event.


getParameters

public String[] getParameters()
Returns the array of all parameters of this action.


getRequest

public javax.servlet.http.HttpServletRequest getRequest()
Returns the request origin of the action.


getManagerView

public IlvManagerView getManagerView()
Returns the manager view to which the action applies.


getServletSupport

public IlvManagerServletSupport getServletSupport()
Returns the IlvManagerServletSupport that created that event.

Since:
JViews 8.0

getStringParameter

public String getStringParameter(int index)
                          throws javax.servlet.ServletException
Returns a string parameter at the specified index.

Parameters:
index - The parameter index.
Throws:
javax.servlet.ServletException

getIntParameter

public int getIntParameter(int index)
                    throws javax.servlet.ServletException
Returns an int parameter at the specified index.

Parameters:
index - The parameter index.
Throws:
javax.servlet.ServletException

getFloatParameter

public float getFloatParameter(int index)
                        throws javax.servlet.ServletException
Returns a float parameter at the specified index.

Parameters:
index - The parameter index.
Throws:
javax.servlet.ServletException

getPointParameter

public IlvPoint getPointParameter(int index)
                           throws javax.servlet.ServletException
Returns an IlvPoint parameter at the specified index. This utility method reads two float parameters starting at index and creates an IlvPoint.

Parameters:
index - The parameter index.
Throws:
javax.servlet.ServletException

getRectParameter

public IlvRect getRectParameter(int index)
                         throws javax.servlet.ServletException
Returns an IlvRect parameter at the specified index. This utility method reads four float parameters starting at index and creates an IlvRect.

Parameters:
index - The parameter index.
Throws:
javax.servlet.ServletException


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.