class %ZEN.Component.buttonView
extends %ZEN.Component.component
This Zen component displays a set of text buttons displayed
within a table. The number of columns is determined by the
columns property.
The contents of the buttonView are provided via the
user-defined OnGetButtonInfo callback.
This component is typically used to display progressive filter
buttons that allow a user to narrow down a search.
property OnGetButtonInfo
as %ZEN.Datatype.delegator(FORMALSPEC="seed:%ZEN.Datatype.string,&pInfo",RETURNTYPE="%Status");
Optional.
Name of Server-side callback method that provides the list of items to display
for this component.
This method should return an array, indexed by button number, that
defines the category, caption, value, and (optional) tooltip for each button. You can
also provide an optional, disabled flag, which, it true will make
the button disabled in all cases.
The array takes the form:
Set pInfo(n) = $LB(category,caption,value,tooltip,disabled)
When the user selects a button, all other buttons of the same category
are disabled (unless category is ""). Pressing the Reset button restores
clears all the selections.
This must be the name of a server-only method in the page
class that contains this view component.
property columns
as %ZEN.Datatype.integer(MINVAL=1) [ InitialExpression = 4 ];
Number of columns of buttons to display.
property onselect
as %ZEN.Datatype.eventHandler;
onselect event handler:
If defined, this event is fired when the user selects a new button.
The variable, value is passed to the event handler
and contains the current value of this component (same as
the value property).
property seed
as %ZEN.Datatype.string(ZENEXPRESSION=1);
Optional.
User-defined seed value. This is an optional parameter that
is passed on to the OnGetButtonInfo callback
method.
property value
as %ZEN.Datatype.string;
A string containing the current selected values.
This takes the form: "category:value;"
method %DrawHTML()
The %DrawHTML method draws the initial HTML for this component.
method %GetButtonInfo(ByRef pInfo)
as %Status
Invoke user method to get list of options to display.
method itemClicked(idx)
[ Language = javascript ]
User clicked on item.
method resetItems()
[ Language = javascript ]
Reset state of buttons.