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(jakarta.servlet.http.HttpServletRequest request)
Returns the manager view by calling the
support.getManagerView(). |
protected String |
getMenuModelId(jakarta.servlet.http.HttpServletRequest request)
Returns the menu model ID from the request.
|
protected Object |
getSelectedObject(jakarta.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(jakarta.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, setServletContextpublic IlvManagerPopupServletSupport(IlvManagerServletSupport support)
IlvPopupMenuServletSupport.support - The manager servlet support.protected IlvManagerServletSupport getSupport()
protected Object getGraphicComponent(jakarta.servlet.http.HttpServletRequest request) throws jakarta.servlet.ServletException
support.getManagerView().getGraphicComponent in class IlvPopupMenuServletSupportrequest - The HTTP request.jakarta.servlet.ServletExceptionprotected Object getSelectedObject(jakarta.servlet.http.HttpServletRequest request, int x, int y) throws jakarta.servlet.ServletException
IlvGraphic instance selected by the user when he
triggered the pop-up menu.getSelectedObject in class IlvPopupMenuServletSupportrequest - The HTTP request.x - x coordinate in image view coordinate system.y - y coordinate in image view coordinate system.IlvGraphic instance.jakarta.servlet.ServletExceptionIlvPopupMenuServletSupport.getGraphicComponent(HttpServletRequest)protected void prepareComponent(jakarta.servlet.http.HttpServletRequest request,
Object graphicComponent)
throws jakarta.servlet.ServletException
prepareComponent in class IlvPopupMenuServletSupportrequest - The HTTP request.graphicComponent - The graphic component.jakarta.servlet.ServletException - If an error occurs during configuration.protected String getMenuModelId(jakarta.servlet.http.HttpServletRequest request) throws jakarta.servlet.ServletException
getMenuModelId in class IlvPopupMenuServletSupportrequest - The HTTP request.jakarta.servlet.ServletExceptionprotected 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 IlvPopupMenuServletSupportpublic void removeListeners()
installListeners() method.removeListeners in class IlvPopupMenuServletSupport© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.