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.

Control AttributesAttributeinvalidMessageDescriptionMessage text to provide when invalid is true. The default is:out-of-range or invalid value.Although you can enter ordinary text for this attribute, it has the underlying data type%ZEN.Datatype.caption.This makes it easy to localize its text into other languages, as longas a language DOMAIN parameter is defined in the <strong>Zen</strong> page class. The%ZEN.Datatype.caption data type also enables you to use $$$Text macros when you assignvalues to the invalidMessage property from client-side or server-side code.—The next several attributes in this table (names beginning with “on...”) identify eventhandlers for user actions relating to a control. In each case, the value of the attribute isa client-side JavaScript expression that <strong>Zen</strong> invokes when the related event occurs.Generally this expression invokes a client-side JavaScript method defined in the pageclass. This method becomes known as the “handler” for that specific event.When providing a value for an event handler attribute, use double quotes to enclose thevalue and single quotes (if needed) within the JavaScript expression. For example:The JavaScript expression may contain <strong>Zen</strong> #()# runtime expressions.onbluronchangeonclickondblclickonfocusonkeydownonkeypressonkeyuponmousedownonmouseoutonmouseoveronmouseuponsubmitonvalidate—Fired when the control loses focus.Fired when the value of the control changes. Note that controls fire this event indirectly;the actual onchange event is sent to a built-in handler that notifies the form that ownsthis control of the modification.Fired when the mouse is clicked on the control.Fired when the mouse is double-clicked on the control.Fired when the control is given focus.Fired when the user presses down on a key while this control has focus. There is acorresponding onkeyup for when the user releases the key.Fired after the user has pressed a key (that is, the user has pushed down and thenreleased the key) while this control has focus.Fired when a key is released while this control has focus.Fired when a mouse button is released while within the area of the control.Fired when the mouse pointer leaves the area of the control.Fired when the mouse pointer enters the area of the control.Fired when a mouse button is pressed while within the area of the control.Fired when the form this control belongs to is submitted. This gives controls a chance tosupply or modify the value they submit.Fired when this control’s value is validated by its parent form.(End of the list of attributes that identify event handlers.)<strong>Using</strong> <strong>Zen</strong> <strong>Components</strong> 103

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

Saved successfully!

Ooh no, something went wrong!