public class IlvManagerPopupServletSupport extends IlvPopupMenuServletSupport
IlvPopupMenuServletSupport
class defines a servlet support
dedicated to dynamic pop-up requests.IlvPopupMenuServletSupport
returns IlvManagerView
instance and the selected
IlvGraphic
through the
getGraphicComponent()
and getSelectedObject()
methods, respectively.IlvManagerServletSupport
like the
following example:
public class ExampleSupport extends IlvManagerServletSupport { public ExampleSupport(ServletContext context) { setPopupEnabled(true); getPopupMenuSupport().setMenuFactory(new ExampleFactory()); } [...] }
MENU_SESSION_KEY, REQUEST_TYPE, SERVLET_ACTION_NAME
Constructor and Description |
---|
IlvManagerPopupServletSupport(IlvManagerServletSupport support)
Creates a
IlvPopupMenuServletSupport . |
Modifier and Type | Method and Description |
---|---|
protected ServerActionListener |
createListener()
Returns the server action listener that manages
the actions that come from the pop-up menu.
|
protected Object |
getGraphicComponent(javax.servlet.http.HttpServletRequest request)
Returns the manager view by calling the
support.getManagerView() . |
protected String |
getMenuModelId(javax.servlet.http.HttpServletRequest request)
Returns the menu model ID from the request.
|
protected Object |
getSelectedObject(javax.servlet.http.HttpServletRequest request,
int x,
int y)
Returns the
IlvGraphic instance selected by the user when he
triggered the pop-up menu. |
protected IlvManagerServletSupport |
getSupport()
Returns the image generating servlet support.
|
void |
installListeners()
Installs the listeners to properly handle the pop-up menu actions.
|
protected void |
prepareComponent(javax.servlet.http.HttpServletRequest request,
Object graphicComponent)
Configures the graphic component to be in a correct state before the
selected object is picked.
|
void |
removeListeners()
Removes the listeners previously installed through the
installListeners() method. |
createMenu, createMenu, getMenuEncoder, getMenuFactory, getPopupMenuFromSession, getServletContext, handleRequest, savePopupMenuModelInSession, setMenuFactory, setServletContext
public IlvManagerPopupServletSupport(IlvManagerServletSupport support)
IlvPopupMenuServletSupport
.support
- The manager servlet support.protected IlvManagerServletSupport getSupport()
protected Object getGraphicComponent(javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException
support.getManagerView()
.getGraphicComponent
in class IlvPopupMenuServletSupport
request
- The HTTP request.javax.servlet.ServletException
protected Object getSelectedObject(javax.servlet.http.HttpServletRequest request, int x, int y) throws javax.servlet.ServletException
IlvGraphic
instance selected by the user when he
triggered the pop-up menu.getSelectedObject
in class IlvPopupMenuServletSupport
request
- The HTTP request.x
- x coordinate in image view coordinate system.y
- y coordinate in image view coordinate system.IlvGraphic
instance.javax.servlet.ServletException
IlvPopupMenuServletSupport.getGraphicComponent(HttpServletRequest)
protected void prepareComponent(javax.servlet.http.HttpServletRequest request, Object graphicComponent) throws javax.servlet.ServletException
prepareComponent
in class IlvPopupMenuServletSupport
request
- The HTTP request.graphicComponent
- The graphic component.javax.servlet.ServletException
- If an error occurs during configuration.protected String getMenuModelId(javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException
getMenuModelId
in class IlvPopupMenuServletSupport
request
- The HTTP request.javax.servlet.ServletException
protected ServerActionListener createListener()
Returns the server action listener that manages the actions that come from the pop-up menu.
By default this method returns a new instance of
IlvPopupMenuServerActionListener
.
Subclasses may override this method to register a custom listener.
public void installListeners()
installListeners
in class IlvPopupMenuServletSupport
public void removeListeners()
installListeners()
method.removeListeners
in class IlvPopupMenuServletSupport
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.