Plasma GitLab Archive
Projects Blog Knowledge


[UP]
The UI language
 ui:a
 ui:alist-value and ui:alist-item
 ui:application
 ui:button
 ui:checkbox
 ui:cond
 ui:context
 ui:default
 ui:dialog
 ui:dyn-enum-value and ui:dyn-enum-item
 ui:dynamic
 ui:encode
 ui:enum-value and ui:enum-item
 ui:enumerate
 ui:enumeration and ui:enum
 ui:false
 ui:file
 ui:form
 ui:if
 ui:ifexpr
 ui:iflang
 ui:ifvar
 ui:imagebutton
 ui:iter-*
 ui:iterate
 ui:page
 ui:param
 ui:popup
 ui:radio
 ui:richbutton
 ui:select
 ui:server-popup
 ui:special
 ui:string-value
 ui:template
 ui:text and ui:password
 ui:textarea
 ui:translate
 ui:true
 ui:use
 ui:variable
 t:*, q:*, and p:*
 l:*
 $param
 $[expr]
 Dot notation (v1.v2)
   
The elements ui:alist-value and ui:alist-item

The element ui:alist-value represents a literal for associative lists that can be used to set the initial value of a ui:variable. The element ui:alist-item represents one association pair.

Declaration

Level: Dialog structure

<!ELEMENT ui:alist-value (ui:alist-item)* >

<!ELEMENT ui:alist-item %value-literal; >

<!ATTLIST ui:alist-item
          index  CDATA #REQUIRED>
For the definition of %value-literal; see ui:variable.

Restriction: All items must contain literals of the same type. Furthermore, it is (currently) not allowed that an item contains another alist-value.

Attributes

  • index: The index of the item.

Sub elements

The ui:alist-item contains the literal that corresponds to the index

Example

<ui:enumeration name="fruit">
  <ui:enum internal="apple"  external="I like apples"/>
  <ui:enum internal="orange" external="I like oranges"/>
  <ui:enum internal="banana" external="I like bananas"/>
</ui:enumeration>

<ui:variable name="preference" type="fruit" associative="yes">
  <ui:alist-value>
    <ui:alist-item index="John">
      <!-- John's preferred fruit: -->
      <ui:enum-value>
        <ui:enum-item internal="orange"/>
        <ui:enum-item internal="banana"/>
      </ui:enum-value>
    </ui:alist-item>
    <ui:alist-item index="Mary">
      <!-- Mary's preferred fruit: -->
      <ui:enum-value>
        <ui:enum-item internal="apple"/>
        <ui:enum-item internal="banana"/>
      </ui:enum-value>
    </ui:alist-item>
  </ui:alist-value>
</ui:variable>
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml