| java.lang.Object com.flexive.faces.javascript.menu.MenuWriter
MenuWriter | public class MenuWriter (Code) | | A writer for Dojo menu objects in JSON notation.
author: Daniel Lichtenberger (daniel.lichtenberger@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at) version: $Rev: 1 $ |
Method Summary | |
public void | closeItem() | public void | closeSubMenu() | public void | finishResponse() Ends the response. | public Map<String, String> | getEngageSubscriptions() | public void | setEngageSubscriptions(Map<String, String> engageSubscriptions) | public void | startItem(MenuItem item) | public void | startSubMenu() | public void | writeEventSubscriptions(Writer out) Render the event subscriptions accumulated while rendering the JSON code.
Parameters: out - the output writer to be used. | public void | writeItem(MenuItem item) | public static void | writeMenu(Writer writer, String widgetId, String menuName, String menuClass, String itemClass, MenuItemContainer container, RelativeUriMapper uriMapper, String contextMenuTarget, String showHandler) Render the JSON representation for the given menu.
Parameters: menuName - name of the JS variable where the menu widget is stored Parameters: menuClass - widget class of the menu widget, e.g. |
writeEventSubscriptions | public void writeEventSubscriptions(Writer out) throws IOException(Code) | | Render the event subscriptions accumulated while rendering the JSON code.
Parameters: out - the output writer to be used. The JSON code must have been finished whenthis method is called! throws: java.io.IOException - if an I/O error occured |
writeMenu | public static void writeMenu(Writer writer, String widgetId, String menuName, String menuClass, String itemClass, MenuItemContainer container, RelativeUriMapper uriMapper, String contextMenuTarget, String showHandler) throws IOException(Code) | | Render the JSON representation for the given menu.
Parameters: menuName - name of the JS variable where the menu widget is stored Parameters: menuClass - widget class of the menu widget, e.g. TreeContextMenuV3 Parameters: itemClass - widget class of the menu items, e.g. TreeMenuItemV3 Parameters: container - the menu container Parameters: contextMenuTarget - target element if this menu should be attached as a context menu Parameters: showHandler - an optional javascript handler to be called when the menu is opened throws: IOException - if an output error occured @param writer the output writer @param widgetId the widget ID (set to null to use an auto-generated ID) |
|
|