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 element ui:ifexpr

The element expects in the expr attribute a number which is interpreted as boolean value. If the number is non-zero, the inner nodes of the element are expanded and the condition code is set to true; otherwise the inner nodes are ignored, and the conditon code is set to false.

Declaration

Level: Control structure

<!ELEMENT ui:ifexpr ANY>

<!ATTLIST ui:ifexpr
          expr CDATA #REQUIRED
>
Attributes

  • expr: An integer number. A non-zero value as considered as true boolean value, and the number zero is considered as false boolean value. The number is usually the result of the evaluation of a bracket expression.

Sub elements

All page body elements may occur as sub elements.

Hints

Note that template parameters and bracket expressions within ui:if are unconditionally evaluated. See ui:cond for a discussion of the consequences of this fact.

Example

<ui:ifexpr expr="$[int-gt(n,1)]">
  The result has more than one solution: ...
</ui:ifexpr>
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml