12.07.2015 Views

Using Zen Components - InterSystems Documentation

Using Zen Components - InterSystems Documentation

Using Zen Components - InterSystems Documentation

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Navigation <strong>Components</strong>AttributeimageContractedimageExpandedoncontractDescriptionURI of the image to display when the group is contracted. The path that youprovide for imageContracted must be relative to the CSP directory in the Caché installationdirectory. The default for imageContracted is a right-arrow graphic ( ) located at the URIbroker/images/disclosure-contracted.gif.URI of the image to display when the group is expanded. The path that youprovide for imageExpanded must be relative to the CSP directory in the Caché installationdirectory. The default for imageExpanded is a down-arrow graphic ( ) located at the URIbroker/images/disclosure-expanded.gif.Client-side JavaScript expression that <strong>Zen</strong> invokes just before contracting (hiding) thechildren of this group. Generally this expression invokes a client-sideJavaScript method. This method becomes the “oncontract handler” for the .When providing a value for an event handler attribute such as oncontract, use doublequotes to enclose the value and single quotes (if needed) within the JavaScript expression.For example:The JavaScript expression may contain <strong>Zen</strong> #()# runtime expressions.OnDrawContentName of a server-side callback method in the <strong>Zen</strong> page class. This method injects HTMLcontent into the using &html syntax or WRITE commands.<strong>Zen</strong> invokes this method whenever it draws the , automatically passing it a%String that contains the seed value from the . The callback must return a%Status data type. The following is a valid method signature:Method DrawMe(pSeed As %String) As %StatusTo use the above method as the callback, the developer would setOnDrawContent="DrawMe" for the .onexpandrememberClient-side JavaScript expression that <strong>Zen</strong> invokes just before expanding (displaying)the children of this group.If true, remember the most recent expanded state in a session cookie and return to thisstate when redisplayed. The default is false.remember has the underlying data type %ZEN.Datatype.boolean. It has the value "true" or"false" in XData Contents, 1 or 0 in server-side code, true or false in client-side code. can be particularly useful in navigation when combined with .7.4.2 The component displays a hierarchical collection of user-defined items as an expandable tree. In many ways is similar to . However, instead of specifying the components that it contains, acquiresits contents dynamically at runtime. You can provide data for a as follows:• Use the dataGlobal attribute to specify a global whose data supplies the contents of the tree.• Use the OnGetNodeInfo callback to get data for each node within the tree.• Use the OnGetTreeInfo callback to fill in a local array that supplies the contents of the tree.208 <strong>Using</strong> <strong>Zen</strong> <strong>Components</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!