class %ZEN.Component.dynaView
extends component
This component draws a dynamic view box based on executing
a user-provided callback method.
property OnGetViewContents
as %ZEN.Datatype.delegator(FORMALSPEC="&pParms:%String,*pContents:%String,*pHeaders:%String",RETURNTYPE="%Status");
Name of Server-side callback method to call to create the
data used for this view.
This must be the name of a server-only method in the page
class that contains this view component.
property itemCount
as %ZEN.Datatype.integer(XMLPROJECTION="none",ZENSETTING=0) [ InitialExpression = 0 ];
If present, this is the number of items in the dynaView.
property onchange
as %ZEN.Datatype.eventHandler;
onchange event handler:
If defined, this event is fired when the user selects a new item within the view.
property onclick
as %ZEN.Datatype.eventHandler;
onclick event handler:
If defined, this event is fired when
the user clicks on an item
property ondblclick
as %ZEN.Datatype.eventHandler;
ondblclick event handler:
If defined, this event is fired when
the user double-clicks on an item
property onselect
as %ZEN.Datatype.eventHandler;
onselect event handler:
If defined, this event is fired when the user selects an item
by either pressing the Enter key or double-clicking.
property parameters
as array of %ZEN.Auxiliary.parameter(XMLKEYNAME="paramName",XMLNAME="parameter",XMLPROJECTION="ELEMENT");
User-defined set of parameters. These values are passed on
to the user callback function that provides the contents of
this view. Typically this is used to hold search parameters
(such as current directory for a directory viewer).
property rows
as %ZEN.Datatype.integer(MINVAL=1) [ InitialExpression = 5 ];
Number of rows to display for list mode.
Default value is 5.
property selectedIndex
as %ZEN.Datatype.integer(XMLPROJECTION="none") [ InitialExpression = -1 ];
Index number (0-based) of current selection.
property text
as %ZEN.Datatype.string(XMLPROJECTION="none");
Text (display) value of current item within the view.
Do not access this directly; use getProperty('text') instead.
property value
as %ZEN.Datatype.string(XMLPROJECTION="none");
Logical value of current item within the view.
Do not access this directly; use getProperty('value') instead.
property viewType
as %ZEN.Datatype.string(VALUELIST=",details,list") [ InitialExpression = "list" ];
How to draw the contents of this view.
method %DrawHTML()
Draw innerHTML for this component (without enclosing div).
method %GetViewContents(ByRef pContents As %String, ByRef pHeaders As %String)
as %Status
Get an array (pContents) containing contents of
the view box.
This array is subscripted by item number; It is assumed
that there are no gaps in this array.
Each element within the array is a $List of the form:
$LB(text,value,icon,[addition cols])
Additional columns are displayed in "details" mode.
pHeaders should contain the labels used for the
columns displayed in "details" mode. For example:
pHeaders(1)="Name" // label for 'text' column
pHeaders(2)="Size" // label for 1st extra column, etc.
method dvKeyBlur()
[ Language = javascript ]
Focus taken from the invisible edit control.
method dvKeyDownHandler(evt)
[ Language = javascript ]
Process keydown event within the invisible edit control.
method dvKeyFocus()
[ Language = javascript ]
Focus passed to the invisible edit control.
method dvKeyPressHandler(evt)
[ Language = javascript ]
Process keypress event within the invisible edit control.
method focus()
[ Language = javascript ]
Client-side method to input focus to this control.
method itemClicked(idx)
[ Language = javascript ]
User clicked on an item.
method itemDblClicked(idx)
[ Language = javascript ]
User double-clicked on an item.
method moveToItem(dir)
[ Language = javascript ]
Move to a new item in the dynaView. dir is "up","down","left","right"
Returns true if move was successful.
method onCreate()
[ Language = javascript ]
Initialize additional client-side values
method selectItem(idx, scroll)
[ Language = javascript ]
Select the specified item given its index number (0-based).
If scroll is true, scroll new item into view.
method setProperty(property, value, value2)
[ Language = javascript ]
Set the value of a named property.