Type to start searching...

HTMLLabel

Optional Scheme code to invoke to generate custom HTML. Write markup to the current output port.

Description

Note: It is the application developer's responsibility to set the query attribute so required data is loaded. Note: It is the application developer's responsibility to generate correct and safe markup.

All markup should be written to the current output port. The following variables are available to the script: - 'this' - The HTMLLabelView instance. These methods can be used: - sanitize - Invoke the HTML sanitization component on the parameter and return it. - icon - Return the URL for an icon. Parameter is the icon name. - image - Return the URL for an image - Supports only committed images and no support for default images. - Parameters is assoc lists: Requires value and type. Optional width and height attributes for server-side resizing. - event - Return the URL for a UI event invocation. The first parameter is the UI event name. Additional integer parameters are accepted and are passed as parameters to the UIEvent invocation. - 'value' - The raw (unsanitized) value from the value bind.

Properties
bgImage : string

The label's background image.

caption : string

String indentifier for caption display in the UI.

collection : string

If blank, the Label is static or bound to an instance. Otherwise, the label will be passed a collection model as the variable 'value', which can be iterated to produce the required markup. You must set all required attributes in the collectionQuery attribute.

An expression that specifies that a collection model must be set on the control. When using a collection HTML label, all attributes need to be listed in the collectionQuery attribute to create an appropriate read query.
Example


(@) - all instances of the associated class for Forms and form controls.
(@@ ClassName) - all instances of the class specified by ClassName
(ControlName1 assoc1 ... assocN) ... (ControlNameM assoc1 ... assocX) - all instances filtered by the parent instances.
(@ assoc1 ... assocN) - variant of above example. All instances relative to the Form model.

collectionLazy : boolean

Load the collection on display, not when the screen is loaded.

If true, the query for the dynamic combo will only be executed when the combo is displayed. Otherwise, the combo will be loaded when the screen is loaded.
collectionOrderBy : string

Optional order by clause to be added to the Label collection query: ((attr1 . asc1) ... (attrN . ascN)).

List of attributes or attribute and boolean pairs to indicate ascending (true) or descending (false).
Example


((name . #t) (company . #f))

collectionQuery : string

List of additional attributes to include in collection read query.

collectionWhere : string

Optional clause to be added to collection model query.

control : identifier

The control type this should be rendered with.

Valid values based on“string”.
:?[\p{L}_][\p{L}\p{N}_]*(:[\p{L}_][\p{L}\p{N}_]*)*

Value must begin with a letter or an underscore. Case and length are not restricted. Letters, numbers and underscores are allowed. Colon is used as a scope separator. Spaces and other punctuation characters are not allowed.

errorStyleName : string

The style to apply on HTML errors.

language : schemeLanguageType

The scripting language for this element.

The language defaults to scheme.
Valid values based on“languageType”.
scheme

scheme scripting language

menu : identifier

The menu associated with the HTML Label.

Valid values based on“string”.
:?[\p{L}_][\p{L}\p{N}_]*(:[\p{L}_][\p{L}\p{N}_]*)*

Value must begin with a letter or an underscore. Case and length are not restricted. Letters, numbers and underscores are allowed. Colon is used as a scope separator. Spaces and other punctuation characters are not allowed.

name : uiIdentifier

Uniquely identifies the HTML Label.

Valid values based on“string”.
:?[\p{L}_][\p{L}\p{N}_]*(:[\p{L}_][\p{L}\p{N}_]*)*

Value must begin with a letter. Case and length are not restricted. Letters and numbers are allowed. Colon is used as a scope separator. Spaces and other punctuation characters are not allowed.

query : string

List of additional attributes to include in read query.

style : string

Style of the HTML Label.

tabIndex : long

The index number of the tabbable control. Must be a long integer.

tabStop : boolean

Specifies if tabbing should stop on the tabbable control

toolbar : identifier

Menu object contributing to the Application menu bar. Must refer to an existing menu defined in the parent.

Valid values based on“string”.
:?[\p{L}_][\p{L}\p{N}_]*(:[\p{L}_][\p{L}\p{N}_]*)*

Value must begin with a letter or an underscore. Case and length are not restricted. Letters, numbers and underscores are allowed. Colon is used as a scope separator. Spaces and other punctuation characters are not allowed.

value : identifierList

Value of the HTML Label.

Valid values based on“token”.
(:?[\p{L}_][\p{L}\p{N}_]*(:[\p{L}_][\p{L}\p{N}_]*)*\s+)*(:?[\p{L}_][\p{L}\p{N}_]*(:[\p{L}_][\p{L}\p{N}_]*)*)?

Each element in the list must begin with a letter or underscore. Elements are space delimited.

Example


(xml
   (<div>
      (: style "border: solid red")
      (<b> (display (@ sanitize : value)))
      (<br>)
      (<span> "icon: " (<img> (: src (@ icon : "16/pencilRH"))))
      (<br>)
      (<span> "image & link: ")
      (<a>
         (: href (@ event : "sysEdit" 123 456))
         (<img>
            (: src (@ image : (: value "image mimeData") (: type "image mimeType") (: width 50)))
            (: alt "Edit!")
         )
      )
      (<br>)
      (for-each
         (lambda (addr)
            (<a> (: href "javascript:alert(\"Alert!\")") (@ sanitize : (addr'addressFull)))
            (<br>)
         )
         (@ model :findCollection : "addrs")
      )
      (<span> (display (format "{0,date,short}" (@ model createTime))))
   )
)

Parents