serial class %CSP.Util.Menu
extends %SerialObject, %XML.Adaptor
This class is used internally by Caché. You should not make direct use of it within your applications. There is no guarantee made about either the behavior or future operation of this class.
Defines a menu for a CSP Menu page.
parameter XMLIGNORENULL = 1;
XMLIGNORENULL allows the programmer to override the default XML handling
of empty strings for properties of type %String. By default (XMLIGNORENULL = 0),
empty strings in the XML input are stored as $c(0) and $c(0) is written to XML
as an empty tag. A missing tag in the XML input is always stored as "" and
"" is always output to XML as no tag.
If XMLIGNORENULL is set = 1, then both missing tags in the XML and empty
strings are input as "", and both "" and $c(0) are output as empty tags
(i.e. <tag></tag>).
If XMLIGNORENULL is set = "inputonly", then both missing tags in the XML and empty
strings are input as "". Output of "" and $c(0) are for XMLIGNORENULL = 0:
$c(0) is output as an empty tag (i.e. <tag></tag>) and "" is output as no tag.
If XMLIGNORENULL = "runtime" (runtime is not case sensitive), then the behavior
of XMLIGNORENULL is determined by the format parameter of XMLExport, XMLImport
and %XML.Reader.OpenFile. The default behavior for XMLIGNORENULL="runtime is
the same as XMLIGNORENULL=0. Adding "ignorenull" to the format argument changes
the behavior to that of XMLIGNORENULL=1. "ignorenull" shoud be separated by a comma
from literal/encoded part of the format. Example values for format are "", ",ignorenull",
"literal,ignorenull" and "encoded,ignorenull".
Note that "inputonly" is equivalent to using ,ignorenull for XMLExport and not for %XML.Reader.
property Background
as %String(MAXLEN=100,XMLNAME="background",XMLPROJECTION="attribute");
Background color for the menu title
property Items
as list of MenuItem(XMLNAME="MenuItem",XMLPROJECTION="ELEMENT");
Defines the menu items for this menu
property Subtitle
as %String(MAXLEN=100,XMLNAME="subtitle",XMLPROJECTION="attribute");
Optional subtitle of this menu
property Title
as %String(MAXLEN=100,XMLNAME="title",XMLPROJECTION="attribute");
Title of this menu
method GenerateCode()
as %String
Utility method to generate code for this object