Package com.ebasetech.xi.api.controls
Interface DynamicMenuItemControl
- All Superinterfaces:
Control
,Element
,EventOwner
,MenuItemControl
,MessageContainer
,MessageProperties
,java.io.Serializable
,WebFormEventOwner
public interface DynamicMenuItemControl extends MenuItemControl
A Dynamic Menu Item Control represents a location in a menu where any number of menu items are to be inserted at runtime.
- Since:
- V4.4
-
Method Summary
Modifier and Type Method Description void
setModel(java.lang.String model)
Sets the model representing the dynamic menu stucture to be added to the parent menu, where model is an XML string containing a structure of menu items.Methods inherited from interface com.ebasetech.xi.api.controls.Control
addCssClass, getAll, getCssClass, getErrorMsgClass, getErrorMsgStyle, getInfoMsgClass, getInfoMsgStyle, getLayoutCell, getNextSiblingControl, getPage, getParentControl, getPreviousSiblingControl, getRootHtmlElementProperties, getStyle, getWarningMsgClass, getWarningMsgStyle, hasModifier, hide, isContainer, isDisplayOnly, isDisplayOnlyIncludingParents, isEventField, isHidden, isInheritMsg, isLocalMsg, isNewLine, isShowing, refresh, removeCssClass, requestFocus, setCssClass, setDisplayOnly, setErrorMsgClass, setErrorMsgStyle, setHidden, setInfoMsgClass, setInfoMsgStyle, setNewLine, setStyle, setWarningMsgClass, setWarningMsgStyle, show
Methods inherited from interface com.ebasetech.xi.api.Element
getElementName, getElementType
Methods inherited from interface com.ebasetech.xi.api.controls.MenuItemControl
getItemName, getName
Methods inherited from interface com.ebasetech.xi.api.MessageContainer
addErrorMessage, addErrorMessage, addErrorMessage, addErrorMessage, addErrorMessage, addErrorMessageText, addErrorMessageText, addErrorMessageText, addInfoMessage, addInfoMessage, addInfoMessageText, addInfoMessageText, addInfoMessageText, addWarningMessage, addWarningMessage, addWarningMessage, addWarningMessage, addWarningMessage, addWarningMessageText, addWarningMessageText, addWarningMessageText, existErrorMessages, existInfoMessages, existMessages, existWarningMessages
Methods inherited from interface com.ebasetech.xi.api.controls.MessageProperties
getErrorMessageStyle, getInfoMessageStyle, getWarningMessageStyle
-
Method Details
-
setModel
void setModel(java.lang.String model)Sets the model representing the dynamic menu stucture to be added to the parent menu, where model is an XML string containing a structure of menu items.Javascript examples:
// 1. build menu XML from table using velocity var menuxml = VelocityServices.invokeTemplateFromFile("menutest.vm"); controls.DYN1.setModel(menuxml); // 2. build menu XML using the E4X API var itemid, itemtext, menuitem; itemid = "item1"; itemtext = "Item 1"; var menuxml = <menu></menu>; menuitem = <menuitem></menuitem>; menuitem.appendChild(<itemname>{itemid}</itemname>); menuitem.appendChild(<text>{itemtext}</text>); menuxml.appendChild(menuitem); itemid = "item2"; itemtext = "Item 2"; menuitem = <menuitem></menuitem>; menuitem.appendChild(<itemname>{itemid}</itemname>); menuitem.appendChild(<text>{itemtext}</text>); menuxml.appendChild(menuitem); controls.DYN1.setModel(menuxml.toXMLString());
- Parameters:
model
- XML document in String format containing a structure of menu items- Since:
- V4.5.3
-