<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://download.osbee.org/documentation/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wu</id>
		<title>OS.bee documentation - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://download.osbee.org/documentation/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wu"/>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php/Special:Contributions/Wu"/>
		<updated>2026-05-09T21:16:13Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=Statemachine_DSL&amp;diff=3187</id>
		<title>Statemachine DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=Statemachine_DSL&amp;diff=3187"/>
				<updated>2018-05-03T16:30:09Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* Statemachine DSL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== State Machine ===&lt;br /&gt;
&lt;br /&gt;
'''State Machine''' or '''extended finite-state machine (EFSM)''' is a mathematical model of computation and represents an abstract machine that can be in exactly one of a finite number of states at any given time. The State Machine can change from one ''state'' to another in response to external ''events''. The change from one state to another is called a ''transition''. A EFSM is defined by a list of its states, its ''initial state'', and the conditions for each transition. The condition for a transition is called ''guard''. There can be many guards protecting a transition to be triggered. Every guard is joined with a logical AND operation, so every guard must evaluate to true, to trigger a protected transition. Data operations can occur before a transition. They are called ''actions''. Actions prepare the indicated state of the transition, calculate things or display information.&lt;br /&gt;
The StatemachineDSL described in the following implements an EFSM where the FSM-block is represented by ''states'', the A-block is called ''actions'' and the E-block is called ''guards''.&lt;br /&gt;
&lt;br /&gt;
=== Further reading ===&lt;br /&gt;
&lt;br /&gt;
https://en.wikipedia.org/wiki/Finite-state_machine&lt;br /&gt;
&lt;br /&gt;
https://en.wikipedia.org/wiki/Extended_finite-state_machine&lt;br /&gt;
&lt;br /&gt;
https://en.wikipedia.org/wiki/UML_state_machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Statemachine DSL ==&lt;br /&gt;
Statemachine DSL implements the state pattern (https://en.wikipedia.org/wiki/State_pattern) and interconnects UI model, FunctionLibrary, DTO and peripheral services like JavaPOS, ZVT protocol and others.&lt;br /&gt;
&lt;br /&gt;
The main semantic elements of the StatemachineDSL are:&lt;br /&gt;
*'''package''' - The root element that contains all the other elements. A model can contain multiple packages. &lt;br /&gt;
*'''import''' declarations - Used to import external models or other Java classes.&lt;br /&gt;
*'''statemachine''' - The container for the implementation of the EFSM following the state pattern.&lt;br /&gt;
*'''events''' -  Contains all user defined events.&lt;br /&gt;
*'''event''' - Defines a single event by id. Events build the interconnection elements between controls and transitions.&lt;br /&gt;
*'''controls''' - The container for all type of beans (https://en.wikipedia.org/wiki/JavaBeans) to be controlled by the state machine.&lt;br /&gt;
*'''scheduler''' - A type of bean that can be triggered to emit a defined event after a defined delay.&lt;br /&gt;
*'''keypad''' - A type of bean that builds a keypad containing one or more buttons to emit a defined event when pressed.&lt;br /&gt;
*'''fields''' - A type of bean that holds data of input fields or labels from UI.&lt;br /&gt;
*'''dataProvider''' - A type of bean that retrieves and stores data based on DTO.&lt;br /&gt;
*'''peripheral''' - A type of bean that controls input/output operations with peripheral units. Peripheral units can be printers, displays or other external devices following the JavaPOS standard (http://www.javapos.com/). Peripheral units can also emit events representing its current state or error.&lt;br /&gt;
*'''attribute''' - Defines different types for usage with control.&lt;br /&gt;
*'''states''' - The container for all state definitions of this state machine.&lt;br /&gt;
*'''state''' - A single state the machine can be at a point in time.&lt;br /&gt;
*'''triggers''' - The container for all possible event processing blocks inside a state.&lt;br /&gt;
*'''trigger''' - The action block following this trigger will be executed when one of its events occur.&lt;br /&gt;
*'''actions''' - The container for all process instructions to be done in sequence inside this block. Optionally an action block can follow a transition.&lt;br /&gt;
*'''transition''' - The transition will be executed when all actions of this block were processed successfully.&lt;br /&gt;
*'''guards''' - The container for guards protecting the following transistion.&lt;br /&gt;
*'''guard''' - A condition that must evaluate to true that the following transistion will be processed.&lt;br /&gt;
&lt;br /&gt;
==== Syntax ====&lt;br /&gt;
&lt;br /&gt;
===== package definition =====&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;package name&amp;gt; [{&lt;br /&gt;
	statemachine &amp;lt;statemachine name&amp;gt; [describedBy &amp;lt;description string&amp;gt;]&lt;br /&gt;
	[functiongroup &amp;lt;function:FunctionLibraryStatemachineGroup&amp;gt;]&lt;br /&gt;
	initialState &amp;lt;StatemachineState&amp;gt;&lt;br /&gt;
	initialEvent &amp;lt;StatemachineEvent&amp;gt;&lt;br /&gt;
	events {&lt;br /&gt;
		event &amp;lt;event name&amp;gt;&lt;br /&gt;
		. . .&lt;br /&gt;
	}&lt;br /&gt;
	controls {&lt;br /&gt;
		StatemachineControl&lt;br /&gt;
		. . .&lt;br /&gt;
	}&lt;br /&gt;
	states {&lt;br /&gt;
		StatemachineState&lt;br /&gt;
		. . .&lt;br /&gt;
	}&lt;br /&gt;
	. . . &lt;br /&gt;
}]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.foodmart.statemachines {&lt;br /&gt;
 	statemachine CashTerminal describedBy &amp;quot;Cash Register&amp;quot;  &lt;br /&gt;
	functiongroup CashRegister&lt;br /&gt;
	initialState IDLE&lt;br /&gt;
	initialEvent onStartUp &lt;br /&gt;
	events {&lt;br /&gt;
		event onStartUp&lt;br /&gt;
		. . .&lt;br /&gt;
}&lt;br /&gt;
	controls {&lt;br /&gt;
		scheduler Schedulers {. . .}&lt;br /&gt;
		. . .&lt;br /&gt;
}&lt;br /&gt;
	states {&lt;br /&gt;
		state IDLE { . . .}&lt;br /&gt;
		. . .&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== important definition =====&lt;br /&gt;
&lt;br /&gt;
====== StatemachineActionFieldConcatenation ======&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;STRING&amp;gt; [+ &amp;lt;STRING&amp;gt; . . .]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;SignedNumber&amp;gt; [+ &amp;lt;SignedNumber&amp;gt; . . .]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;INTEGER&amp;gt; [+ &amp;lt;INTEGER&amp;gt; . . .]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;BOOLEAN&amp;gt; [+ &amp;lt;BOOLEAN&amp;gt; . . .]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
StatemachineEvaluationType [+ StatemachineEvaluationType . . .]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
translate &amp;lt;STRING&amp;gt; [+ translate &amp;lt;STRING&amp;gt; . . .]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
get &amp;lt;StatemachineControlFieldAttribute&amp;gt; [+ get &amp;lt;StatemachineControlFieldAttribute&amp;gt; . . .]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
operation &amp;lt;function:FunctionLibraryOperation&amp;gt; (StatemachineActionFieldConcatenation[,StatemachineActionFieldConcatenation. . . ]) [+ operation &amp;lt;function:FunctionLibraryOperation&amp;gt;. . .]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
retrieve from &amp;lt;key ID&amp;gt;.&amp;lt;attribute ID&amp;gt; [+ retrieve from &amp;lt;key ID&amp;gt;.&amp;lt;attribute ID&amp;gt; . . .]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
dto &amp;lt;StatemachineControlDTOAttribute&amp;gt;.&amp;lt;dto:LDtoInheritedAttribute&amp;gt; [+ dto &amp;lt;StatemachineControlDTOAttribute&amp;gt;.&amp;lt;dto:LDtoInheritedAttribute&amp;gt; . . .]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
function &amp;lt;function:FunctionLibraryFunction&amp;gt; (StatemachineActionFieldConcatenation[,StatemachineActionFieldConcatenation . . . ])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
event&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
paymentResponse from &amp;lt;StatemachinePeripheralDevicePT&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*StatemachineEvaluationType is including: getIPAddress |getHostName | getNow | getUserAgentInfo | isTouchDevice | isHttps | getBrowserLocale | getUserName| getUserPassword | getUserEmail | getUserPosition | getUserPrintService | getSceenWidth | getScreenHeight | getTrigger .&lt;br /&gt;
&lt;br /&gt;
► '''example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
operation dopayment(retrieve from paymentMethod.last)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====== StatemachineActionFieldSource ======&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;STRING&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;SignedNumber&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;INTEGER&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;BOOLEAN&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
StatemachineEvaluationType &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
translate &amp;lt;STRING&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
get &amp;lt;StatemachineControlFieldAttribute&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
function &amp;lt;function:FunctionLibraryFunction&amp;gt; (StatemachineActionFieldConcatenation [,StatemachineActionFieldConcatenation. . . ])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
retrieve from &amp;lt;key ID&amp;gt;.&amp;lt;attribute ID&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
dto &amp;lt;StatemachineControlDTOAttribute&amp;gt;.&amp;lt;dto:LDtoInheritedAttribute&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
event&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
paymentResponse from &amp;lt;StatemachinePeripheralDevicePT&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* StatemachineEvaluationType is including: getIPAddress | getHostName | getNow | getUserAgentInfo | isTouchDevice | isHttps | getBrowserLocale | getUserName| getUserPassword | getUserEmail | getUserPosition | getUserPrintService | getSceenWidth | getScreenHeight | getTrigger. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
function getPaymentTotal()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====== StatemachineFilter ======&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
  and ( [StatemachineFilter] , StatemachineFilter. . . )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
or ( [StatemachineFilter] , StatemachineFilter. . . )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
StatemachineCompareOperationEnum (dto &amp;lt;StatemachineControlDTOAttribute&amp;gt;.&amp;lt; dto:LDtoInheritedAttribute&amp;gt;, StatemachineActionFieldSource)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
isBetween(dto &amp;lt;StatemachineControlDTOAttribute&amp;gt;.&amp;lt;dto:LDtoInheritedAttribute&amp;gt;, start StatemachineActionFieldSource, end StatemachineActionFieldSource)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
isNull (dto &amp;lt;StatemachineControlDTOAttribute&amp;gt;.&amp;lt;dto:LDtoInheritedAttribute&amp;gt;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
isLike (dto &amp;lt;StatemachineControlDTOAttribute&amp;gt;.&amp;lt;dto:LDtoInheritedAttribute&amp;gt;, StatemachineActionFieldSource [ignoreCase])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
not ( StatemachineFilter )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
matches (dto &amp;lt;StatemachineControlDTOAttribute&amp;gt;.&amp;lt;dto:LDtoInheritedAttribute&amp;gt;, &amp;lt;filterString&amp;gt; [ignoreCase] [onlyMatchPrefix])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* StatemachineCompareOperationEnum is including: equal | greater | less | greaterOrEqual | lessOrEqual.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
keystroke @paymentGiven and operation givenChanged()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====== StatemachineAction ======&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
blinkRate &amp;lt;rate INT&amp;gt; @&amp;lt;StatemachinePeripheralDeviceLineDisplay&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
clearDevice &amp;lt;StatemachinePeripheralDeviceLineDisplay&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
createWindow row &amp;lt;viewportRow INT&amp;gt; column &amp;lt;viewportColumn INT&amp;gt; height &amp;lt;viewportHeight INT&amp;gt; width &amp;lt;viewportWidth INT&amp;gt; windowHeight &amp;lt;windowHeight INT&amp;gt; windowWidth &amp;lt;windowWidth INT&amp;gt; @&amp;lt;StatemachinePeripheralDeviceLineDisplay&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
cursorType StatemachineLineDisplayCursorType @&amp;lt;StatemachinePeripheralDeviceLineDisplay&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
destroyWindow &amp;lt;StatemachinePeripheralDeviceLineDisplay&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
deviceBrightness &amp;lt;brightness INT&amp;gt; @&amp;lt;StatemachinePeripheralDeviceLineDisplay&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
displayBitmap id &amp;lt;bitmapId INT&amp;gt; @&amp;lt;StatemachinePeripheralDeviceLineDisplay&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
displayText text StatemachineActionFieldConcatenation [type StatemachineLineDisplayTextType] @&amp;lt;StatemachinePeripheralDeviceLineDisplay&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
displayTextAt text StatemachineActionFieldConcatenation row &amp;lt;row INT&amp;gt; column &amp;lt;column INT&amp;gt; [type StatemachineLineDisplayTextType] @&amp;lt;StatemachinePeripheralDeviceLineDisplay&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
interCharacterWait &amp;lt;wait INT&amp;gt; @&amp;lt;StatemachinePeripheralDeviceLineDisplay&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
marqueeFormat StatemachineLineDisplayMarqueeFormat @&amp;lt;StatemachinePeripheralDeviceLineDisplay&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
marqueeRepeatWait &amp;lt;wait INT&amp;gt; @&amp;lt;StatemachinePeripheralDeviceLineDisplay&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
marqueeType StatemachineLineDisplayMarqueeType @&amp;lt;StatemachinePeripheralDeviceLineDisplay&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
marqueeUnitWait &amp;lt;wait INT&amp;gt;  @&amp;lt;StatemachinePeripheralDeviceLineDisplay&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
scroll StatemachineLineDisplayScrollTextType &amp;lt;units INT&amp;gt; @&amp;lt;StatemachinePeripheralDeviceLineDisplay&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
openDrawe &amp;lt;StatemachinePeripheralDeviceCashDrawer&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
printBarcode data &amp;lt;data STRING&amp;gt; barcodeType StatemachinePOSPrinterBarcodeType @&amp;lt;StatemachinePeripheralDevicePOSPrinter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
printBitmap id &amp;lt;bitmapId INT&amp;gt; @&amp;lt;StatemachinePeripheralDevicePOSPrinter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
printCut text StatemachineActionFieldConcatenation @&amp;lt;StatemachinePeripheralDevicePOSPrinter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
printNormal text StatemachineActionFieldConcatenation @&amp;lt;StatemachinePeripheralDevicePOSPrinter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
printerBitmap id &amp;lt;bitmapId INT&amp;gt; name &amp;lt;name STRING&amp;gt; @&amp;lt;StatemachinePeripheralDevicePOSPrinter&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
displayBitmap id &amp;lt;bitmapId INT&amp;gt; name &amp;lt;name STRING&amp;gt; @&amp;lt;StatemachinePeripheralDeviceLineDisplay&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
paymentOpen host StatemachineActionFieldConcatenation port StatemachineActionFieldConcatenation @&amp;lt;StatemachinePeripheralDevicePT&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
paymentClose @&amp;lt;StatemachinePeripheralDevicePT&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
paymentAcknowledge @&amp;lt;StatemachinePeripheralDevicePT&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
paymentReversal withPassword StatemachineActionFieldConcatenation ofReceipt StatemachineActionFieldConcatenation @&amp;lt;StatemachinePeripheralDevicePT&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
paymentRegistration withPassword StatemachineActionFieldConcatenation configuration &amp;lt;configuration STRING&amp;gt; @&amp;lt;StatemachinePeripheralDevicePT&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
paymentAuthorization ofAmount StatemachineActionFieldConcatenation @&amp;lt;StatemachinePeripheralDevicePT&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
printReport &amp;lt;report:Report&amp;gt; [from &amp;lt;StatemachineStorage&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
set StatemachineActionFieldConcatenation @&amp;lt;StatemachineControlFieldAttribute&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
remove &amp;lt;StatemachineControlFieldAttribute&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
visible &amp;lt;StatemachineControlVisibility&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
invisible &amp;lt;StatemachineControlVisibility&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
clear &amp;lt;StatemachineControlFieldAttribute&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
caption StatemachineActionFieldConcatenation @&amp;lt;StatemachineControlButtonAttribute&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
image &amp;lt;image STRING&amp;gt; @&amp;lt;StatemachineControlButtonAttribute&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
search StatemachineActionFieldConcatenation in &amp;lt;StatemachineControlDTOAttribute&amp;gt;.&amp;lt;dto:LDtoInheritedAttribute&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
store StatemachineActionFieldConcatenation with &amp;lt;key ID&amp;gt;.&amp;lt;Attribute ID&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
schedule &amp;lt;StatemachineControlSchedulerAttribute&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
operation &amp;lt;function:FunctionLibraryOperation&amp;gt; (StatemachineActionFieldConcatenation [,StatemachineActionFieldConcatenation . . . ])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
transition &amp;lt;StatemachineState&amp;gt; guard &amp;lt;function:FunctionLibraryGuard&amp;gt; [onFail caption &amp;lt;onFailCaption STRING&amp;gt; description &amp;lt;onFailDescription STRING&amp;gt; type StatemachineUserMessageType]{ StatemachineAction. . .}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* StatemachineLineDisplayCursorType is including: none | fixed | block | halfblock | underline | reverse | other | blink.&lt;br /&gt;
* StatemachineLineDisplayTextType is including: normal | blink | reverse | blinkreverse.&lt;br /&gt;
* StatemachineLineDisplayMarqueeFormat is including: walk | place.&lt;br /&gt;
* StatemachineLineDisplayMarqueeType is including: none | up | down | left | right | init.&lt;br /&gt;
* StatemachineLineDisplayScrollTextType is including: up | down | left | right.&lt;br /&gt;
* StatemachinePOSPrinterBarcodeType is including: upca | upcb | jan8 | ean8 | jan13 | ean13 | tf | itf | codeabar | code39 | code93 | code128 | upca_s | upce_s | upcd1 | upcd2 | upcd3 | upcd4 | upcd5 | ean8_s | ean13_s | ean128 | orca | ocrb | code128_parsed | gs1databar | gs1databar_e | gs1databar_s | gs1databar_e_s | pdf417 | maxicode | datamatrix | qrcode | uqrcode | aztec | updf417.&lt;br /&gt;
* StatemachineUserMessageType is including: humanized | warning | error | tray | assistive .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
clearDevice LineDisplay &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
createWindow row 0 column 0 height 1 width 20 windowHeight 1 windowWidth 87 @LineDisplay&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
marqueeFormat walk @LineDisplay &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;   &lt;br /&gt;
marqueeType init @LineDisplay&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
marqueeRepeatWait 800 @LineDisplay &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
marqueeUnitWait 100 @LineDisplay&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
displayText text &amp;quot;OS.bee is the only software that adapts to your business rules, rather than vice versa.&amp;quot; @LineDisplay&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
invisible login&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
visible numbers&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
clear passwordEntry&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
set 0.0 @paymentGiven&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
operation loadPLU(1.0,6.0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
paymentOpen host dto cashregister.payment_ip port dto cashregister.payment_port @VeriFone &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== events =====&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;	&lt;br /&gt;
events {&lt;br /&gt;
	event &amp;lt;event name&amp;gt;&lt;br /&gt;
	. . .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*events - Contains all user defined events.&lt;br /&gt;
*event - Defines a single event by id. Events build the interconnection elements between controls and transitions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
events {&lt;br /&gt;
	event onStartUp&lt;br /&gt;
	. . .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== controls =====&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
controls {&lt;br /&gt;
	StatemachineControl&lt;br /&gt;
	. . .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
keypad &amp;lt;name ID&amp;gt; event StatemachineControlButtonEventType {&lt;br /&gt;
	button &amp;lt;name ID&amp;gt; [image &amp;lt;image STRING&amp;gt;] key &amp;lt;keystroke STRING&amp;gt;|id &amp;lt;identity INT&amp;gt;|event &amp;lt;StatemachineEvent&amp;gt;&lt;br /&gt;
	. . .&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
fields &amp;lt;name ID&amp;gt; {&lt;br /&gt;
	 field &amp;lt;name ID&amp;gt; type StatemachineFieldType&lt;br /&gt;
	 . . .&lt;br /&gt;
	&amp;amp;&lt;br /&gt;
	 layout &amp;lt;name ID&amp;gt;&lt;br /&gt;
	 . . .&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
dataProvider &amp;lt;name ID&amp;gt; {&lt;br /&gt;
	  dto &amp;lt;name ID&amp;gt; type &amp;lt;dto:LDto&amp;gt; [event &amp;lt;StatemachineEvent&amp;gt;]&lt;br /&gt;
	  . . . &lt;br /&gt;
	&amp;amp;&lt;br /&gt;
	  filter &amp;lt;name ID&amp;gt; StatemachineFilter&lt;br /&gt;
  	  . . .&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
scheduler &amp;lt;name ID&amp;gt; {&lt;br /&gt;
	scheduler &amp;lt;name ID&amp;gt; delay &amp;lt;delay INT&amp;gt; send &amp;lt;StatemachineEvent&amp;gt;&lt;br /&gt;
	. . .&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
or &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
peripheral &amp;lt;name ID&amp;gt; { &lt;br /&gt;
	lineDisplay &amp;lt;name ID&amp;gt;&lt;br /&gt;
	. . .&lt;br /&gt;
	posPrinter &amp;lt;name ID&amp;gt;&lt;br /&gt;
	. . .&lt;br /&gt;
	cashDrawer &amp;lt;name ID&amp;gt;&lt;br /&gt;
	. . .&lt;br /&gt;
	payment &amp;lt;name ID&amp;gt;&lt;br /&gt;
	. . .&lt;br /&gt;
  } &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*'''controls''' - The container for all type of beans (https://en.wikipedia.org/wiki/JavaBeans) to be controlled by the state machine.&lt;br /&gt;
*'''scheduler''' - A type of bean that can be triggered to emit a defined event after a defined delay.&lt;br /&gt;
*'''keypad''' - A type of bean that builds a keypad containing one or more buttons to emit a defined event when pressed.&lt;br /&gt;
*'''fields''' - A type of bean that holds data of input fields or labels from UI.&lt;br /&gt;
*'''dataProvider''' - A type of bean that retrieves and stores data based on DTO.&lt;br /&gt;
*'''peripheral''' - A type of bean that controls input/output operations with peripheral units. Peripheral units can be printers, displays or other external devices following the JavaPOS standard (http://www.javapos.com/). Peripheral units can also emit events representing its current state or error. The supported peripherals are listed [[OS.bee_peripherals_for_JavaPOS|here]].&lt;br /&gt;
* '''StatemachineControlButtonEventType''' is including: keyboard | trigger | identity.&lt;br /&gt;
* '''StatemachineFieldType''' is including: Boolean | Integer| Long | Double | String | Date | SuggestText.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
keypad NumericPad event keyboard {&lt;br /&gt;
	button zero key &amp;quot;0&amp;quot; &lt;br /&gt;
	button one key &amp;quot;1&amp;quot;&lt;br /&gt;
	button two key &amp;quot;2&amp;quot; &lt;br /&gt;
	button three key &amp;quot;3&amp;quot;&lt;br /&gt;
	button four key &amp;quot;4&amp;quot; &lt;br /&gt;
	button five key &amp;quot;5&amp;quot;&lt;br /&gt;
	button six key &amp;quot;6&amp;quot; &lt;br /&gt;
	button seven key &amp;quot;7&amp;quot;&lt;br /&gt;
	button eight key &amp;quot;8&amp;quot; &lt;br /&gt;
	button nine key &amp;quot;9&amp;quot;&lt;br /&gt;
	button dzero key &amp;quot;00&amp;quot; &lt;br /&gt;
	button dot key &amp;quot;.&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
fields UiControl {&lt;br /&gt;
	layout numbers&lt;br /&gt;
	layout login&lt;br /&gt;
	layout paymentFields&lt;br /&gt;
	layout entry&lt;br /&gt;
	layout functions&lt;br /&gt;
	layout plu&lt;br /&gt;
	layout money&lt;br /&gt;
	layout method&lt;br /&gt;
	layout receipt &lt;br /&gt;
	field passwordEntry type String&lt;br /&gt;
	field sku type SuggestText&lt;br /&gt;
	field paymentTotal type Double&lt;br /&gt;
	field paymentGiven type String&lt;br /&gt;
	field paymentChange type Double &lt;br /&gt;
	field paymentPayed type Double &lt;br /&gt;
	field qty type Double &lt;br /&gt;
	field totalAmount type Double&lt;br /&gt;
	field amount type Double&lt;br /&gt;
	field price type Double &lt;br /&gt;
	field productName type String&lt;br /&gt;
	field paymentTerminal type String&lt;br /&gt;
	field filterToggleStyle type String&lt;br /&gt;
	field blurEvent type EmbeddableEvent&lt;br /&gt;
	field focusEvent type EmbeddableEvent&lt;br /&gt;
	field contextEvent type EmbeddableEvent&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
dataProvider DataControl { &lt;br /&gt;
	dto product type MproductDto &lt;br /&gt;
	dto cashregister type CashRegisterDto &lt;br /&gt;
	dto cashslip type CashSlipDto&lt;br /&gt;
	dto cashpayment type CashPaymentDto event onPaymentSelection &lt;br /&gt;
	dto cashposition type CashPositionDto event onPositionSelection &lt;br /&gt;
	dto cashpaymentmethod type CashPaymentMethodDto&lt;br /&gt;
	filter positionFilter equal(path cashposition.product.low_fat, true)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
scheduler Schedulers {&lt;br /&gt;
	scheduler toAutoLogout delay 10000 send onLogout&lt;br /&gt;
	scheduler toStart delay 100 send onStartUp&lt;br /&gt;
	scheduler toDisplayTest1 delay 10000 send onDisplayTest1&lt;br /&gt;
	scheduler toDisplayTest2 delay 6000 send onDisplayTest2  &lt;br /&gt;
	scheduler toDisplayTest3 delay 4000 send onDisplayTest3  &lt;br /&gt;
	scheduler toDisplayTest4 delay 3000 send onDisplayTest4  &lt;br /&gt;
	scheduler toDisplayTest5 delay 4000 send onDisplayTest5  &lt;br /&gt;
	scheduler toDisplayTest6 delay 1000 send onDisplayTest6  &lt;br /&gt;
	scheduler toDisplayTest7 delay 1000 send onDisplayTest7  &lt;br /&gt;
	scheduler toDisplayTestFinish delay 2000 send onDisplayTestFinish  &lt;br /&gt;
	scheduler toDisplayIdle delay 100 send onDisplayIdle&lt;br /&gt;
	scheduler toPaymentTerminalRecovery delay 1000 send onPaymentTerminalRecovery&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
peripheral PeripheralControl {&lt;br /&gt;
	lineDisplay LineDisplay &lt;br /&gt;
	posPrinter POSPrinter&lt;br /&gt;
	cashDrawer CashDrawer&lt;br /&gt;
	payment VeriFone&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== states =====&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
states {&lt;br /&gt;
	StatemachineState&lt;br /&gt;
	. . .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
state &amp;lt;state name&amp;gt;{&lt;br /&gt;
	[triggers {&lt;br /&gt;
		trigger (&amp;lt;StatemachineEvent&amp;gt;. . .)&lt;br /&gt;
		[guards { &lt;br /&gt;
			guard &amp;lt;function:FunctionLibraryGuard&amp;gt; [onFail caption &amp;lt;onFailCaption STRING&amp;gt; description &amp;lt;onFailDescription STRING&amp;gt; type StatemachineUserMessageType]&lt;br /&gt;
			. . .&lt;br /&gt;
		}]&lt;br /&gt;
		actions [transition &amp;lt;StatemachineState&amp;gt;] { &lt;br /&gt;
			StatemachineAction&lt;br /&gt;
			. . .&lt;br /&gt;
		}&lt;br /&gt;
		. . .&lt;br /&gt;
	}] &lt;br /&gt;
  &amp;amp;	[identity operation &amp;lt;function:FunctionLibraryOperation&amp;gt;	(StatemachineActionFieldConcatenation [,StatemachineActionFieldConcatenation . . . ])]&lt;br /&gt;
  &amp;amp;	[keystroke @&amp;lt;StatemachineControlFieldAttribute&amp;gt; [and operation &amp;lt;function:FunctionLibraryOperation&amp;gt; (StatemachineActionFieldConcatenation [,StatemachineActionFieldConcatenation . . . ]]]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*'''states''' - The container for all state definitions of this state machine.&lt;br /&gt;
*'''state''' - A single state the machine can be at a point in time.&lt;br /&gt;
*'''triggers''' - The container for all possible event processing blocks inside a state.&lt;br /&gt;
*'''trigger''' - The action block following this trigger will be executed when one of its events occur.&lt;br /&gt;
*'''actions''' - The container for all process instructions to be done in sequence inside this block. Optionally an action block can follow a transition.&lt;br /&gt;
*'''transistion''' - The transition will be executed when all actions of this block were processed successfully.&lt;br /&gt;
*'''guards''' - The container for guards protecting the following transistion.&lt;br /&gt;
*'''guard''' - A condition that must evaluate to true that the following transistion will be processed.&lt;br /&gt;
* StatemachineUserMessageType is including: humanized |warning |error |tray |assistive.&lt;br /&gt;
&lt;br /&gt;
► '''example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
state IDLE { &lt;br /&gt;
	triggers {&lt;br /&gt;
		trigger onStartUp&lt;br /&gt;
		actions transition LOCKED{&lt;br /&gt;
			clearDevice LineDisplay &lt;br /&gt;
			displayText text translate &amp;quot;locked&amp;quot; @LineDisplay&lt;br /&gt;
			invisible entry&lt;br /&gt;
			invisible receipt &lt;br /&gt;
			invisible FunctionPad&lt;br /&gt;
			invisible PaymentPad&lt;br /&gt;
			invisible PluPad&lt;br /&gt;
			invisible sku&lt;br /&gt;
			invisible plu&lt;br /&gt;
			invisible method&lt;br /&gt;
			invisible paymentFields&lt;br /&gt;
			invisible filterToggle&lt;br /&gt;
			visible login&lt;br /&gt;
			visible NumericPad &lt;br /&gt;
			visible numbers&lt;br /&gt;
			visible functions&lt;br /&gt;
			visible erase&lt;br /&gt;
			visible delete&lt;br /&gt;
			visible ok&lt;br /&gt;
			printerBitmap id 1 name &amp;quot;OSbee&amp;quot; @POSPrinter&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
state MODIFY_PAYMENT {&lt;br /&gt;
	triggers {&lt;br /&gt;
		trigger onCancel &lt;br /&gt;
		actions transition PAYMENT{&lt;br /&gt;
			transition PAYMENTTERMINAL_REVERSAL guard  canCancelPaymentTerminal {&lt;br /&gt;
				visible paymentTerminal&lt;br /&gt;
				invisible money&lt;br /&gt;
				invisible method&lt;br /&gt;
				invisible functions&lt;br /&gt;
				store event with paymentMethod.last&lt;br /&gt;
				paymentReversal withPassword &lt;br /&gt;
				dto cashregister.payment_password &lt;br /&gt;
				ofReceipt function getSelectedPaymentReceipt() @VeriFone&lt;br /&gt;
			}&lt;br /&gt;
			operation cancelPayment()&lt;br /&gt;
			invisible cancelit&lt;br /&gt;
			visible numbers&lt;br /&gt;
			visible erase&lt;br /&gt;
			visible delete&lt;br /&gt;
			visible money&lt;br /&gt;
			visible method&lt;br /&gt;
			operation computePayed()&lt;br /&gt;
			operation givenChanged()&lt;br /&gt;
			clearDevice LineDisplay&lt;br /&gt;
			displayTextAt text translate &amp;quot;total&amp;quot; row 0 column 0 @LineDisplay&lt;br /&gt;
			displayTextAt text translate &amp;quot;remain&amp;quot; row 0 column 10 @LineDisplay&lt;br /&gt;
			displayTextAt text function getPaymentTotal() row 1 column 0 @LineDisplay&lt;br /&gt;
			displayTextAt text function getPaymentRemain() row 1 column 10 @LineDisplay&lt;br /&gt;
		}&lt;br /&gt;
		trigger onBack&lt;br /&gt;
		actions transition PAYMENT{&lt;br /&gt;
			visible numbers&lt;br /&gt;
			invisible cancelit&lt;br /&gt;
			visible erase&lt;br /&gt;
			visible delete&lt;br /&gt;
			visible money&lt;br /&gt;
			visible method&lt;br /&gt;
		}&lt;br /&gt;
		trigger onPaymentSelection&lt;br /&gt;
		guards {&lt;br /&gt;
			guard hasNoPaymentSelection&lt;br /&gt;
		}&lt;br /&gt;
		actions transition PAYMENT {&lt;br /&gt;
			visible numbers&lt;br /&gt;
			invisible cancelit&lt;br /&gt;
			visible erase&lt;br /&gt;
			visible delete &lt;br /&gt;
			visible money&lt;br /&gt;
			visible method&lt;br /&gt;
		}&lt;br /&gt;
		trigger onLogout&lt;br /&gt;
		actions transition IDLE{&lt;br /&gt;
			schedule toStart&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
state PAYMENTTERMINAL_FAILURE {&lt;br /&gt;
	triggers {&lt;br /&gt;
		trigger onPaymentTerm&lt;br /&gt;
		actions transition PAYMENT {&lt;br /&gt;
			invisible paymentTerminal&lt;br /&gt;
			visible money&lt;br /&gt;
			visible method&lt;br /&gt;
			visible functions&lt;br /&gt;
			operation givenChanged()&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Copyright Notice ==&lt;br /&gt;
{{Copyright Notice}}&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=Datainterchange_DSL&amp;diff=3014</id>
		<title>Datainterchange DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=Datainterchange_DSL&amp;diff=3014"/>
				<updated>2018-02-12T12:30:25Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The Data Interchange DSL (datainterchange for short) is made for defining data exchange models that can be used to import data from various formats (CSV, XML, EDI, etc.), map the data to entities, store them into database, or export them back into other formats.&lt;br /&gt;
&lt;br /&gt;
You only need to define the ''relationship'' between the file and the bean, not the import / export process themselves. Once defined, these models can be used in e.g. action DSL to define actions which, when triggered, execute the actual import / export process, which are generated automatically by the OSBP based on the model.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
As shown on the figure below, the [DSL Inferrer] will generate various views and In/Export component according to model described by datainterchange DSL (and action DSL, in the case of ActionButtons). The action buttons, when clicked, will trigger their corresponding In/Export processes by putting [http://download.osbee.org/downloads/javadoc/osbee-master-clean/org.eclipse.osbp.xtext.datainterchange.feature/apidocs/ WorkerThread (Runnable)] jobs into the executor job pool within the TriggerView (prefixed with datainterchang name), buttons (and toolbar / menus containing them) are further included in the perspective.&lt;br /&gt;
&lt;br /&gt;
[[File:Datainterchange.png|600px|center|frame|''Figure 1: - Data Interchange Structure.'']]&lt;br /&gt;
&lt;br /&gt;
==Data Interchange Model File==&lt;br /&gt;
&lt;br /&gt;
Datainterchange DSL model files end with the &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt; extension. Data Interchange models may be split into several &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt; files, as long as they have the same package declaration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following we will dive deeper into the description and the usage of Datainterchange related and reserved keywords.&lt;br /&gt;
&lt;br /&gt;
===import===&lt;br /&gt;
In the import section are all entities to be found - as full qualified names – that are currently used in the DSL.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
import ns net.osbee.sample.foodmart.entities.Mstore&lt;br /&gt;
import ns net.osbee.sample.foodmart.entities.Mwarehouse&lt;br /&gt;
import ns net.osbee.sample.foodmart.entities.Mregion&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;ns&amp;lt;/code&amp;gt; is a mandatory keyword (stands for &amp;quot;namespace&amp;quot;) that comes after import for distinguishing the OS.bee internal namespaces and Java library namespaces. Wildcards are not supported, all names should be imported separately. Note that the import section will be imported/added automatically if they are used in the package, so you don't have to manually manage this section.&lt;br /&gt;
&lt;br /&gt;
===package===&lt;br /&gt;
&lt;br /&gt;
Datainterchange DSL model files must start with a package declaration. Packages are the root element of the DSL and should be defined as &amp;lt;code&amp;gt;&amp;lt;ApplicationName&amp;gt;.datainterchange&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;package net.osbee.sample.foodmart.datainterchanges { }&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Data Interchange models may be split into several .data files, as long as they have the same package declaration, the interchanges will be available under this package name.&lt;br /&gt;
&lt;br /&gt;
===title===&lt;br /&gt;
With the keyword title you can give a name to the corresponding TriggerView dialog inside your application. For example, the definition of the same datainterchanges package from above with title &amp;quot;Data Interchange Example&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;package net.osbee.sample.foodmart.datainterchanges title &amp;quot;Data Interchange Example&amp;quot; {}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This title will be translated based on locale.&lt;br /&gt;
&lt;br /&gt;
You can get more details about the TriggerView in the section below.&lt;br /&gt;
&lt;br /&gt;
===interchange===&lt;br /&gt;
The &amp;lt;code&amp;gt;interchange&amp;lt;/code&amp;gt; keyword defines interchange units for entities in the package, it should be in the form of:&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange &amp;lt;InterchangeUnitName&amp;gt; [describedBy &amp;lt;description&amp;gt;] &amp;lt;EntityManagerMode&amp;gt; file &amp;lt;FileType&amp;gt; [&amp;lt;FileDetails&amp;gt;] beans {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;InterchangeUnitName&amp;lt;/code&amp;gt; being the name of the interchange unit; &amp;lt;code&amp;gt;describedBy&amp;lt;/code&amp;gt; (optional) can be used to provide a short description string. &amp;lt;code&amp;gt;EntityManagerMode&amp;lt;/code&amp;gt; being how the file should be handled (see section &amp;quot;persist, merge, remove&amp;quot; below), and after &amp;lt;code&amp;gt;file&amp;lt;/code&amp;gt; keyword, you should specify the type of the source / target data file you would like to import from or export to, then the file path, and other details depends on the type.&lt;br /&gt;
&lt;br /&gt;
The following example specifies an interchange that reads a CSV file under the specified path (note the forward slash as the path separator), delimited by semicolon, skip one line (the header), and treat the content as encoded in UTF-8:&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
interchange CurrencyNames persist file&lt;br /&gt;
CSV &amp;quot;C:/data/ISOCurrencyCode20170101.csv&amp;quot; delimiter &amp;quot;;&amp;quot; skipLines 1 encoding &amp;quot;UTF-8&amp;quot;&lt;br /&gt;
beans {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;beans&amp;lt;/code&amp;gt; keyword comes after all the file specification and starts a block of entity definitions, which will be covered in section &amp;quot;entity&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===describedBy===&lt;br /&gt;
With this keyword you can the optional description of an interchange unit as shown below. &lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Currencies describedBy &amp;quot;european central bank currency exchange rates based on euro&amp;quot; persist ... { ... }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===vectorName===&lt;br /&gt;
With the optional keyword &amp;lt;code&amp;gt;vectorName&amp;lt;/code&amp;gt; followed by a string value you are able to define the name of the root element of both XML configuration files needed by Smooks. Please note that it also means that the first (root-)element of an XML-File you would have exported (file filled with real data) via the application will have the same name.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Stores remove vectorName &amp;quot;stores&amp;quot; elementSize 83 file ... { ... }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can view the result of this sample of code like shown below on figure[[#Figure3|''3'']].&lt;br /&gt;
&lt;br /&gt;
===persist, merge, remove===&lt;br /&gt;
These keywords define the purpose of the datainterchange unit and has a similar meaning as in the JPA's EntityManager class. Basically, &amp;lt;code&amp;gt;persist&amp;lt;/code&amp;gt; will insert the data records into database, &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; will update existing data record, or insert new one if necessary, &amp;lt;code&amp;gt;remove&amp;lt;/code&amp;gt; will remove the record if it could be found in database.&lt;br /&gt;
&lt;br /&gt;
► '''Example 1''': (persist)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange EDIOrders describedBy &amp;quot;Orders&amp;quot; persist file&lt;br /&gt;
XML &amp;quot;C:/data/orders.xml&amp;quot;&lt;br /&gt;
beans {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
► '''Example 2''': (merge)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Stores merge file&lt;br /&gt;
XML &amp;quot;C:/data/stores.xml&amp;quot;&lt;br /&gt;
beans {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
► '''Example 3''': (remove)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Storesremove remove file&lt;br /&gt;
XML &amp;quot;C:/data/stores_remove.xml&amp;quot;&lt;br /&gt;
beans {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===file===&lt;br /&gt;
With the keyword file you are able to set the file format of the files you intent to process with you interchange unit.&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange &amp;lt;SampleInterchangeUnitName&amp;gt; &amp;lt;EntityManagerMode&amp;gt; file &amp;lt;FileNameFormat&amp;gt; {}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current supported file formats are CSV, EDI and XML followed by the name of the file you want to process, given its full path location in the system.&lt;br /&gt;
► '''Example 1''':&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange SampleInterchangeUnit1 merge file CSV &amp;quot;C:/temp/testFile.csv&amp;quot; {}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
► '''Example 2''':&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange SampleInterchangeUnit2 persist file XML &amp;quot;C:/temp/testFile.xml&amp;quot; {}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
► '''Example 3''':&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange SampleInterchangeUnit3 merge file EDI &amp;quot;C:/temp/testFile.edi&amp;quot; {}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After choosing the file format you can either give the file name as a String value in a double quote &amp;quot;...&amp;quot; as shown here above, or press Ctrl+Space to get via the content assist the option of opening a File Chooser/Picker to specify the file you want to work with.&lt;br /&gt;
&lt;br /&gt;
[[File:FileChooser.jpg|center|frame|''Figure 2: File Chooser'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please note that you can also change the path(?) of the file to process on runtime by selecting a new file.&lt;br /&gt;
&lt;br /&gt;
===mapByAttribute===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;mapByAttribute&amp;lt;/code&amp;gt; keyword is an XML-specific keyword that turns on the automatic attribute mapping. When enabled, datainterchange will detect if the value being mapped is from an attribute. For example, the 'USD' value in the following XML file comes from the attribute 'currency' of the element 'Cube':&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Cube currency='USD' rate='1.3759'/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
while in the following XML file, the same value is encapsulated in the element 'currency':&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Cube&amp;gt;&lt;br /&gt;
 &amp;lt;currency&amp;gt;USD&amp;lt;/currency&amp;gt;&lt;br /&gt;
 &amp;lt;rate&amp;gt;1.3759&amp;lt;/rate&amp;gt;&lt;br /&gt;
&amp;lt;/Cube&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When &amp;lt;code&amp;gt;mapByAttribute&amp;lt;/code&amp;gt; is present, datainterchange will automatically decide that a query in the form like &amp;lt;code&amp;gt;'/Cube/currency'&amp;lt;/code&amp;gt; will also catch the value from attribute. Without it, the query will have to put a &amp;lt;code&amp;gt;'@'&amp;lt;/code&amp;gt; symbol in front of the attribute name, i.e. &amp;lt;code&amp;gt;'/Cube/@currency'&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===elementSize===&lt;br /&gt;
With the keyword &amp;lt;code&amp;gt;elementSize&amp;lt;/code&amp;gt; followed by an integer, the user can set the estimated average size of the elements in bytes. Since the underlying API cannot know the size of an element before it is processed, this value can be supplied as a guide value to be used for estimating the import / output progress based on how much bytes have been processed.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange EDIOrders describedBy &amp;quot;edi orders&amp;quot; persist elementSize 50 file EDI &amp;quot;C:/data/orders.edi&amp;quot; beans {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Defines an average estimated element size of 50 bytes.&lt;br /&gt;
&lt;br /&gt;
===delimiter===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;delimiter&amp;lt;/code&amp;gt; is a CSV format-specific keyword, which defines the character to use in the CSV file to set the delimiter/separation character between different values. Default value is &amp;quot;,&amp;quot; (comma).&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange CurrencyNames persist file&lt;br /&gt;
CSV &amp;quot;C:/data/ISOCurrencyCodes081507.csv&amp;quot; delimiter &amp;quot;;&amp;quot; ... {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will set the delimiter of the CSV file to &amp;quot;;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===skipLines===&lt;br /&gt;
This is a CSV format-specific keyword. Using &amp;lt;code&amp;gt;skipLines&amp;lt;/code&amp;gt; followed by an integer, the user can specify the number of lines to be skipped from the beginning in the processing of the selected file, this can be used to skip headers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange CurrencyNames persist file CSV &amp;quot;C:/data/ISOCurrencyCodes081507.csv&amp;quot; ... skipLines 1 encoding &amp;quot;UTF-8&amp;quot; {&lt;br /&gt;
   ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will skip the first line of the CSV file.&lt;br /&gt;
&lt;br /&gt;
===report===&lt;br /&gt;
&lt;br /&gt;
If a '''datainterchange''' unit is defined with the &amp;lt;code&amp;gt;report&amp;lt;/code&amp;gt; keyword, a report will be generated for data conversions. The report file is generated by Smooks, lies under &amp;lt;code&amp;gt;/smooks&amp;lt;/code&amp;gt; output directory of the datainterchange bundle, and has a name in the form like &amp;lt;code&amp;gt;&amp;lt;DataInterChangeName&amp;gt;-input.xml&amp;lt;/code&amp;gt; for input processes, and &amp;lt;code&amp;gt;&amp;lt;DataInterChangeName&amp;gt;-output.xml&amp;lt;/code&amp;gt; for output processes. '''Note: turn on report will have an impact performance.'''&lt;br /&gt;
&lt;br /&gt;
===indent===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;indent&amp;lt;/code&amp;gt; is a CSV-format specified keyword which adds indentation character data to the generated event stream. This simply makes the generated event stream easier to read in its serialized form and generally should only be used in testing.&lt;br /&gt;
&lt;br /&gt;
===quoteCharacter===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;quoteCharacter&amp;lt;/code&amp;gt; is a CSV format-specific keyword, which defines the character to use in the CSV file to identify values.&lt;br /&gt;
&lt;br /&gt;
===encoding===&lt;br /&gt;
With the keyword '''enconding''' followed by the encoding name as a string value you are able to specify the valid encoding of the file content.&lt;br /&gt;
&lt;br /&gt;
► '''Example 1''':&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange SampleInterchangeUnitName merge elementSize 50 file CSV &amp;quot;C:/temp/testFile.csv&amp;quot; delimiter &amp;quot;;&amp;quot; skipLines 1 encoding &amp;quot;UTF-8&amp;quot;{}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
► '''Example 2''':&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange SampleInterchangeUnitName remove elementSize 50 file CSV &amp;quot;C:/temp/testFile.csv&amp;quot; delimiter &amp;quot;;&amp;quot; skipLines 1 encoding &amp;quot;GB18030&amp;quot;{}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
► '''Example 3''':&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange SampleInterchangeUnitName persistelementSize 50 file CSV &amp;quot;C:/temp/testFile.csv&amp;quot; delimiter &amp;quot;;&amp;quot; skipLines 1 encoding &amp;quot;ISO-2022-JP&amp;quot;{}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===mappingModel===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;mappingModel&amp;lt;/code&amp;gt; keyword is an EDI-specific keyword which can be used to specify an EDI to XML mapping model in XML format for Smooks.&lt;br /&gt;
&lt;br /&gt;
===validate===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;validate&amp;lt;/code&amp;gt; keyword is an EDI-specific keyword that...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===beans===&lt;br /&gt;
&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;beans&amp;lt;/code&amp;gt; starts the series of entities. The name &amp;quot;bean&amp;quot; comes from the internal entities called JavaBean, which act as data containers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===entity===&lt;br /&gt;
&lt;br /&gt;
With the &amp;lt;code&amp;gt;entity&amp;lt;/code&amp;gt; keyword followed by a fully qualified name, the user can specify the mapping between a source data file and a data-containing entity. The behavior of the mapping can be further fine-tuned with the keywords discussed below. While these keywords can theoretically be combined all together and create very complicated behavior, they are normally used in a simple and straight forward way.&lt;br /&gt;
&lt;br /&gt;
The general form of &amp;lt;code&amp;gt;entity&amp;lt;/code&amp;gt; keywords is:&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
entity &amp;lt;ID&amp;gt;&lt;br /&gt;
    [nodeName &amp;lt;node-name&amp;gt;]&lt;br /&gt;
    [createOn &amp;lt;element-map&amp;gt;]&lt;br /&gt;
    [marker &amp;lt;property-name&amp;gt;]&lt;br /&gt;
    [expression '{' &amp;lt;expressions&amp;gt; '}'] &lt;br /&gt;
    [lookup '{' &amp;lt;lookup-rules&amp;gt; '}']&lt;br /&gt;
    [format '{' &amp;lt;formats&amp;gt; '}']&lt;br /&gt;
    [mapping '{' &amp;lt;mappings&amp;gt; '}']&lt;br /&gt;
    [keys '{' &amp;lt;lookup-keys&amp;gt; '}']&lt;br /&gt;
;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The order of the keywords is fixed, i.e. they are all optional, but must appear in the given order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====nodeName====&lt;br /&gt;
&lt;br /&gt;
With the optional keyword &amp;lt;code&amp;gt;nodeName&amp;lt;/code&amp;gt; followed by a string you can specify the name (alias) of corresponding elements inside an (XML) input/output configuration file. This name is used to identify entities within an XML file using the [http://freemarker.org/docs/pgui_datamodel.html NodeModel of Freemarker] instead of using the standard Java Object Model name. For example:&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Stores remove vectorName &amp;quot;stores&amp;quot; elementSize 83 file XML &amp;quot;C:/.../net.osbee.sample.foodmart/net.osbee.sample.foodmart.datainterchange/smooks-resources/stores.xml&amp;quot; beans {&lt;br /&gt;
	entity Mregion nodeName    &amp;quot;region&amp;quot;&lt;br /&gt;
	entity Mstore nodeName     &amp;quot;store&amp;quot;&lt;br /&gt;
	entity Mwarehouse nodeName &amp;quot;warehouse&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result from this example code is the generation of Smooks configuration files, in which the structure of the output data file (order of elements) will be the same as declared inside the beans {...} expression block. The alias you have specified after the keyword will be used as element (entity) name inside the XML files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Figure3&amp;quot;&amp;gt; [[File:FreeMarkerNodeModelStoreInEx.png|600px|thumb|center|''Figure 3: Store-import.xml and  Store-export.xml with NodeModel'']] &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The use of this keyword gives you the flexibility of naming entities using aliases in order to match any third part system description. By omitting the definition of both aliases ''region'' and ''warehouse'' like shown below, we obtain slightly divergent but very different contents than the ones from above.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Stores remove vectorName &amp;quot;stores&amp;quot; elementSize 83 file XML &amp;quot;C:/.../net.osbee.sample.foodmart/net.osbee.sample.foodmart.datainterchange/smooks-resources/stores.xml&amp;quot; beans {&lt;br /&gt;
	entity Mregion&lt;br /&gt;
	entity Mstore nodeName     &amp;quot;store&amp;quot;&lt;br /&gt;
	entity Mwarehouse&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:FreeMarkerJavaObjectModelStoreInEx.png|600px|thumb|center|''Figure 4: Store-import.xml (normal) and Store-export.xml (normal) with Java Object Model Name'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please note that the declaration order of each node names matters.&lt;br /&gt;
&lt;br /&gt;
====createOn====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;createOn&amp;lt;/code&amp;gt; keyword followed by a string specifies on which input element should an entity to be created. For example:&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
entity Mcurrency createOn &amp;quot;/Envelope/Cube/Cube/Cube&amp;quot; ... {&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will create an &amp;lt;code&amp;gt;Mcurrency&amp;lt;/code&amp;gt; entity when encountering &amp;lt;code&amp;gt;/Envelope/Cube/Cube&amp;lt;/code&amp;gt; in the source data file.&lt;br /&gt;
&lt;br /&gt;
====marker====&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;marker&amp;lt;/code&amp;gt; keyword optionally followed by a property-name, the user can set the data to be imported to have an additional property under the given name whose value set to 1, while updating the existing data to have this property having value 0. This could be useful to identify the most recent import of some periodically updated data. For example:&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
entity McurrencyStream createOn &amp;quot;/Envelope/Cube&amp;quot; marker latest expression {&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will make the entity &amp;lt;code&amp;gt;McurrencyStream&amp;lt;/code&amp;gt; to have a property &amp;quot;&amp;lt;code&amp;gt;latest&amp;lt;/code&amp;gt;&amp;quot;, which is to be set to 1 for the most recently imported data.&lt;br /&gt;
&lt;br /&gt;
====expression====&lt;br /&gt;
&lt;br /&gt;
With an &amp;lt;code&amp;gt;expression { ... }&amp;lt;/code&amp;gt; block, the user can define expressions that assign certain value to an entity property. These expressions are of two types, the first one is:&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  assign &amp;lt;id&amp;gt; with &amp;lt;value&amp;gt; as &amp;lt;type&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
this will assign the property &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; with the value of &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;, in type of &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; may be one of the following:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;NowDate&amp;lt;/code&amp;gt;: the date of now (the time point of action)&lt;br /&gt;
* &amp;lt;code&amp;gt;StartDate&amp;lt;/code&amp;gt;: the date when the process started&lt;br /&gt;
* &amp;lt;code&amp;gt;UniversallyUniqueIdentifier&amp;lt;/code&amp;gt;: an UUID&lt;br /&gt;
&lt;br /&gt;
and &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; may be one of the following:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Date&amp;lt;/code&amp;gt;: the value of NowDate or StartDate will be in date format&lt;br /&gt;
* &amp;lt;code&amp;gt;Milliseconds&amp;lt;/code&amp;gt;: the value of NowDate or StartDate will be in millisecond&lt;br /&gt;
* &amp;lt;code&amp;gt;Nanoseconds&amp;lt;/code&amp;gt;: the value of NowDate or StartDate will be in nanosconds&lt;br /&gt;
* &amp;lt;code&amp;gt;Random&amp;lt;/code&amp;gt;: the value of UUID will be random&lt;br /&gt;
* &amp;lt;code&amp;gt;ExecuteContext&amp;lt;/code&amp;gt;: the value of UUID will be unique for the execute context&lt;br /&gt;
&lt;br /&gt;
Note that the &amp;lt;code&amp;gt;Random&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ExecuteContext&amp;lt;/code&amp;gt; should be only combined with &amp;lt;code&amp;gt;UniversallyUniqueIdentifier&amp;lt;/code&amp;gt;, while the other types should be only combined with &amp;lt;code&amp;gt;NowDate&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StartDate&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
  entity McurrencyStream createOn &amp;quot;/Envelope/Cube&amp;quot; marker latest expression {&lt;br /&gt;
      assign importDate with NowDate as Date&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will assign the &amp;lt;code&amp;gt;importDate&amp;lt;/code&amp;gt; as the current date in &amp;lt;code&amp;gt;Date&amp;lt;/code&amp;gt; format.&lt;br /&gt;
&lt;br /&gt;
The other type of expression has the form:&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  copy &amp;lt;target-property&amp;gt; from &amp;lt;entity-name&amp;gt; property &amp;lt;from-property&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which will copy the value of &amp;lt;code&amp;gt;from-property&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;entity-name&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;target-property&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  entity Mcurrency createOn &amp;quot;/Envelope/Cube/Cube/Cube&amp;quot; expression {&lt;br /&gt;
      copy currencyDate from McurrencyDay property ratingDate&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will copy the value of &amp;lt;code&amp;gt;ratingDate&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;McurrencyDay&amp;lt;/code&amp;gt; entity to &amp;lt;code&amp;gt;currencyDate&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====lookup====&lt;br /&gt;
&amp;lt;div id=&amp;quot;lookup&amp;quot;&amp;gt;&lt;br /&gt;
With a &amp;lt;code&amp;gt;lookup&amp;lt;/code&amp;gt; { ... } block, the user can define a set of '''lookup-rules''' to identify complex data within our persistence layer (DB or In-Memory...). This makes sense when the data in a source file can't be clearly identified by an attribute (id), but moreover when the set data it contains is persisted over several entities.&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
lookup {&lt;br /&gt;
   [&amp;lt;lookup-rules&amp;gt;]*&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lookup-rule expression:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
lookup-rule: &lt;br /&gt;
 'for' .. 'on' .. 'createOn' .. 'with' .. 'cacheSize' .. 'mapTo' .. ['allowNoResult' | 'allowNoResult' | 'markerPath']&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Currencies describedBy &amp;quot;european central bank currency exchange rates based on euro&amp;quot; persist elementSize 50 file&lt;br /&gt;
	XML &amp;quot;C:/git/development/net.osbee.sample.foodmart/net.osbee.sample.foodmart.datainterchange/smooks-resources/eurofxref-hist-90d.xml&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	mapByAttribute beans {&lt;br /&gt;
		entity McurrencyStream createOn &amp;quot;/Envelope/Cube&amp;quot; marker latest expression {&lt;br /&gt;
			assign importDate with NowDate as Date&lt;br /&gt;
		}&lt;br /&gt;
		entity McurrencyDay createOn &amp;quot;/Envelope/Cube/Cube&amp;quot; format {&lt;br /&gt;
			for ratingDate coding &amp;quot;yyyy-MM-dd&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
		mapping {&lt;br /&gt;
			map ratingDate to &amp;quot;time&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
		entity Mcurrency createOn &amp;quot;/Envelope/Cube/Cube/Cube&amp;quot; expression {&lt;br /&gt;
			copy currencyDate from McurrencyDay property ratingDate&lt;br /&gt;
		}&lt;br /&gt;
		lookup {&lt;br /&gt;
			for currency_name on McurrencyName createOn &amp;quot;/Envelope/Cube/Cube/Cube&amp;quot; with isoCode cacheSize 300 mapTo &amp;quot;currency&amp;quot; allowNoResult&lt;br /&gt;
			markerPath {&lt;br /&gt;
				markerEntity McurrencyNameStream markedBy latest&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		mapping {&lt;br /&gt;
			map conversion_ratio to &amp;quot;rate&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will provide you in upcoming releases with more information about so called '''locator''' instances, which are generated in the background on the basis of the '''lookups''' you would have defined, in order to query persisted data. This will give you more insights about how the Datainterchange DSL really works at the lower level.&lt;br /&gt;
&lt;br /&gt;
====format====&lt;br /&gt;
&lt;br /&gt;
With a &amp;lt;code&amp;gt;format { ... }&amp;lt;/code&amp;gt; block, the user can define the format of the entity property being converted. A &amp;lt;code&amp;gt;format&amp;lt;/code&amp;gt; block can have more than one format definitions, in the following format:&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    format {&lt;br /&gt;
        for &amp;lt;property&amp;gt; coding &amp;lt;format-string&amp;gt; [locale &amp;lt;locale-string&amp;gt;]&lt;br /&gt;
        ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    entity McurrencyDay createOn &amp;quot;/Envelope/Cube/Cube&amp;quot; format {&lt;br /&gt;
        for ratingDate coding &amp;quot;yyyy-MM-dd&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will convert the &amp;lt;code&amp;gt;&amp;quot;/Envelope/Cube/Cube&amp;quot;&amp;lt;/code&amp;gt; data to &amp;lt;code&amp;gt;ratingDate&amp;lt;/code&amp;gt; property of &amp;lt;code&amp;gt;McurrencyDay&amp;lt;/code&amp;gt; in format &amp;lt;code&amp;gt;&amp;quot;yyyy-MM-dd&amp;quot;&amp;lt;/code&amp;gt;, where&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    entity EDIOrderHeader createOn &amp;quot;/Order/header&amp;quot; format {&lt;br /&gt;
        for hdrDate coding &amp;quot;EEE MMM dd HH:mm:ss zzz yyyy&amp;quot; locale &amp;quot;en_US&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will format the &amp;lt;code&amp;gt;hdrDate&amp;lt;/code&amp;gt; in format &amp;lt;code&amp;gt;&amp;quot;EEE MMM dd HH:mm:ss zzz yyyy&amp;quot;&amp;lt;/code&amp;gt; with English locale, i.e. the month and weekday names will be in English.&lt;br /&gt;
&lt;br /&gt;
====mapping====&lt;br /&gt;
With a &amp;lt;code&amp;gt;mapping { ... }&amp;lt;/code&amp;gt; block, the user can easily '''map''' (or rather '''match''') attributes of the data model to values from external source files.&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
mapping {&lt;br /&gt;
 [map &amp;lt;entity-attribute&amp;gt; to &amp;lt;Data&amp;gt;]*&lt;br /&gt;
 [mapBlob &amp;lt;entity-attribute&amp;gt; to &amp;lt;Data&amp;gt; [extension &amp;lt;blob-file-extension] [path &amp;lt;blob-path&amp;gt;] mimeType &amp;lt;mine-type&amp;gt; ]*&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
mapping{&lt;br /&gt;
  map conversion_ratio to &amp;quot;rate&amp;quot;&lt;br /&gt;
  mapBlob currency_icon to &amp;quot;currency_icon&amp;quot; extension &amp;quot;png&amp;quot; path &amp;quot;C:/data/currency_images&amp;quot; mimeType png&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first map of the above example will map the attribute conversion_ratio of the entity to field &amp;quot;rate&amp;quot;.&lt;br /&gt;
The second mapBlob does a bit more work, it will:&lt;br /&gt;
&lt;br /&gt;
  * generate full file paths by combining the path, the file names specified by &amp;quot;currency_icon&amp;quot; field, and the extension,&lt;br /&gt;
  * upload the files into database with the given mimeType, and&lt;br /&gt;
  * assign the UUID of the blob to property currency_icon of the entity.&lt;br /&gt;
&lt;br /&gt;
Please note that the only valid attributes here are the members of the corresponding entity, which the user has chosen prior defining the &amp;lt;code&amp;gt;mapping&amp;lt;/code&amp;gt; block itself.&lt;br /&gt;
&lt;br /&gt;
====keys====&lt;br /&gt;
With a &amp;lt;code&amp;gt;keys&amp;lt;/code&amp;gt; { ... } block, the user can define a set of '''keys''' to identify data within our persistence layer (DB or In-Memory...). &lt;br /&gt;
This makes sence when the data in a source file can't be clearly identified by an attribute (id). Therefore a set of attributes (keys) can be defined and then be used as identification parameter set by a [[#lookup|''lookups'']] instance in order to query our data pool and identify data using several criteria.&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
keys {&lt;br /&gt;
 [key &amp;lt;entity-attribute&amp;gt;]*&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Assuming you try to update the address data of an employee from an entity named Employee, but you happen not to have his/her personal id. By setting a &amp;lt;code&amp;gt;keys&amp;lt;/code&amp;gt; { ... } block, like shown here below, you allow the Datainterchange unit to look into the database after employee's data based on the key set inside this block, rather than using a personal id, which might have been here unique and more than enough to find the employee right away.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
keys {&lt;br /&gt;
  key last_name&lt;br /&gt;
  key first_name&lt;br /&gt;
  key age&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that the only valid attributes here are members of the corresponding entity, that you would have chosen prior defining the &amp;lt;code&amp;gt;keys&amp;lt;/code&amp;gt; block itself.&lt;br /&gt;
&lt;br /&gt;
==TriggerView==&lt;br /&gt;
A TriggerView will be automatically generated by the DataInterchange DSL as soon as you define an interchange unit inside the model file and save it. &lt;br /&gt;
&lt;br /&gt;
You can see on the right side of the figure shown below, the definition of 10 interchange units within the Datainterchange model file (blue rectangles); and on the right side of the figure you can see, how the TriggerView looks like (green rectangle), when it is embedded inside an application page in its entirety. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TriggerView.png|600px|center|''Figure 5: Datainterchange TriggerView Definition and Application Views''|thumbnail|600px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To achieve this result you need to do two simple steps. You need first to either integrate the TriggerView into an existing perspective or create a new perspective and then integrate the view into it, like shown below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''Example 1''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import ns net.osbee.sample.foodmart.datainterchanges&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.foodmart.perspectives {&lt;br /&gt;
&lt;br /&gt;
	perspective Currencies iconURI &amp;quot;employee&amp;quot; {&lt;br /&gt;
		sashContainer c1 orientation horizontal {&lt;br /&gt;
			part imex view dataInterchange datainterchanges spaceVolume &amp;quot;20&amp;quot;&lt;br /&gt;
			...&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The most important thing in this example is to notice the use of the keyword '''view''' followed by the keyword '''dataInterchange''' and the name ''datainterchanges'' referring to the package, in which all datainterchange unit definitions have to be found.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second step would be to create a menu entry for you to be able to access the newly created or altered perspective in the application via the menu bar, like shown in the following example.&lt;br /&gt;
&lt;br /&gt;
► '''Example 2''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import ns net.osbee.sample.foodmart.perspectives.Currencies&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.foodmart.menues {  &lt;br /&gt;
	...&lt;br /&gt;
	entry Menu describedBy &amp;quot;my menu&amp;quot; { &lt;br /&gt;
		entry Perspectives {&lt;br /&gt;
			entry MasterData {&lt;br /&gt;
				entry Company image &amp;quot;company&amp;quot; perspective Company&lt;br /&gt;
				entry Employees image &amp;quot;employee&amp;quot; perspective Employee&lt;br /&gt;
				entry Products image &amp;quot;products&amp;quot; perspective Products&lt;br /&gt;
				entry CashRegisterData image &amp;quot;editor_area&amp;quot; perspective CashMasterDataRegister&lt;br /&gt;
&lt;br /&gt;
				entry Currencies image &amp;quot;products&amp;quot; perspective Currencies&lt;br /&gt;
&lt;br /&gt;
				entry People image &amp;quot;task_action_delegate&amp;quot; perspective PeopleMock&lt;br /&gt;
				&lt;br /&gt;
			}&lt;br /&gt;
		...&lt;br /&gt;
	...	}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TriggerViewMenuSelection.png|600px|center|''Figure 6: Datainterchange TriggerView Menu Selection''|thumbnail|600px]]&lt;br /&gt;
&lt;br /&gt;
The figure above shows the same menu structure defined in the example 2 and results in showing the application with the TriggerView, as you can see on the left side of the figure 5. You can get and review more information on how to create menu entries and perspectives in both [[Menu DSL]] and [[Perspective DSL]] documentation pages. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Among all the components that are generated for the use of each interchange unit functions are action buttons, you would find inside toolbars in some dialogs. Usually you have to define them by yourself in the corresponding DSL files. This step is not needed here, since it has already been generated for this particular view.&lt;br /&gt;
&lt;br /&gt;
[[File:TriggerViewActionButtons.png|600px|center|''Figure 7: Action Buttons for datainterchange unit functions''|thumbnail|600px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please note that it is '''not mandatory''' to display all available functionalities through the use of the TriggerView like shown here above. It is customary to only use parts of the generated Datainterchange components (e.g. action buttons) where you see them fit; for instance in order to only use each interchange unit functionalities (import and/or export) in separated and dedicated views (dialogs). Therefore, we also recommend you to have a look at the [[Action DSL]] documentation page in order to understand how to create your own toolbars, and so forth creating the buttons using import or export functions of any datainterchange unit you would have created.&lt;br /&gt;
&lt;br /&gt;
==Smooks Configuration and Settings File==&lt;br /&gt;
'''Please note that whenever a model is saved''', the '''Datainterchange DSL''' will do three things '''automatically''':&lt;br /&gt;
&lt;br /&gt;
* generate Java classes,&lt;br /&gt;
* generate Smooks configuration files for both import and export functions, and&lt;br /&gt;
* generate a config file to modify the import and export paths on runtime.&lt;br /&gt;
&lt;br /&gt;
===Smooks Configuration File===&lt;br /&gt;
&lt;br /&gt;
The OS.bee implementation of Data Interchange interface is based on Smooks. Smooks is a Java framework for processing XML and non XML data (CSV, EDI, Java etc) by mapping data to JavaBeans, which can later be persisted, enriched (merge with existing data from other source), or converted and exported into other formats.&lt;br /&gt;
&lt;br /&gt;
Smooks relies on a proper configuration file for the import / export processes. These configuration files are generated by the Datainterchange DSL automatically. Here is a brief introduction of how the generated Smooks configuration files work.&lt;br /&gt;
&lt;br /&gt;
When a data import / export Smooks instance is initiated, it will be supplied with the generated config file. This file defines the actions to be performed upon certain events during the SAX parsing process. Here is an example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line='line'&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;smooks-resource-list xmlns=&amp;quot;http://www.milyn.org/xsd/smooks-1.1.xsd&amp;quot; xmlns:csv=&amp;quot;http://www.milyn.org/xsd/smooks/csv-1.2.xsd&amp;quot; xmlns:dao=&amp;quot;http://www.milyn.org/xsd/smooks/persistence-1.2.xsd&amp;quot; xmlns:jb=&amp;quot;http://www.milyn.org/xsd/smooks/javabean-1.2.xsd&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;jb:bean beanId=&amp;quot;McurrencyNameStream&amp;quot; class=&amp;quot;net.osbee.sample.foodmart.entities.McurrencyNameStream&amp;quot; createOnElement=&amp;quot;/csv-set&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;jb:expression property=&amp;quot;importDate&amp;quot;&amp;gt;PTIME.nowDate&amp;lt;/jb:expression&amp;gt;&lt;br /&gt;
        &amp;lt;jb:wiring beanIdRef=&amp;quot;McurrencyName&amp;quot; setterMethod=&amp;quot;addToCurrencyNames&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/jb:bean&amp;gt;&lt;br /&gt;
    &amp;lt;jb:bean beanId=&amp;quot;McurrencyName&amp;quot; class=&amp;quot;net.osbee.sample.foodmart.entities.McurrencyName&amp;quot; createOnElement=&amp;quot;/csv-set/csv-record&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;jb:value data=&amp;quot;/csv-set/csv-record/isoCode&amp;quot; decoder=&amp;quot;String&amp;quot; property=&amp;quot;isoCode&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;jb:value data=&amp;quot;/csv-set/csv-record/name&amp;quot; decoder=&amp;quot;String&amp;quot; property=&amp;quot;name&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;jb:value data=&amp;quot;/csv-set/csv-record/countries&amp;quot; decoder=&amp;quot;String&amp;quot; property=&amp;quot;countries&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/jb:bean&amp;gt;&lt;br /&gt;
    &amp;lt;csv:reader fields=&amp;quot;isoCode,name,countries&amp;quot; indent=&amp;quot;false&amp;quot; separator=&amp;quot;;&amp;quot; skipLines=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;params&amp;gt;&lt;br /&gt;
        &amp;lt;param name=&amp;quot;stream.filter.type&amp;quot;&amp;gt;SAX&amp;lt;/param&amp;gt;&lt;br /&gt;
        &amp;lt;param name=&amp;quot;inputType&amp;quot;&amp;gt;input.csv&amp;lt;/param&amp;gt;&lt;br /&gt;
        &amp;lt;param name=&amp;quot;smooks.visitors.sort&amp;quot;&amp;gt;false&amp;lt;/param&amp;gt;&lt;br /&gt;
        &amp;lt;param name=&amp;quot;input.csv&amp;quot; type=&amp;quot;input.type.actived&amp;quot;&amp;gt;C:/git/net.osbee.sample.foodmart/net.osbee.sample.foodmart.datainterchange/smooks-resources/ISOCurrencyCodes081507.csv&amp;lt;/param&amp;gt;&lt;br /&gt;
    &amp;lt;/params&amp;gt;&lt;br /&gt;
&amp;lt;/smooks-resource-list&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Further informations on the Smoooks framework are available and can be reviewed in its [http://www.smooks.org/guide documentation] you will find on the [http://www.smooks.org/index official website].&lt;br /&gt;
&lt;br /&gt;
===Path Config File===&lt;br /&gt;
&lt;br /&gt;
The file is interpreted using the Properties xml im- and export method and looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE properties SYSTEM &amp;quot;http://java.sun.com/dtd/properties.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;properties&amp;gt;&lt;br /&gt;
&amp;lt;comment&amp;gt;dataInterchange file URLs&amp;lt;/comment&amp;gt;&lt;br /&gt;
&amp;lt;entry key=&amp;quot;EmployeesDepartment-import&amp;quot;&amp;gt;C:/myimports/employeesdepartment.xml&amp;lt;/entry&amp;gt;&lt;br /&gt;
&amp;lt;entry key=&amp;quot;EmployeesDepartment-export&amp;quot;&amp;gt;C:/myexports/employeesdepartment.xml&amp;lt;/entry&amp;gt;&lt;br /&gt;
&amp;lt;/properties&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default this file is named like the title in the Data Interchange package and extended by &amp;quot;Config&amp;quot; and has the extension &amp;quot;xml&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;package net.osbee.sample.foodmart.datainterchanges title &amp;quot;DataInterchange&amp;quot; {}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
leads to the filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;DataInterchangeConfig.xml&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and is stored platform independently in the current user's home directory under the subdirectory &amp;quot;.osbee&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
An administrator must receive this configuration file with the application, modify it and place it somewhere on the application server. The path to this configuration file must be supplied in the product's preferences (&amp;lt;code&amp;gt;org.eclipse.osbp.production.prefs&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;datainterchange/datainterchangeConfiguration=c\:\\DataInterchangeConfig.xml&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The path value obviously depends on the operating system you are developing.&lt;br /&gt;
&lt;br /&gt;
== Copyright Notice ==&lt;br /&gt;
{{Copyright Notice}}&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=Datainterchange_DSL&amp;diff=2894</id>
		<title>Datainterchange DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=Datainterchange_DSL&amp;diff=2894"/>
				<updated>2017-11-08T09:05:47Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* mapping */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The Data Interchange DSL (datainterchange for short) is made for defining data exchange models that can be used to import data from various formats (CSV, XML, EDI, etc.), map the data to entities, store them into database, or export them back into other formats.&lt;br /&gt;
&lt;br /&gt;
You only need to define the ''relationship'' between the file and the bean, not the import / export process themselves. Once defined, these models can be used in e.g. action DSL to define actions which, when triggered, execute the actual import / export process, which are generated automatically by the OSBP based on the model.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
As shown on the figure below, the [DSL Inferrer] will generate various views and In/Export component according to model described by datainterchange DSL (and action DSL, in the case of ActionButtons). The action buttons, when clicked, will trigger their corresponding In/Export processes by putting [http://download.osbee.org/downloads/javadoc/osbee-master-clean/org.eclipse.osbp.xtext.datainterchange.feature/apidocs/ WorkerThread (Runnable)] jobs into the executor job pool within the TriggerView (prefixed with datainterchang name), buttons (and toolbar / menus containing them) are further included in the perspective.&lt;br /&gt;
&lt;br /&gt;
[[File:Datainterchange.png|600px|center|frame|''Figure 1: - Data Interchange Structure.'']]&lt;br /&gt;
&lt;br /&gt;
==Data Interchange Model File==&lt;br /&gt;
&lt;br /&gt;
Datainterchange DSL model files end with the &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt; extension. Data Interchange models may be split into several &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt; files, as long as they have the same package declaration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following we will dive deeper into the description and the usage of Datainterchange related and reserved keywords.&lt;br /&gt;
&lt;br /&gt;
===import===&lt;br /&gt;
In the import section are all entities to be found - as full qualified names – that are currently used in the DSL.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
import ns net.osbee.sample.foodmart.entities.Mstore&lt;br /&gt;
import ns net.osbee.sample.foodmart.entities.Mwarehouse&lt;br /&gt;
import ns net.osbee.sample.foodmart.entities.Mregion&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;ns&amp;lt;/code&amp;gt; is a mandatory keyword (stands for &amp;quot;namespace&amp;quot;) that comes after import for distinguishing the OS.bee internal namespaces and Java library namespaces. Wildcards are not supported, all names should be imported separately. Note that the import section will be imported/added automatically if they are used in the package, so you don't have to manually manage this section.&lt;br /&gt;
&lt;br /&gt;
===package===&lt;br /&gt;
&lt;br /&gt;
Datainterchange DSL model files must start with a package declaration. Packages are the root element of the DSL and should be defined as &amp;lt;code&amp;gt;&amp;lt;ApplicationName&amp;gt;.datainterchange&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;package net.osbee.sample.foodmart.datainterchanges { }&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Data Interchange models may be split into several .data files, as long as they have the same package declaration, the interchanges will be available under this package name.&lt;br /&gt;
&lt;br /&gt;
===title===&lt;br /&gt;
With the keyword title you can give a name to the corresponding TriggerView dialog inside your application. For example, the definition of the same datainterchanges package from above with title &amp;quot;Data Interchange Example&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;package net.osbee.sample.foodmart.datainterchanges title &amp;quot;Data Interchange Example&amp;quot; {}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This title will be translated based on locale.&lt;br /&gt;
&lt;br /&gt;
You can get more details about the TriggerView in the section below.&lt;br /&gt;
&lt;br /&gt;
===interchange===&lt;br /&gt;
The &amp;lt;code&amp;gt;interchange&amp;lt;/code&amp;gt; keyword defines interchange units for entities in the package, it should be in the form of:&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange &amp;lt;InterchangeUnitName&amp;gt; [describedBy &amp;lt;description&amp;gt;] &amp;lt;EntityManagerMode&amp;gt; file &amp;lt;FileType&amp;gt; [&amp;lt;FileDetails&amp;gt;] beans {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;InterchangeUnitName&amp;lt;/code&amp;gt; being the name of the interchange unit; &amp;lt;code&amp;gt;describedBy&amp;lt;/code&amp;gt; (optional) can be used to provide a short description string. &amp;lt;code&amp;gt;EntityManagerMode&amp;lt;/code&amp;gt; being how the file should be handled (see section &amp;quot;persist, merge, remove&amp;quot; below), and after &amp;lt;code&amp;gt;file&amp;lt;/code&amp;gt; keyword, you should specify the type of the source / target data file you would like to import from or export to, then the file path, and other details depends on the type.&lt;br /&gt;
&lt;br /&gt;
The following example specifies an interchange that reads a CSV file under the specified path (note the forward slash as the path separator), delimited by semicolon, skip one line (the header), and treat the content as encoded in UTF-8:&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
interchange CurrencyNames persist file&lt;br /&gt;
CSV &amp;quot;C:/data/ISOCurrencyCode20170101.csv&amp;quot; delimiter &amp;quot;;&amp;quot; skipLines 1 encoding &amp;quot;UTF-8&amp;quot;&lt;br /&gt;
beans {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;beans&amp;lt;/code&amp;gt; keyword comes after all the file specification and starts a block of entity definitions, which will be covered in section &amp;quot;entity&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===describedBy===&lt;br /&gt;
With this keyword you can the optional description of an interchange unit as shown below. &lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Currencies describedBy &amp;quot;european central bank currency exchange rates based on euro&amp;quot; persist ... { ... }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===vectorName===&lt;br /&gt;
With the optional keyword &amp;lt;code&amp;gt;vectorName&amp;lt;/code&amp;gt; followed by a string value you are able to define the name of the root element of both XML configuration files needed by Smooks. Please note that it also means that the first (root-)element of an XML-File you would have exported (file filled with real data) via the application will have the same name.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Stores remove vectorName &amp;quot;stores&amp;quot; elementSize 83 file ... { ... }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can view the result of this sample of code like shown below on figure[[#Figure3|''3'']].&lt;br /&gt;
&lt;br /&gt;
===persist, merge, remove===&lt;br /&gt;
These keywords define the purpose of the datainterchange unit and has a similar meaning as in the JPA's EntityManager class. Basically, &amp;lt;code&amp;gt;persist&amp;lt;/code&amp;gt; will insert the data records into database, &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; will update existing data record, or insert new one if necessary, &amp;lt;code&amp;gt;remove&amp;lt;/code&amp;gt; will remove the record if it could be found in database.&lt;br /&gt;
&lt;br /&gt;
► '''Example 1''': (persist)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange EDIOrders describedBy &amp;quot;Orders&amp;quot; persist file&lt;br /&gt;
XML &amp;quot;C:/data/orders.xml&amp;quot;&lt;br /&gt;
beans {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
► '''Example 2''': (merge)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Stores merge file&lt;br /&gt;
XML &amp;quot;C:/data/stores.xml&amp;quot;&lt;br /&gt;
beans {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
► '''Example 3''': (remove)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Storesremove remove file&lt;br /&gt;
XML &amp;quot;C:/data/stores_remove.xml&amp;quot;&lt;br /&gt;
beans {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===file===&lt;br /&gt;
With the keyword file you are able to set the file format of the files you intent to process with you interchange unit.&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange &amp;lt;SampleInterchangeUnitName&amp;gt; &amp;lt;EntityManagerMode&amp;gt; file &amp;lt;FileNameFormat&amp;gt; {}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current supported file formats are CSV, EDI and XML followed by the name of the file you want to process, given its full path location in the system.&lt;br /&gt;
► '''Example 1''':&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange SampleInterchangeUnit1 merge file CSV &amp;quot;C:/temp/testFile.csv&amp;quot; {}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
► '''Example 2''':&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange SampleInterchangeUnit2 persist file XML &amp;quot;C:/temp/testFile.xml&amp;quot; {}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
► '''Example 3''':&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange SampleInterchangeUnit3 merge file EDI &amp;quot;C:/temp/testFile.edi&amp;quot; {}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After choosing the file format you can either give the file name as a String value in a double quote &amp;quot;...&amp;quot; as shown here above, or press Ctrl+Space to get via the content assist the option of opening a File Chooser/Picker to specify the file you want to work with.&lt;br /&gt;
&lt;br /&gt;
[[File:FileChooser.jpg|center|frame|''Figure 2: File Chooser'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please note that you can also change the path(?) of the file to process on runtime by selecting a new file.&lt;br /&gt;
&lt;br /&gt;
===mapByAttribute===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;mapByAttribute&amp;lt;/code&amp;gt; keyword is an XML-specific keyword that turns on the automatic attribute mapping. When enabled, datainterchange will detect if the value being mapped is from an attribute. For example, the 'USD' value in the following XML file comes from the attribute 'currency' of the element 'Cube':&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Cube currency='USD' rate='1.3759'/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
while in the following XML file, the same value is encapsulated in the element 'currency':&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Cube&amp;gt;&lt;br /&gt;
 &amp;lt;currency&amp;gt;USD&amp;lt;/currency&amp;gt;&lt;br /&gt;
 &amp;lt;rate&amp;gt;1.3759&amp;lt;/rate&amp;gt;&lt;br /&gt;
&amp;lt;/Cube&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When &amp;lt;code&amp;gt;mapByAttribute&amp;lt;/code&amp;gt; is present, datainterchange will automatically decide that a query in the form like &amp;lt;code&amp;gt;'/Cube/currency'&amp;lt;/code&amp;gt; will also catch the value from attribute. Without it, the query will have to put a &amp;lt;code&amp;gt;'@'&amp;lt;/code&amp;gt; symbol in front of the attribute name, i.e. &amp;lt;code&amp;gt;'/Cube/@currency'&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===elementSize===&lt;br /&gt;
With the keyword &amp;lt;code&amp;gt;elementSize&amp;lt;/code&amp;gt; followed by an integer, the user can set the estimated average size of the elements in bytes. Since the underlying API cannot know the size of an element before it is processed, this value can be supplied as a guide value to be used for estimating the import / output progress based on how much bytes have been processed.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange EDIOrders describedBy &amp;quot;edi orders&amp;quot; persist elementSize 50 file EDI &amp;quot;C:/data/orders.edi&amp;quot; beans {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Defines an average estimated element size of 50 bytes.&lt;br /&gt;
&lt;br /&gt;
===delimiter===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;delimiter&amp;lt;/code&amp;gt; is a CSV format-specific keyword, which defines the character to use in the CSV file to set the delimiter/separation character between different values. Default value is &amp;quot;,&amp;quot; (comma).&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange CurrencyNames persist file&lt;br /&gt;
CSV &amp;quot;C:/data/ISOCurrencyCodes081507.csv&amp;quot; delimiter &amp;quot;;&amp;quot; ... {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will set the delimiter of the CSV file to &amp;quot;;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===skipLines===&lt;br /&gt;
This is a CSV format-specific keyword. Using &amp;lt;code&amp;gt;skipLines&amp;lt;/code&amp;gt; followed by an integer, the user can specify the number of lines to be skipped from the beginning in the processing of the selected file, this can be used to skip headers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange CurrencyNames persist file CSV &amp;quot;C:/data/ISOCurrencyCodes081507.csv&amp;quot; ... skipLines 1 encoding &amp;quot;UTF-8&amp;quot; {&lt;br /&gt;
   ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will skip the first line of the CSV file.&lt;br /&gt;
&lt;br /&gt;
===report===&lt;br /&gt;
&lt;br /&gt;
If a '''datainterchange''' unit is defined with the &amp;lt;code&amp;gt;report&amp;lt;/code&amp;gt; keyword, a report will be generated for data conversions. The report file is generated by Smooks, lies under &amp;lt;code&amp;gt;/smooks&amp;lt;/code&amp;gt; output directory of the datainterchange bundle, and has a name in the form like &amp;lt;code&amp;gt;&amp;lt;DataInterChangeName&amp;gt;-input.xml&amp;lt;/code&amp;gt; for input processes, and &amp;lt;code&amp;gt;&amp;lt;DataInterChangeName&amp;gt;-output.xml&amp;lt;/code&amp;gt; for output processes. '''Note: turn on report will have an impact performance.'''&lt;br /&gt;
&lt;br /&gt;
===indent===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;indent&amp;lt;/code&amp;gt; is a CSV-format specified keyword which adds indentation character data to the generated event stream. This simply makes the generated event stream easier to read in its serialized form and generally should only be used in testing.&lt;br /&gt;
&lt;br /&gt;
===quoteCharacter===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;quoteCharacter&amp;lt;/code&amp;gt; is a CSV format-specific keyword, which defines the character to use in the CSV file to identify values.&lt;br /&gt;
&lt;br /&gt;
===encoding===&lt;br /&gt;
With the keyword '''enconding''' followed by the encoding name as a string value you are able to specify the valid encoding of the file content.&lt;br /&gt;
&lt;br /&gt;
► '''Example 1''':&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange SampleInterchangeUnitName merge elementSize 50 file CSV &amp;quot;C:/temp/testFile.csv&amp;quot; delimiter &amp;quot;;&amp;quot; skipLines 1 encoding &amp;quot;UTF-8&amp;quot;{}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
► '''Example 2''':&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange SampleInterchangeUnitName remove elementSize 50 file CSV &amp;quot;C:/temp/testFile.csv&amp;quot; delimiter &amp;quot;;&amp;quot; skipLines 1 encoding &amp;quot;GB18030&amp;quot;{}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
► '''Example 3''':&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange SampleInterchangeUnitName persistelementSize 50 file CSV &amp;quot;C:/temp/testFile.csv&amp;quot; delimiter &amp;quot;;&amp;quot; skipLines 1 encoding &amp;quot;ISO-2022-JP&amp;quot;{}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===mappingModel===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;mappingModel&amp;lt;/code&amp;gt; keyword is an EDI-specific keyword which can be used to specify an EDI to XML mapping model in XML format for Smooks.&lt;br /&gt;
&lt;br /&gt;
===validate===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;validate&amp;lt;/code&amp;gt; keyword is an EDI-specific keyword that...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===beans===&lt;br /&gt;
&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;beans&amp;lt;/code&amp;gt; starts the series of entities. The name &amp;quot;bean&amp;quot; comes from the internal entities called JavaBean, which act as data containers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===entity===&lt;br /&gt;
&lt;br /&gt;
With the &amp;lt;code&amp;gt;entity&amp;lt;/code&amp;gt; keyword followed by a fully qualified name, the user can specify the mapping between a source data file and a data-containing entity. The behavior of the mapping can be further fine-tuned with the keywords discussed below. While these keywords can theoretically be combined all together and create very complicated behavior, they are normally used in a simple and straight forward way.&lt;br /&gt;
&lt;br /&gt;
The general form of &amp;lt;code&amp;gt;entity&amp;lt;/code&amp;gt; keywords is:&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
entity &amp;lt;ID&amp;gt;&lt;br /&gt;
    [nodeName &amp;lt;node-name&amp;gt;]&lt;br /&gt;
    [createOn &amp;lt;element-map&amp;gt;]&lt;br /&gt;
    [marker &amp;lt;property-name&amp;gt;]&lt;br /&gt;
    [expression '{' &amp;lt;expressions&amp;gt; '}'] &lt;br /&gt;
    [lookup '{' &amp;lt;lookup-rules&amp;gt; '}']&lt;br /&gt;
    [format '{' &amp;lt;formats&amp;gt; '}']&lt;br /&gt;
    [mapping '{' &amp;lt;mappings&amp;gt; '}']&lt;br /&gt;
    [keys '{' &amp;lt;lookup-keys&amp;gt; '}']&lt;br /&gt;
;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The order of the keywords is fixed, i.e. they are all optional, but must appear in the given order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====nodeName====&lt;br /&gt;
&lt;br /&gt;
With the optional keyword &amp;lt;code&amp;gt;nodeName&amp;lt;/code&amp;gt; followed by a string you can specify the name (alias) of corresponding elements inside an (XML) input/output configuration file. This name is used to identify entities within an XML file using the [http://freemarker.org/docs/pgui_datamodel.html NodeModel of Freemarker] instead of using the standard Java Object Model name. For example:&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Stores remove vectorName &amp;quot;stores&amp;quot; elementSize 83 file XML &amp;quot;C:/.../net.osbee.sample.foodmart/net.osbee.sample.foodmart.datainterchange/smooks-resources/stores.xml&amp;quot; beans {&lt;br /&gt;
	entity Mregion nodeName    &amp;quot;region&amp;quot;&lt;br /&gt;
	entity Mstore nodeName     &amp;quot;store&amp;quot;&lt;br /&gt;
	entity Mwarehouse nodeName &amp;quot;warehouse&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result from this example code is the generation of Smooks configuration files, in which the structure of the output data file (order of elements) will be the same as declared inside the beans {...} expression block. The alias you have specified after the keyword will be used as element (entity) name inside the XML files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Figure3&amp;quot;&amp;gt; [[File:FreeMarkerNodeModelStoreInEx.png|600px|thumb|center|''Figure 3: Store-import.xml and  Store-export.xml with NodeModel'']] &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The use of this keyword gives you the flexibility of naming entities using aliases in order to match any third part system description. By omitting the definition of both aliases ''region'' and ''warehouse'' like shown below, we obtain slightly divergent but very different contents than the ones from above.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Stores remove vectorName &amp;quot;stores&amp;quot; elementSize 83 file XML &amp;quot;C:/.../net.osbee.sample.foodmart/net.osbee.sample.foodmart.datainterchange/smooks-resources/stores.xml&amp;quot; beans {&lt;br /&gt;
	entity Mregion&lt;br /&gt;
	entity Mstore nodeName     &amp;quot;store&amp;quot;&lt;br /&gt;
	entity Mwarehouse&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:FreeMarkerJavaObjectModelStoreInEx.png|600px|thumb|center|''Figure 4: Store-import.xml (normal) and Store-export.xml (normal) with Java Object Model Name'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please note that the declaration order of each node names matters.&lt;br /&gt;
&lt;br /&gt;
====createOn====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;createOn&amp;lt;/code&amp;gt; keyword followed by a string specifies on which input element should an entity to be created. For example:&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
entity Mcurrency createOn &amp;quot;/Envelope/Cube/Cube/Cube&amp;quot; ... {&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will create an &amp;lt;code&amp;gt;Mcurrency&amp;lt;/code&amp;gt; entity when encountering &amp;lt;code&amp;gt;/Envelope/Cube/Cube&amp;lt;/code&amp;gt; in the source data file.&lt;br /&gt;
&lt;br /&gt;
====marker====&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;marker&amp;lt;/code&amp;gt; keyword optionally followed by a property-name, the user can set the data to be imported to have an additional property under the given name whose value set to 1, while updating the existing data to have this property having value 0. This could be useful to identify the most recent import of some periodically updated data. For example:&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
entity McurrencyStream createOn &amp;quot;/Envelope/Cube&amp;quot; marker latest expression {&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will make the entity &amp;lt;code&amp;gt;McurrencyStream&amp;lt;/code&amp;gt; to have a property &amp;quot;&amp;lt;code&amp;gt;latest&amp;lt;/code&amp;gt;&amp;quot;, which is to be set to 1 for the most recently imported data.&lt;br /&gt;
&lt;br /&gt;
====expression====&lt;br /&gt;
&lt;br /&gt;
With an &amp;lt;code&amp;gt;expression { ... }&amp;lt;/code&amp;gt; block, the user can define expressions that assign certain value to an entity property. These expressions are of two types, the first one is:&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  assign &amp;lt;id&amp;gt; with &amp;lt;value&amp;gt; as &amp;lt;type&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
this will assign the property &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; with the value of &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;, in type of &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; may be one of the following:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;NowDate&amp;lt;/code&amp;gt;: the date of now (the time point of action)&lt;br /&gt;
* &amp;lt;code&amp;gt;StartDate&amp;lt;/code&amp;gt;: the date when the process started&lt;br /&gt;
* &amp;lt;code&amp;gt;UniversallyUniqueIdentifier&amp;lt;/code&amp;gt;: an UUID&lt;br /&gt;
&lt;br /&gt;
and &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; may be one of the following:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Date&amp;lt;/code&amp;gt;: the value of NowDate or StartDate will be in date format&lt;br /&gt;
* &amp;lt;code&amp;gt;Milliseconds&amp;lt;/code&amp;gt;: the value of NowDate or StartDate will be in millisecond&lt;br /&gt;
* &amp;lt;code&amp;gt;Nanoseconds&amp;lt;/code&amp;gt;: the value of NowDate or StartDate will be in nanosconds&lt;br /&gt;
* &amp;lt;code&amp;gt;Random&amp;lt;/code&amp;gt;: the value of UUID will be random&lt;br /&gt;
* &amp;lt;code&amp;gt;ExecuteContext&amp;lt;/code&amp;gt;: the value of UUID will be unique for the execute context&lt;br /&gt;
&lt;br /&gt;
Note that the &amp;lt;code&amp;gt;Random&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ExecuteContext&amp;lt;/code&amp;gt; should be only combined with &amp;lt;code&amp;gt;UniversallyUniqueIdentifier&amp;lt;/code&amp;gt;, while the other types should be only combined with &amp;lt;code&amp;gt;NowDate&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StartDate&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
  entity McurrencyStream createOn &amp;quot;/Envelope/Cube&amp;quot; marker latest expression {&lt;br /&gt;
      assign importDate with NowDate as Date&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will assign the &amp;lt;code&amp;gt;importDate&amp;lt;/code&amp;gt; as the current date in &amp;lt;code&amp;gt;Date&amp;lt;/code&amp;gt; format.&lt;br /&gt;
&lt;br /&gt;
The other type of expression has the form:&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  copy &amp;lt;target-property&amp;gt; from &amp;lt;entity-name&amp;gt; property &amp;lt;from-property&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which will copy the value of &amp;lt;code&amp;gt;from-property&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;entity-name&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;target-property&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  entity Mcurrency createOn &amp;quot;/Envelope/Cube/Cube/Cube&amp;quot; expression {&lt;br /&gt;
      copy currencyDate from McurrencyDay property ratingDate&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will copy the value of &amp;lt;code&amp;gt;ratingDate&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;McurrencyDay&amp;lt;/code&amp;gt; entity to &amp;lt;code&amp;gt;currencyDate&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====lookup====&lt;br /&gt;
&amp;lt;div id=&amp;quot;lookup&amp;quot;&amp;gt;&lt;br /&gt;
With a &amp;lt;code&amp;gt;lookup&amp;lt;/code&amp;gt; { ... } block, the user can define a set of '''lookup-rules''' to identify complex data within our persistence layer (DB or In-Memory...). This makes sense when the data in a source file can't be clearly identified by an attribute (id), but moreover when the set data it contains is persisted over several entities.&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
lookup {&lt;br /&gt;
   [&amp;lt;lookup-rules&amp;gt;]*&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lookup-rule expression:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
lookup-rule: &lt;br /&gt;
 'for' .. 'on' .. 'createOn' .. 'with' .. 'cacheSize' .. 'mapTo' .. ['allowNoResult' | 'allowNoResult' | 'markerPath']&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Currencies describedBy &amp;quot;european central bank currency exchange rates based on euro&amp;quot; persist elementSize 50 file&lt;br /&gt;
	XML &amp;quot;C:/git/development/net.osbee.sample.foodmart/net.osbee.sample.foodmart.datainterchange/smooks-resources/eurofxref-hist-90d.xml&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	mapByAttribute beans {&lt;br /&gt;
		entity McurrencyStream createOn &amp;quot;/Envelope/Cube&amp;quot; marker latest expression {&lt;br /&gt;
			assign importDate with NowDate as Date&lt;br /&gt;
		}&lt;br /&gt;
		entity McurrencyDay createOn &amp;quot;/Envelope/Cube/Cube&amp;quot; format {&lt;br /&gt;
			for ratingDate coding &amp;quot;yyyy-MM-dd&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
		mapping {&lt;br /&gt;
			map ratingDate to &amp;quot;time&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
		entity Mcurrency createOn &amp;quot;/Envelope/Cube/Cube/Cube&amp;quot; expression {&lt;br /&gt;
			copy currencyDate from McurrencyDay property ratingDate&lt;br /&gt;
		}&lt;br /&gt;
		lookup {&lt;br /&gt;
			for currency_name on McurrencyName createOn &amp;quot;/Envelope/Cube/Cube/Cube&amp;quot; with isoCode cacheSize 300 mapTo &amp;quot;currency&amp;quot; allowNoResult&lt;br /&gt;
			markerPath {&lt;br /&gt;
				markerEntity McurrencyNameStream markedBy latest&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		mapping {&lt;br /&gt;
			map conversion_ratio to &amp;quot;rate&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will provide you in upcoming releases with more information about so called '''locator''' instances, which are generated in the background on the basis of the '''lookups''' you would have defined, in order to query persisted data. This will give you more insights about how the Datainterchange DSL really works at the lower level.&lt;br /&gt;
&lt;br /&gt;
====format====&lt;br /&gt;
&lt;br /&gt;
With a &amp;lt;code&amp;gt;format { ... }&amp;lt;/code&amp;gt; block, the user can define the format of the entity property being converted. A &amp;lt;code&amp;gt;format&amp;lt;/code&amp;gt; block can have more than one format definitions, in the following format:&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    format {&lt;br /&gt;
        for &amp;lt;property&amp;gt; coding &amp;lt;format-string&amp;gt; [locale &amp;lt;locale-string&amp;gt;]&lt;br /&gt;
        ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    entity McurrencyDay createOn &amp;quot;/Envelope/Cube/Cube&amp;quot; format {&lt;br /&gt;
        for ratingDate coding &amp;quot;yyyy-MM-dd&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will convert the &amp;lt;code&amp;gt;&amp;quot;/Envelope/Cube/Cube&amp;quot;&amp;lt;/code&amp;gt; data to &amp;lt;code&amp;gt;ratingDate&amp;lt;/code&amp;gt; property of &amp;lt;code&amp;gt;McurrencyDay&amp;lt;/code&amp;gt; in format &amp;lt;code&amp;gt;&amp;quot;yyyy-MM-dd&amp;quot;&amp;lt;/code&amp;gt;, where&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    entity EDIOrderHeader createOn &amp;quot;/Order/header&amp;quot; format {&lt;br /&gt;
        for hdrDate coding &amp;quot;EEE MMM dd HH:mm:ss zzz yyyy&amp;quot; locale &amp;quot;en_US&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will format the &amp;lt;code&amp;gt;hdrDate&amp;lt;/code&amp;gt; in format &amp;lt;code&amp;gt;&amp;quot;EEE MMM dd HH:mm:ss zzz yyyy&amp;quot;&amp;lt;/code&amp;gt; with English locale, i.e. the month and weekday names will be in English.&lt;br /&gt;
&lt;br /&gt;
====mapping====&lt;br /&gt;
With a &amp;lt;code&amp;gt;mapping { ... }&amp;lt;/code&amp;gt; block, the user can easily '''map''' (or rather '''match''') attributes of the data model to values from external source files.&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
mapping {&lt;br /&gt;
 [map &amp;lt;entity-attribute&amp;gt; to &amp;lt;Data&amp;gt;]*&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
mapping{&lt;br /&gt;
  map conversion_ratio to &amp;quot;rate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that the only valid attributes here are the members of the corresponding entity, which the user has chosen prior defining the &amp;lt;code&amp;gt;mapping&amp;lt;/code&amp;gt; block itself.&lt;br /&gt;
&lt;br /&gt;
====keys====&lt;br /&gt;
With a &amp;lt;code&amp;gt;keys&amp;lt;/code&amp;gt; { ... } block, the user can define a set of '''keys''' to identify data within our persistence layer (DB or In-Memory...). &lt;br /&gt;
This makes sence when the data in a source file can't be clearly identified by an attribute (id). Therefore a set of attributes (keys) can be defined and then be used as identification parameter set by a [[#lookup|''lookups'']] instance in order to query our data pool and identify data using several criteria.&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
keys {&lt;br /&gt;
 [key &amp;lt;entity-attribute&amp;gt;]*&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Assuming you try to update the address data of an employee from an entity named Employee, but you happen not to have his/her personal id. By setting a &amp;lt;code&amp;gt;keys&amp;lt;/code&amp;gt; { ... } block, like shown here below, you allow the Datainterchange unit to look into the database after employee's data based on the key set inside this block, rather than using a personal id, which might have been here unique and more than enough to find the employee right away.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
keys {&lt;br /&gt;
  key last_name&lt;br /&gt;
  key first_name&lt;br /&gt;
  key age&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that the only valid attributes here are members of the corresponding entity, that you would have chosen prior defining the &amp;lt;code&amp;gt;keys&amp;lt;/code&amp;gt; block itself.&lt;br /&gt;
&lt;br /&gt;
==TriggerView==&lt;br /&gt;
A TriggerView will be automatically generated by the DataInterchange DSL as soon as you define an interchange unit inside the model file and save it. &lt;br /&gt;
&lt;br /&gt;
You can see on the right side of the figure shown below, the definition of 10 interchange units within the Datainterchange model file (blue rectangles); and on the right side of the figure you can see, how the TriggerView looks like (green rectangle), when it is embedded inside an application page in its entirety. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TriggerView.png|600px|center|''Figure 5: Datainterchange TriggerView Definition and Application Views''|thumbnail|600px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To achieve this result you need to do two simple steps. You need first to either integrate the TriggerView into an existing perspective or create a new perspective and then integrate the view into it, like shown below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''Example 1''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import ns net.osbee.sample.foodmart.datainterchanges&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.foodmart.perspectives {&lt;br /&gt;
&lt;br /&gt;
	perspective Currencies iconURI &amp;quot;employee&amp;quot; {&lt;br /&gt;
		sashContainer c1 orientation horizontal {&lt;br /&gt;
			part imex view dataInterchange datainterchanges spaceVolume &amp;quot;20&amp;quot;&lt;br /&gt;
			...&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The most important thing in this example is to notice the use of the keyword '''view''' followed by the keyword '''dataInterchange''' and the name ''datainterchanges'' referring to the package, in which all datainterchange unit definitions have to be found.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second step would be to create a menu entry for you to be able to access the newly created or altered perspective in the application via the menu bar, like shown in the following example.&lt;br /&gt;
&lt;br /&gt;
► '''Example 2''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import ns net.osbee.sample.foodmart.perspectives.Currencies&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.foodmart.menues {  &lt;br /&gt;
	...&lt;br /&gt;
	entry Menu describedBy &amp;quot;my menu&amp;quot; { &lt;br /&gt;
		entry Perspectives {&lt;br /&gt;
			entry MasterData {&lt;br /&gt;
				entry Company image &amp;quot;company&amp;quot; perspective Company&lt;br /&gt;
				entry Employees image &amp;quot;employee&amp;quot; perspective Employee&lt;br /&gt;
				entry Products image &amp;quot;products&amp;quot; perspective Products&lt;br /&gt;
				entry CashRegisterData image &amp;quot;editor_area&amp;quot; perspective CashMasterDataRegister&lt;br /&gt;
&lt;br /&gt;
				entry Currencies image &amp;quot;products&amp;quot; perspective Currencies&lt;br /&gt;
&lt;br /&gt;
				entry People image &amp;quot;task_action_delegate&amp;quot; perspective PeopleMock&lt;br /&gt;
				&lt;br /&gt;
			}&lt;br /&gt;
		...&lt;br /&gt;
	...	}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TriggerViewMenuSelection.png|600px|center|''Figure 6: Datainterchange TriggerView Menu Selection''|thumbnail|600px]]&lt;br /&gt;
&lt;br /&gt;
The figure above shows the same menu structure defined in the example 2 and results in showing the application with the TriggerView, as you can see on the left side of the figure 5. You can get and review more information on how to create menu entries and perspectives in both [[Menu DSL]] and [[Perspective DSL]] documentation pages. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Among all the components that are generated for the use of each interchange unit functions are action buttons, you would find inside toolbars in some dialogs. Usually you have to define them by yourself in the corresponding DSL files. This step is not needed here, since it has already been generated for this particular view.&lt;br /&gt;
&lt;br /&gt;
[[File:TriggerViewActionButtons.png|600px|center|''Figure 7: Action Buttons for datainterchange unit functions''|thumbnail|600px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please note that it is '''not mandatory''' to display all available functionalities through the use of the TriggerView like shown here above. It is customary to only use parts of the generated Datainterchange components (e.g. action buttons) where you see them fit; for instance in order to only use each interchange unit functionalities (import and/or export) in separated and dedicated views (dialogs). Therefore, we also recommend you to have a look at the [[Action DSL]] documentation page in order to understand how to create your own toolbars, and so forth creating the buttons using import or export functions of any datainterchange unit you would have created.&lt;br /&gt;
&lt;br /&gt;
==Smooks Configuration and Settings File==&lt;br /&gt;
'''Please note that whenever a model is saved''', the '''Datainterchange DSL''' will do three things '''automatically''':&lt;br /&gt;
&lt;br /&gt;
* generate Java classes,&lt;br /&gt;
* generate Smooks configuration files for both import and export functions, and&lt;br /&gt;
* generate a config file to modify the import and export paths on runtime.&lt;br /&gt;
&lt;br /&gt;
===Smooks Configuration File===&lt;br /&gt;
&lt;br /&gt;
The OS.bee implementation of Data Interchange interface is based on Smooks. Smooks is a Java framework for processing XML and non XML data (CSV, EDI, Java etc) by mapping data to JavaBeans, which can later be persisted, enriched (merge with existing data from other source), or converted and exported into other formats.&lt;br /&gt;
&lt;br /&gt;
Smooks relies on a proper configuration file for the import / export processes. These configuration files are generated by the Datainterchange DSL automatically. Here is a brief introduction of how the generated Smooks configuration files work.&lt;br /&gt;
&lt;br /&gt;
When a data import / export Smooks instance is initiated, it will be supplied with the generated config file. This file defines the actions to be performed upon certain events during the SAX parsing process. Here is an example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line='line'&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;smooks-resource-list xmlns=&amp;quot;http://www.milyn.org/xsd/smooks-1.1.xsd&amp;quot; xmlns:csv=&amp;quot;http://www.milyn.org/xsd/smooks/csv-1.2.xsd&amp;quot; xmlns:dao=&amp;quot;http://www.milyn.org/xsd/smooks/persistence-1.2.xsd&amp;quot; xmlns:jb=&amp;quot;http://www.milyn.org/xsd/smooks/javabean-1.2.xsd&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;jb:bean beanId=&amp;quot;McurrencyNameStream&amp;quot; class=&amp;quot;net.osbee.sample.foodmart.entities.McurrencyNameStream&amp;quot; createOnElement=&amp;quot;/csv-set&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;jb:expression property=&amp;quot;importDate&amp;quot;&amp;gt;PTIME.nowDate&amp;lt;/jb:expression&amp;gt;&lt;br /&gt;
        &amp;lt;jb:wiring beanIdRef=&amp;quot;McurrencyName&amp;quot; setterMethod=&amp;quot;addToCurrencyNames&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/jb:bean&amp;gt;&lt;br /&gt;
    &amp;lt;jb:bean beanId=&amp;quot;McurrencyName&amp;quot; class=&amp;quot;net.osbee.sample.foodmart.entities.McurrencyName&amp;quot; createOnElement=&amp;quot;/csv-set/csv-record&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;jb:value data=&amp;quot;/csv-set/csv-record/isoCode&amp;quot; decoder=&amp;quot;String&amp;quot; property=&amp;quot;isoCode&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;jb:value data=&amp;quot;/csv-set/csv-record/name&amp;quot; decoder=&amp;quot;String&amp;quot; property=&amp;quot;name&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;jb:value data=&amp;quot;/csv-set/csv-record/countries&amp;quot; decoder=&amp;quot;String&amp;quot; property=&amp;quot;countries&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/jb:bean&amp;gt;&lt;br /&gt;
    &amp;lt;csv:reader fields=&amp;quot;isoCode,name,countries&amp;quot; indent=&amp;quot;false&amp;quot; separator=&amp;quot;;&amp;quot; skipLines=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;params&amp;gt;&lt;br /&gt;
        &amp;lt;param name=&amp;quot;stream.filter.type&amp;quot;&amp;gt;SAX&amp;lt;/param&amp;gt;&lt;br /&gt;
        &amp;lt;param name=&amp;quot;inputType&amp;quot;&amp;gt;input.csv&amp;lt;/param&amp;gt;&lt;br /&gt;
        &amp;lt;param name=&amp;quot;smooks.visitors.sort&amp;quot;&amp;gt;false&amp;lt;/param&amp;gt;&lt;br /&gt;
        &amp;lt;param name=&amp;quot;input.csv&amp;quot; type=&amp;quot;input.type.actived&amp;quot;&amp;gt;C:/git/net.osbee.sample.foodmart/net.osbee.sample.foodmart.datainterchange/smooks-resources/ISOCurrencyCodes081507.csv&amp;lt;/param&amp;gt;&lt;br /&gt;
    &amp;lt;/params&amp;gt;&lt;br /&gt;
&amp;lt;/smooks-resource-list&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Further informations on the Smoooks framework are available and can be reviewed in its [http://www.smooks.org/guide documentation] you will find on the [http://www.smooks.org/index official website].&lt;br /&gt;
&lt;br /&gt;
===Path Config File===&lt;br /&gt;
&lt;br /&gt;
The file is interpreted using the Properties xml im- and export method and looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE properties SYSTEM &amp;quot;http://java.sun.com/dtd/properties.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;properties&amp;gt;&lt;br /&gt;
&amp;lt;comment&amp;gt;dataInterchange file URLs&amp;lt;/comment&amp;gt;&lt;br /&gt;
&amp;lt;entry key=&amp;quot;EmployeesDepartment-import&amp;quot;&amp;gt;C:/myimports/employeesdepartment.xml&amp;lt;/entry&amp;gt;&lt;br /&gt;
&amp;lt;entry key=&amp;quot;EmployeesDepartment-export&amp;quot;&amp;gt;C:/myexports/employeesdepartment.xml&amp;lt;/entry&amp;gt;&lt;br /&gt;
&amp;lt;/properties&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default this file is named like the title in the Data Interchange package and extended by &amp;quot;Config&amp;quot; and has the extension &amp;quot;xml&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;package net.osbee.sample.foodmart.datainterchanges title &amp;quot;DataInterchange&amp;quot; {}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
leads to the filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;DataInterchangeConfig.xml&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and is stored platform independently in the current user's home directory under the subdirectory &amp;quot;.osbee&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
An administrator must receive this configuration file with the application, modify it and place it somewhere on the application server. The path to this configuration file must be supplied in the product's preferences (&amp;lt;code&amp;gt;org.eclipse.osbp.production.prefs&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;datainterchange/datainterchangeConfiguration=c\:\\DataInterchangeConfig.xml&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The path value obviously depends on the operating system you are developing.&lt;br /&gt;
&lt;br /&gt;
== Copyright Notice ==&lt;br /&gt;
{{Copyright Notice}}&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=Datainterchange_DSL&amp;diff=2893</id>
		<title>Datainterchange DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=Datainterchange_DSL&amp;diff=2893"/>
				<updated>2017-11-07T14:09:21Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* mappingModel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The Data Interchange DSL (datainterchange for short) is made for defining data exchange models that can be used to import data from various formats (CSV, XML, EDI, etc.), map the data to entities, store them into database, or export them back into other formats.&lt;br /&gt;
&lt;br /&gt;
You only need to define the ''relationship'' between the file and the bean, not the import / export process themselves. Once defined, these models can be used in e.g. action DSL to define actions which, when triggered, execute the actual import / export process, which are generated automatically by the OSBP based on the model.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
As shown on the figure below, the [DSL Inferrer] will generate various views and In/Export component according to model described by datainterchange DSL (and action DSL, in the case of ActionButtons). The action buttons, when clicked, will trigger their corresponding In/Export processes by putting [http://download.osbee.org/downloads/javadoc/osbee-master-clean/org.eclipse.osbp.xtext.datainterchange.feature/apidocs/ WorkerThread (Runnable)] jobs into the executor job pool within the TriggerView (prefixed with datainterchang name), buttons (and toolbar / menus containing them) are further included in the perspective.&lt;br /&gt;
&lt;br /&gt;
[[File:Datainterchange.png|600px|center|frame|''Figure 1: - Data Interchange Structure.'']]&lt;br /&gt;
&lt;br /&gt;
==Data Interchange Model File==&lt;br /&gt;
&lt;br /&gt;
Datainterchange DSL model files end with the &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt; extension. Data Interchange models may be split into several &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt; files, as long as they have the same package declaration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following we will dive deeper into the description and the usage of Datainterchange related and reserved keywords.&lt;br /&gt;
&lt;br /&gt;
===import===&lt;br /&gt;
In the import section are all entities to be found - as full qualified names – that are currently used in the DSL.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
import ns net.osbee.sample.foodmart.entities.Mstore&lt;br /&gt;
import ns net.osbee.sample.foodmart.entities.Mwarehouse&lt;br /&gt;
import ns net.osbee.sample.foodmart.entities.Mregion&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;ns&amp;lt;/code&amp;gt; is a mandatory keyword (stands for &amp;quot;namespace&amp;quot;) that comes after import for distinguishing the OS.bee internal namespaces and Java library namespaces. Wildcards are not supported, all names should be imported separately. Note that the import section will be imported/added automatically if they are used in the package, so you don't have to manually manage this section.&lt;br /&gt;
&lt;br /&gt;
===package===&lt;br /&gt;
&lt;br /&gt;
Datainterchange DSL model files must start with a package declaration. Packages are the root element of the DSL and should be defined as &amp;lt;code&amp;gt;&amp;lt;ApplicationName&amp;gt;.datainterchange&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;package net.osbee.sample.foodmart.datainterchanges { }&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Data Interchange models may be split into several .data files, as long as they have the same package declaration, the interchanges will be available under this package name.&lt;br /&gt;
&lt;br /&gt;
===title===&lt;br /&gt;
With the keyword title you can give a name to the corresponding TriggerView dialog inside your application. For example, the definition of the same datainterchanges package from above with title &amp;quot;Data Interchange Example&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;package net.osbee.sample.foodmart.datainterchanges title &amp;quot;Data Interchange Example&amp;quot; {}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This title will be translated based on locale.&lt;br /&gt;
&lt;br /&gt;
You can get more details about the TriggerView in the section below.&lt;br /&gt;
&lt;br /&gt;
===interchange===&lt;br /&gt;
The &amp;lt;code&amp;gt;interchange&amp;lt;/code&amp;gt; keyword defines interchange units for entities in the package, it should be in the form of:&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange &amp;lt;InterchangeUnitName&amp;gt; [describedBy &amp;lt;description&amp;gt;] &amp;lt;EntityManagerMode&amp;gt; file &amp;lt;FileType&amp;gt; [&amp;lt;FileDetails&amp;gt;] beans {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;InterchangeUnitName&amp;lt;/code&amp;gt; being the name of the interchange unit; &amp;lt;code&amp;gt;describedBy&amp;lt;/code&amp;gt; (optional) can be used to provide a short description string. &amp;lt;code&amp;gt;EntityManagerMode&amp;lt;/code&amp;gt; being how the file should be handled (see section &amp;quot;persist, merge, remove&amp;quot; below), and after &amp;lt;code&amp;gt;file&amp;lt;/code&amp;gt; keyword, you should specify the type of the source / target data file you would like to import from or export to, then the file path, and other details depends on the type.&lt;br /&gt;
&lt;br /&gt;
The following example specifies an interchange that reads a CSV file under the specified path (note the forward slash as the path separator), delimited by semicolon, skip one line (the header), and treat the content as encoded in UTF-8:&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
interchange CurrencyNames persist file&lt;br /&gt;
CSV &amp;quot;C:/data/ISOCurrencyCode20170101.csv&amp;quot; delimiter &amp;quot;;&amp;quot; skipLines 1 encoding &amp;quot;UTF-8&amp;quot;&lt;br /&gt;
beans {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;beans&amp;lt;/code&amp;gt; keyword comes after all the file specification and starts a block of entity definitions, which will be covered in section &amp;quot;entity&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===describedBy===&lt;br /&gt;
With this keyword you can the optional description of an interchange unit as shown below. &lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Currencies describedBy &amp;quot;european central bank currency exchange rates based on euro&amp;quot; persist ... { ... }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===vectorName===&lt;br /&gt;
With the optional keyword &amp;lt;code&amp;gt;vectorName&amp;lt;/code&amp;gt; followed by a string value you are able to define the name of the root element of both XML configuration files needed by Smooks. Please note that it also means that the first (root-)element of an XML-File you would have exported (file filled with real data) via the application will have the same name.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Stores remove vectorName &amp;quot;stores&amp;quot; elementSize 83 file ... { ... }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can view the result of this sample of code like shown below on figure[[#Figure3|''3'']].&lt;br /&gt;
&lt;br /&gt;
===persist, merge, remove===&lt;br /&gt;
These keywords define the purpose of the datainterchange unit and has a similar meaning as in the JPA's EntityManager class. Basically, &amp;lt;code&amp;gt;persist&amp;lt;/code&amp;gt; will insert the data records into database, &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; will update existing data record, or insert new one if necessary, &amp;lt;code&amp;gt;remove&amp;lt;/code&amp;gt; will remove the record if it could be found in database.&lt;br /&gt;
&lt;br /&gt;
► '''Example 1''': (persist)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange EDIOrders describedBy &amp;quot;Orders&amp;quot; persist file&lt;br /&gt;
XML &amp;quot;C:/data/orders.xml&amp;quot;&lt;br /&gt;
beans {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
► '''Example 2''': (merge)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Stores merge file&lt;br /&gt;
XML &amp;quot;C:/data/stores.xml&amp;quot;&lt;br /&gt;
beans {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
► '''Example 3''': (remove)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Storesremove remove file&lt;br /&gt;
XML &amp;quot;C:/data/stores_remove.xml&amp;quot;&lt;br /&gt;
beans {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===file===&lt;br /&gt;
With the keyword file you are able to set the file format of the files you intent to process with you interchange unit.&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange &amp;lt;SampleInterchangeUnitName&amp;gt; &amp;lt;EntityManagerMode&amp;gt; file &amp;lt;FileNameFormat&amp;gt; {}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current supported file formats are CSV, EDI and XML followed by the name of the file you want to process, given its full path location in the system.&lt;br /&gt;
► '''Example 1''':&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange SampleInterchangeUnit1 merge file CSV &amp;quot;C:/temp/testFile.csv&amp;quot; {}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
► '''Example 2''':&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange SampleInterchangeUnit2 persist file XML &amp;quot;C:/temp/testFile.xml&amp;quot; {}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
► '''Example 3''':&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange SampleInterchangeUnit3 merge file EDI &amp;quot;C:/temp/testFile.edi&amp;quot; {}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After choosing the file format you can either give the file name as a String value in a double quote &amp;quot;...&amp;quot; as shown here above, or press Ctrl+Space to get via the content assist the option of opening a File Chooser/Picker to specify the file you want to work with.&lt;br /&gt;
&lt;br /&gt;
[[File:FileChooser.jpg|center|frame|''Figure 2: File Chooser'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please note that you can also change the path(?) of the file to process on runtime by selecting a new file.&lt;br /&gt;
&lt;br /&gt;
===mapByAttribute===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;mapByAttribute&amp;lt;/code&amp;gt; keyword is an XML-specific keyword that turns on the automatic attribute mapping. When enabled, datainterchange will detect if the value being mapped is from an attribute. For example, the 'USD' value in the following XML file comes from the attribute 'currency' of the element 'Cube':&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Cube currency='USD' rate='1.3759'/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
while in the following XML file, the same value is encapsulated in the element 'currency':&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Cube&amp;gt;&lt;br /&gt;
 &amp;lt;currency&amp;gt;USD&amp;lt;/currency&amp;gt;&lt;br /&gt;
 &amp;lt;rate&amp;gt;1.3759&amp;lt;/rate&amp;gt;&lt;br /&gt;
&amp;lt;/Cube&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When &amp;lt;code&amp;gt;mapByAttribute&amp;lt;/code&amp;gt; is present, datainterchange will automatically decide that a query in the form like &amp;lt;code&amp;gt;'/Cube/currency'&amp;lt;/code&amp;gt; will also catch the value from attribute. Without it, the query will have to put a &amp;lt;code&amp;gt;'@'&amp;lt;/code&amp;gt; symbol in front of the attribute name, i.e. &amp;lt;code&amp;gt;'/Cube/@currency'&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===elementSize===&lt;br /&gt;
With the keyword &amp;lt;code&amp;gt;elementSize&amp;lt;/code&amp;gt; followed by an integer, the user can set the estimated average size of the elements in bytes. Since the underlying API cannot know the size of an element before it is processed, this value can be supplied as a guide value to be used for estimating the import / output progress based on how much bytes have been processed.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange EDIOrders describedBy &amp;quot;edi orders&amp;quot; persist elementSize 50 file EDI &amp;quot;C:/data/orders.edi&amp;quot; beans {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Defines an average estimated element size of 50 bytes.&lt;br /&gt;
&lt;br /&gt;
===delimiter===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;delimiter&amp;lt;/code&amp;gt; is a CSV format-specific keyword, which defines the character to use in the CSV file to set the delimiter/separation character between different values. Default value is &amp;quot;,&amp;quot; (comma).&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange CurrencyNames persist file&lt;br /&gt;
CSV &amp;quot;C:/data/ISOCurrencyCodes081507.csv&amp;quot; delimiter &amp;quot;;&amp;quot; ... {&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will set the delimiter of the CSV file to &amp;quot;;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===skipLines===&lt;br /&gt;
This is a CSV format-specific keyword. Using &amp;lt;code&amp;gt;skipLines&amp;lt;/code&amp;gt; followed by an integer, the user can specify the number of lines to be skipped from the beginning in the processing of the selected file, this can be used to skip headers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange CurrencyNames persist file CSV &amp;quot;C:/data/ISOCurrencyCodes081507.csv&amp;quot; ... skipLines 1 encoding &amp;quot;UTF-8&amp;quot; {&lt;br /&gt;
   ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will skip the first line of the CSV file.&lt;br /&gt;
&lt;br /&gt;
===report===&lt;br /&gt;
&lt;br /&gt;
If a '''datainterchange''' unit is defined with the &amp;lt;code&amp;gt;report&amp;lt;/code&amp;gt; keyword, a report will be generated for data conversions. The report file is generated by Smooks, lies under &amp;lt;code&amp;gt;/smooks&amp;lt;/code&amp;gt; output directory of the datainterchange bundle, and has a name in the form like &amp;lt;code&amp;gt;&amp;lt;DataInterChangeName&amp;gt;-input.xml&amp;lt;/code&amp;gt; for input processes, and &amp;lt;code&amp;gt;&amp;lt;DataInterChangeName&amp;gt;-output.xml&amp;lt;/code&amp;gt; for output processes. '''Note: turn on report will have an impact performance.'''&lt;br /&gt;
&lt;br /&gt;
===indent===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;indent&amp;lt;/code&amp;gt; is a CSV-format specified keyword which adds indentation character data to the generated event stream. This simply makes the generated event stream easier to read in its serialized form and generally should only be used in testing.&lt;br /&gt;
&lt;br /&gt;
===quoteCharacter===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;quoteCharacter&amp;lt;/code&amp;gt; is a CSV format-specific keyword, which defines the character to use in the CSV file to identify values.&lt;br /&gt;
&lt;br /&gt;
===encoding===&lt;br /&gt;
With the keyword '''enconding''' followed by the encoding name as a string value you are able to specify the valid encoding of the file content.&lt;br /&gt;
&lt;br /&gt;
► '''Example 1''':&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange SampleInterchangeUnitName merge elementSize 50 file CSV &amp;quot;C:/temp/testFile.csv&amp;quot; delimiter &amp;quot;;&amp;quot; skipLines 1 encoding &amp;quot;UTF-8&amp;quot;{}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
► '''Example 2''':&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange SampleInterchangeUnitName remove elementSize 50 file CSV &amp;quot;C:/temp/testFile.csv&amp;quot; delimiter &amp;quot;;&amp;quot; skipLines 1 encoding &amp;quot;GB18030&amp;quot;{}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
► '''Example 3''':&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;interchange SampleInterchangeUnitName persistelementSize 50 file CSV &amp;quot;C:/temp/testFile.csv&amp;quot; delimiter &amp;quot;;&amp;quot; skipLines 1 encoding &amp;quot;ISO-2022-JP&amp;quot;{}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===mappingModel===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;mappingModel&amp;lt;/code&amp;gt; keyword is an EDI-specific keyword which can be used to specify an EDI to XML mapping model in XML format for Smooks.&lt;br /&gt;
&lt;br /&gt;
===validate===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;validate&amp;lt;/code&amp;gt; keyword is an EDI-specific keyword that...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===beans===&lt;br /&gt;
&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;beans&amp;lt;/code&amp;gt; starts the series of entities. The name &amp;quot;bean&amp;quot; comes from the internal entities called JavaBean, which act as data containers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===entity===&lt;br /&gt;
&lt;br /&gt;
With the &amp;lt;code&amp;gt;entity&amp;lt;/code&amp;gt; keyword followed by a fully qualified name, the user can specify the mapping between a source data file and a data-containing entity. The behavior of the mapping can be further fine-tuned with the keywords discussed below. While these keywords can theoretically be combined all together and create very complicated behavior, they are normally used in a simple and straight forward way.&lt;br /&gt;
&lt;br /&gt;
The general form of &amp;lt;code&amp;gt;entity&amp;lt;/code&amp;gt; keywords is:&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
entity &amp;lt;ID&amp;gt;&lt;br /&gt;
    [nodeName &amp;lt;node-name&amp;gt;]&lt;br /&gt;
    [createOn &amp;lt;element-map&amp;gt;]&lt;br /&gt;
    [marker &amp;lt;property-name&amp;gt;]&lt;br /&gt;
    [expression '{' &amp;lt;expressions&amp;gt; '}'] &lt;br /&gt;
    [lookup '{' &amp;lt;lookup-rules&amp;gt; '}']&lt;br /&gt;
    [format '{' &amp;lt;formats&amp;gt; '}']&lt;br /&gt;
    [mapping '{' &amp;lt;mappings&amp;gt; '}']&lt;br /&gt;
    [keys '{' &amp;lt;lookup-keys&amp;gt; '}']&lt;br /&gt;
;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The order of the keywords is fixed, i.e. they are all optional, but must appear in the given order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====nodeName====&lt;br /&gt;
&lt;br /&gt;
With the optional keyword &amp;lt;code&amp;gt;nodeName&amp;lt;/code&amp;gt; followed by a string you can specify the name (alias) of corresponding elements inside an (XML) input/output configuration file. This name is used to identify entities within an XML file using the [http://freemarker.org/docs/pgui_datamodel.html NodeModel of Freemarker] instead of using the standard Java Object Model name. For example:&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Stores remove vectorName &amp;quot;stores&amp;quot; elementSize 83 file XML &amp;quot;C:/.../net.osbee.sample.foodmart/net.osbee.sample.foodmart.datainterchange/smooks-resources/stores.xml&amp;quot; beans {&lt;br /&gt;
	entity Mregion nodeName    &amp;quot;region&amp;quot;&lt;br /&gt;
	entity Mstore nodeName     &amp;quot;store&amp;quot;&lt;br /&gt;
	entity Mwarehouse nodeName &amp;quot;warehouse&amp;quot; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result from this example code is the generation of Smooks configuration files, in which the structure of the output data file (order of elements) will be the same as declared inside the beans {...} expression block. The alias you have specified after the keyword will be used as element (entity) name inside the XML files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Figure3&amp;quot;&amp;gt; [[File:FreeMarkerNodeModelStoreInEx.png|600px|thumb|center|''Figure 3: Store-import.xml and  Store-export.xml with NodeModel'']] &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The use of this keyword gives you the flexibility of naming entities using aliases in order to match any third part system description. By omitting the definition of both aliases ''region'' and ''warehouse'' like shown below, we obtain slightly divergent but very different contents than the ones from above.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Stores remove vectorName &amp;quot;stores&amp;quot; elementSize 83 file XML &amp;quot;C:/.../net.osbee.sample.foodmart/net.osbee.sample.foodmart.datainterchange/smooks-resources/stores.xml&amp;quot; beans {&lt;br /&gt;
	entity Mregion&lt;br /&gt;
	entity Mstore nodeName     &amp;quot;store&amp;quot;&lt;br /&gt;
	entity Mwarehouse&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:FreeMarkerJavaObjectModelStoreInEx.png|600px|thumb|center|''Figure 4: Store-import.xml (normal) and Store-export.xml (normal) with Java Object Model Name'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please note that the declaration order of each node names matters.&lt;br /&gt;
&lt;br /&gt;
====createOn====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;createOn&amp;lt;/code&amp;gt; keyword followed by a string specifies on which input element should an entity to be created. For example:&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
entity Mcurrency createOn &amp;quot;/Envelope/Cube/Cube/Cube&amp;quot; ... {&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will create an &amp;lt;code&amp;gt;Mcurrency&amp;lt;/code&amp;gt; entity when encountering &amp;lt;code&amp;gt;/Envelope/Cube/Cube&amp;lt;/code&amp;gt; in the source data file.&lt;br /&gt;
&lt;br /&gt;
====marker====&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;marker&amp;lt;/code&amp;gt; keyword optionally followed by a property-name, the user can set the data to be imported to have an additional property under the given name whose value set to 1, while updating the existing data to have this property having value 0. This could be useful to identify the most recent import of some periodically updated data. For example:&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
entity McurrencyStream createOn &amp;quot;/Envelope/Cube&amp;quot; marker latest expression {&lt;br /&gt;
	...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will make the entity &amp;lt;code&amp;gt;McurrencyStream&amp;lt;/code&amp;gt; to have a property &amp;quot;&amp;lt;code&amp;gt;latest&amp;lt;/code&amp;gt;&amp;quot;, which is to be set to 1 for the most recently imported data.&lt;br /&gt;
&lt;br /&gt;
====expression====&lt;br /&gt;
&lt;br /&gt;
With an &amp;lt;code&amp;gt;expression { ... }&amp;lt;/code&amp;gt; block, the user can define expressions that assign certain value to an entity property. These expressions are of two types, the first one is:&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  assign &amp;lt;id&amp;gt; with &amp;lt;value&amp;gt; as &amp;lt;type&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
this will assign the property &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; with the value of &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;, in type of &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; may be one of the following:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;NowDate&amp;lt;/code&amp;gt;: the date of now (the time point of action)&lt;br /&gt;
* &amp;lt;code&amp;gt;StartDate&amp;lt;/code&amp;gt;: the date when the process started&lt;br /&gt;
* &amp;lt;code&amp;gt;UniversallyUniqueIdentifier&amp;lt;/code&amp;gt;: an UUID&lt;br /&gt;
&lt;br /&gt;
and &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; may be one of the following:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Date&amp;lt;/code&amp;gt;: the value of NowDate or StartDate will be in date format&lt;br /&gt;
* &amp;lt;code&amp;gt;Milliseconds&amp;lt;/code&amp;gt;: the value of NowDate or StartDate will be in millisecond&lt;br /&gt;
* &amp;lt;code&amp;gt;Nanoseconds&amp;lt;/code&amp;gt;: the value of NowDate or StartDate will be in nanosconds&lt;br /&gt;
* &amp;lt;code&amp;gt;Random&amp;lt;/code&amp;gt;: the value of UUID will be random&lt;br /&gt;
* &amp;lt;code&amp;gt;ExecuteContext&amp;lt;/code&amp;gt;: the value of UUID will be unique for the execute context&lt;br /&gt;
&lt;br /&gt;
Note that the &amp;lt;code&amp;gt;Random&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ExecuteContext&amp;lt;/code&amp;gt; should be only combined with &amp;lt;code&amp;gt;UniversallyUniqueIdentifier&amp;lt;/code&amp;gt;, while the other types should be only combined with &amp;lt;code&amp;gt;NowDate&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;StartDate&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
  entity McurrencyStream createOn &amp;quot;/Envelope/Cube&amp;quot; marker latest expression {&lt;br /&gt;
      assign importDate with NowDate as Date&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will assign the &amp;lt;code&amp;gt;importDate&amp;lt;/code&amp;gt; as the current date in &amp;lt;code&amp;gt;Date&amp;lt;/code&amp;gt; format.&lt;br /&gt;
&lt;br /&gt;
The other type of expression has the form:&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  copy &amp;lt;target-property&amp;gt; from &amp;lt;entity-name&amp;gt; property &amp;lt;from-property&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which will copy the value of &amp;lt;code&amp;gt;from-property&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;entity-name&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;target-property&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  entity Mcurrency createOn &amp;quot;/Envelope/Cube/Cube/Cube&amp;quot; expression {&lt;br /&gt;
      copy currencyDate from McurrencyDay property ratingDate&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will copy the value of &amp;lt;code&amp;gt;ratingDate&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;McurrencyDay&amp;lt;/code&amp;gt; entity to &amp;lt;code&amp;gt;currencyDate&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====lookup====&lt;br /&gt;
&amp;lt;div id=&amp;quot;lookup&amp;quot;&amp;gt;&lt;br /&gt;
With a &amp;lt;code&amp;gt;lookup&amp;lt;/code&amp;gt; { ... } block, the user can define a set of '''lookup-rules''' to identify complex data within our persistence layer (DB or In-Memory...). This makes sense when the data in a source file can't be clearly identified by an attribute (id), but moreover when the set data it contains is persisted over several entities.&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
lookup {&lt;br /&gt;
   [&amp;lt;lookup-rules&amp;gt;]*&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lookup-rule expression:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
lookup-rule: &lt;br /&gt;
 'for' .. 'on' .. 'createOn' .. 'with' .. 'cacheSize' .. 'mapTo' .. ['allowNoResult' | 'allowNoResult' | 'markerPath']&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
interchange Currencies describedBy &amp;quot;european central bank currency exchange rates based on euro&amp;quot; persist elementSize 50 file&lt;br /&gt;
	XML &amp;quot;C:/git/development/net.osbee.sample.foodmart/net.osbee.sample.foodmart.datainterchange/smooks-resources/eurofxref-hist-90d.xml&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	mapByAttribute beans {&lt;br /&gt;
		entity McurrencyStream createOn &amp;quot;/Envelope/Cube&amp;quot; marker latest expression {&lt;br /&gt;
			assign importDate with NowDate as Date&lt;br /&gt;
		}&lt;br /&gt;
		entity McurrencyDay createOn &amp;quot;/Envelope/Cube/Cube&amp;quot; format {&lt;br /&gt;
			for ratingDate coding &amp;quot;yyyy-MM-dd&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
		mapping {&lt;br /&gt;
			map ratingDate to &amp;quot;time&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
		entity Mcurrency createOn &amp;quot;/Envelope/Cube/Cube/Cube&amp;quot; expression {&lt;br /&gt;
			copy currencyDate from McurrencyDay property ratingDate&lt;br /&gt;
		}&lt;br /&gt;
		lookup {&lt;br /&gt;
			for currency_name on McurrencyName createOn &amp;quot;/Envelope/Cube/Cube/Cube&amp;quot; with isoCode cacheSize 300 mapTo &amp;quot;currency&amp;quot; allowNoResult&lt;br /&gt;
			markerPath {&lt;br /&gt;
				markerEntity McurrencyNameStream markedBy latest&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		mapping {&lt;br /&gt;
			map conversion_ratio to &amp;quot;rate&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will provide you in upcoming releases with more information about so called '''locator''' instances, which are generated in the background on the basis of the '''lookups''' you would have defined, in order to query persisted data. This will give you more insights about how the Datainterchange DSL really works at the lower level.&lt;br /&gt;
&lt;br /&gt;
====format====&lt;br /&gt;
&lt;br /&gt;
With a &amp;lt;code&amp;gt;format { ... }&amp;lt;/code&amp;gt; block, the user can define the format of the entity property being converted. A &amp;lt;code&amp;gt;format&amp;lt;/code&amp;gt; block can have more than one format definitions, in the following format:&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    format {&lt;br /&gt;
        for &amp;lt;property&amp;gt; coding &amp;lt;format-string&amp;gt; [locale &amp;lt;locale-string&amp;gt;]&lt;br /&gt;
        ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    entity McurrencyDay createOn &amp;quot;/Envelope/Cube/Cube&amp;quot; format {&lt;br /&gt;
        for ratingDate coding &amp;quot;yyyy-MM-dd&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will convert the &amp;lt;code&amp;gt;&amp;quot;/Envelope/Cube/Cube&amp;quot;&amp;lt;/code&amp;gt; data to &amp;lt;code&amp;gt;ratingDate&amp;lt;/code&amp;gt; property of &amp;lt;code&amp;gt;McurrencyDay&amp;lt;/code&amp;gt; in format &amp;lt;code&amp;gt;&amp;quot;yyyy-MM-dd&amp;quot;&amp;lt;/code&amp;gt;, where&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    entity EDIOrderHeader createOn &amp;quot;/Order/header&amp;quot; format {&lt;br /&gt;
        for hdrDate coding &amp;quot;EEE MMM dd HH:mm:ss zzz yyyy&amp;quot; locale &amp;quot;en_US&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will format the &amp;lt;code&amp;gt;hdrDate&amp;lt;/code&amp;gt; in format &amp;lt;code&amp;gt;&amp;quot;EEE MMM dd HH:mm:ss zzz yyyy&amp;quot;&amp;lt;/code&amp;gt; with English locale, i.e. the month and weekday names will be in English.&lt;br /&gt;
&lt;br /&gt;
====mapping====&lt;br /&gt;
With a mapping { ... } block you are able single-handedly to '''map''' or rather to '''match''' each data attributes from an external source file to attributes of your data model.&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
mapping {&lt;br /&gt;
 [map &amp;lt;entity-attribut&amp;gt; to &amp;quot;Data&amp;quot;]*&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
mapping{&lt;br /&gt;
  map conversion_ratio to &amp;quot;rate&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that the only valid attributs here are members of the corresponging entity, that you would have chosen prior defining the &amp;lt;code&amp;gt;mapping&amp;lt;/code&amp;gt; block itself.&lt;br /&gt;
&lt;br /&gt;
====keys====&lt;br /&gt;
With a &amp;lt;code&amp;gt;keys&amp;lt;/code&amp;gt; { ... } block, the user can define a set of '''keys''' to identify data within our persistence layer (DB or In-Memory...). &lt;br /&gt;
This makes sence when the data in a source file can't be clearly identified by an attribute (id). Therefore a set of attributes (keys) can be defined and then be used as identification parameter set by a [[#lookup|''lookups'']] instance in order to query our data pool and identify data using several criteria.&lt;br /&gt;
&lt;br /&gt;
► '''Syntax''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
keys {&lt;br /&gt;
 [key &amp;lt;entity-attribute&amp;gt;]*&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Assuming you try to update the address data of an employee from an entity named Employee, but you happen not to have his/her personal id. By setting a &amp;lt;code&amp;gt;keys&amp;lt;/code&amp;gt; { ... } block, like shown here below, you allow the Datainterchange unit to look into the database after employee's data based on the key set inside this block, rather than using a personal id, which might have been here unique and more than enough to find the employee right away.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
keys {&lt;br /&gt;
  key last_name&lt;br /&gt;
  key first_name&lt;br /&gt;
  key age&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that the only valid attributes here are members of the corresponding entity, that you would have chosen prior defining the &amp;lt;code&amp;gt;keys&amp;lt;/code&amp;gt; block itself.&lt;br /&gt;
&lt;br /&gt;
==TriggerView==&lt;br /&gt;
A TriggerView will be automatically generated by the DataInterchange DSL as soon as you define an interchange unit inside the model file and save it. &lt;br /&gt;
&lt;br /&gt;
You can see on the right side of the figure shown below, the definition of 10 interchange units within the Datainterchange model file (blue rectangles); and on the right side of the figure you can see, how the TriggerView looks like (green rectangle), when it is embedded inside an application page in its entirety. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TriggerView.png|600px|center|''Figure 5: Datainterchange TriggerView Definition and Application Views''|thumbnail|600px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To achieve this result you need to do two simple steps. You need first to either integrate the TriggerView into an existing perspective or create a new perspective and then integrate the view into it, like shown below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
► '''Example 1''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import ns net.osbee.sample.foodmart.datainterchanges&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.foodmart.perspectives {&lt;br /&gt;
&lt;br /&gt;
	perspective Currencies iconURI &amp;quot;employee&amp;quot; {&lt;br /&gt;
		sashContainer c1 orientation horizontal {&lt;br /&gt;
			part imex view dataInterchange datainterchanges spaceVolume &amp;quot;20&amp;quot;&lt;br /&gt;
			...&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The most important thing in this example is to notice the use of the keyword '''view''' followed by the keyword '''dataInterchange''' and the name ''datainterchanges'' referring to the package, in which all datainterchange unit definitions have to be found.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second step would be to create a menu entry for you to be able to access the newly created or altered perspective in the application via the menu bar, like shown in the following example.&lt;br /&gt;
&lt;br /&gt;
► '''Example 2''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import ns net.osbee.sample.foodmart.perspectives.Currencies&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.foodmart.menues {  &lt;br /&gt;
	...&lt;br /&gt;
	entry Menu describedBy &amp;quot;my menu&amp;quot; { &lt;br /&gt;
		entry Perspectives {&lt;br /&gt;
			entry MasterData {&lt;br /&gt;
				entry Company image &amp;quot;company&amp;quot; perspective Company&lt;br /&gt;
				entry Employees image &amp;quot;employee&amp;quot; perspective Employee&lt;br /&gt;
				entry Products image &amp;quot;products&amp;quot; perspective Products&lt;br /&gt;
				entry CashRegisterData image &amp;quot;editor_area&amp;quot; perspective CashMasterDataRegister&lt;br /&gt;
&lt;br /&gt;
				entry Currencies image &amp;quot;products&amp;quot; perspective Currencies&lt;br /&gt;
&lt;br /&gt;
				entry People image &amp;quot;task_action_delegate&amp;quot; perspective PeopleMock&lt;br /&gt;
				&lt;br /&gt;
			}&lt;br /&gt;
		...&lt;br /&gt;
	...	}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:TriggerViewMenuSelection.png|600px|center|''Figure 6: Datainterchange TriggerView Menu Selection''|thumbnail|600px]]&lt;br /&gt;
&lt;br /&gt;
The figure above shows the same menu structure defined in the example 2 and results in showing the application with the TriggerView, as you can see on the left side of the figure 5. You can get and review more information on how to create menu entries and perspectives in both [[Menu DSL]] and [[Perspective DSL]] documentation pages. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Among all the components that are generated for the use of each interchange unit functions are action buttons, you would find inside toolbars in some dialogs. Usually you have to define them by yourself in the corresponding DSL files. This step is not needed here, since it has already been generated for this particular view.&lt;br /&gt;
&lt;br /&gt;
[[File:TriggerViewActionButtons.png|600px|center|''Figure 7: Action Buttons for datainterchange unit functions''|thumbnail|600px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please note that it is '''not mandatory''' to display all available functionalities through the use of the TriggerView like shown here above. It is customary to only use parts of the generated Datainterchange components (e.g. action buttons) where you see them fit; for instance in order to only use each interchange unit functionalities (import and/or export) in separated and dedicated views (dialogs). Therefore, we also recommend you to have a look at the [[Action DSL]] documentation page in order to understand how to create your own toolbars, and so forth creating the buttons using import or export functions of any datainterchange unit you would have created.&lt;br /&gt;
&lt;br /&gt;
==Smooks Configuration and Settings File==&lt;br /&gt;
'''Please note that whenever a model is saved''', the '''Datainterchange DSL''' will do three things '''automatically''':&lt;br /&gt;
&lt;br /&gt;
* generate Java classes,&lt;br /&gt;
* generate Smooks configuration files for both import and export functions, and&lt;br /&gt;
* generate a config file to modify the import and export paths on runtime.&lt;br /&gt;
&lt;br /&gt;
===Smooks Configuration File===&lt;br /&gt;
&lt;br /&gt;
The OS.bee implementation of Data Interchange interface is based on Smooks. Smooks is a Java framework for processing XML and non XML data (CSV, EDI, Java etc) by mapping data to JavaBeans, which can later be persisted, enriched (merge with existing data from other source), or converted and exported into other formats.&lt;br /&gt;
&lt;br /&gt;
Smooks relies on a proper configuration file for the import / export processes. These configuration files are generated by the Datainterchange DSL automatically. Here is a brief introduction of how the generated Smooks configuration files work.&lt;br /&gt;
&lt;br /&gt;
When a data import / export Smooks instance is initiated, it will be supplied with the generated config file. This file defines the actions to be performed upon certain events during the SAX parsing process. Here is an example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line='line'&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;smooks-resource-list xmlns=&amp;quot;http://www.milyn.org/xsd/smooks-1.1.xsd&amp;quot; xmlns:csv=&amp;quot;http://www.milyn.org/xsd/smooks/csv-1.2.xsd&amp;quot; xmlns:dao=&amp;quot;http://www.milyn.org/xsd/smooks/persistence-1.2.xsd&amp;quot; xmlns:jb=&amp;quot;http://www.milyn.org/xsd/smooks/javabean-1.2.xsd&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;jb:bean beanId=&amp;quot;McurrencyNameStream&amp;quot; class=&amp;quot;net.osbee.sample.foodmart.entities.McurrencyNameStream&amp;quot; createOnElement=&amp;quot;/csv-set&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;jb:expression property=&amp;quot;importDate&amp;quot;&amp;gt;PTIME.nowDate&amp;lt;/jb:expression&amp;gt;&lt;br /&gt;
        &amp;lt;jb:wiring beanIdRef=&amp;quot;McurrencyName&amp;quot; setterMethod=&amp;quot;addToCurrencyNames&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/jb:bean&amp;gt;&lt;br /&gt;
    &amp;lt;jb:bean beanId=&amp;quot;McurrencyName&amp;quot; class=&amp;quot;net.osbee.sample.foodmart.entities.McurrencyName&amp;quot; createOnElement=&amp;quot;/csv-set/csv-record&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;jb:value data=&amp;quot;/csv-set/csv-record/isoCode&amp;quot; decoder=&amp;quot;String&amp;quot; property=&amp;quot;isoCode&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;jb:value data=&amp;quot;/csv-set/csv-record/name&amp;quot; decoder=&amp;quot;String&amp;quot; property=&amp;quot;name&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;jb:value data=&amp;quot;/csv-set/csv-record/countries&amp;quot; decoder=&amp;quot;String&amp;quot; property=&amp;quot;countries&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/jb:bean&amp;gt;&lt;br /&gt;
    &amp;lt;csv:reader fields=&amp;quot;isoCode,name,countries&amp;quot; indent=&amp;quot;false&amp;quot; separator=&amp;quot;;&amp;quot; skipLines=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;params&amp;gt;&lt;br /&gt;
        &amp;lt;param name=&amp;quot;stream.filter.type&amp;quot;&amp;gt;SAX&amp;lt;/param&amp;gt;&lt;br /&gt;
        &amp;lt;param name=&amp;quot;inputType&amp;quot;&amp;gt;input.csv&amp;lt;/param&amp;gt;&lt;br /&gt;
        &amp;lt;param name=&amp;quot;smooks.visitors.sort&amp;quot;&amp;gt;false&amp;lt;/param&amp;gt;&lt;br /&gt;
        &amp;lt;param name=&amp;quot;input.csv&amp;quot; type=&amp;quot;input.type.actived&amp;quot;&amp;gt;C:/git/net.osbee.sample.foodmart/net.osbee.sample.foodmart.datainterchange/smooks-resources/ISOCurrencyCodes081507.csv&amp;lt;/param&amp;gt;&lt;br /&gt;
    &amp;lt;/params&amp;gt;&lt;br /&gt;
&amp;lt;/smooks-resource-list&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Further informations on the Smoooks framework are available and can be reviewed in its [http://www.smooks.org/guide documentation] you will find on the [http://www.smooks.org/index official website].&lt;br /&gt;
&lt;br /&gt;
===Path Config File===&lt;br /&gt;
&lt;br /&gt;
The file is interpreted using the Properties xml im- and export method and looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE properties SYSTEM &amp;quot;http://java.sun.com/dtd/properties.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;properties&amp;gt;&lt;br /&gt;
&amp;lt;comment&amp;gt;dataInterchange file URLs&amp;lt;/comment&amp;gt;&lt;br /&gt;
&amp;lt;entry key=&amp;quot;EmployeesDepartment-import&amp;quot;&amp;gt;C:/myimports/employeesdepartment.xml&amp;lt;/entry&amp;gt;&lt;br /&gt;
&amp;lt;entry key=&amp;quot;EmployeesDepartment-export&amp;quot;&amp;gt;C:/myexports/employeesdepartment.xml&amp;lt;/entry&amp;gt;&lt;br /&gt;
&amp;lt;/properties&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default this file is named like the title in the Data Interchange package and extended by &amp;quot;Config&amp;quot; and has the extension &amp;quot;xml&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;package net.osbee.sample.foodmart.datainterchanges title &amp;quot;DataInterchange&amp;quot; {}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
leads to the filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;DataInterchangeConfig.xml&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and is stored platform independently in the current user's home directory under the subdirectory &amp;quot;.osbee&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
An administrator must receive this configuration file with the application, modify it and place it somewhere on the application server. The path to this configuration file must be supplied in the product's preferences (&amp;lt;code&amp;gt;org.eclipse.osbp.production.prefs&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;datainterchange/datainterchangeConfiguration=c\:\\DataInterchangeConfig.xml&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The path value obviously depends on the operating system you are developing.&lt;br /&gt;
&lt;br /&gt;
== Copyright Notice ==&lt;br /&gt;
{{Copyright Notice}}&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2881</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2881"/>
				<updated>2017-10-27T16:02:04Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* mobileTab */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [( [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a wide range of &amp;quot;simple&amp;quot; UI elements.  This section documents these elements along with their appropriate options.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A push button is generated with the &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; keyword. Buttons can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag and an alignment specification.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
button [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        button clickMe align top-right&lt;br /&gt;
        button (readonly) doNotClickMePlease&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two buttons with the lower one set to read-only (disabled).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A checkbox is generated with the checkbox keyword. Checkboxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
checkbox [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        checkbox clickMe&lt;br /&gt;
        checkbox (readonly) doNotClick&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two checkboxes, with the second one disabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An combo box is generated with the combo keyword. Combo boxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the type keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the options group, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions, and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
combo [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        combo Combo {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Combo].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, combo boxes are created with the &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt; keyword, shown as image icons with the given caption. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A datefield is generated with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword. Datefields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the following may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* date format - one of the following values can be used to define the date format for the field: &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;.&lt;br /&gt;
* date/time resolution - the smallest unit of time the datefield should consider. Can be set to &amp;lt;code&amp;gt;second&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minute&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt; (default).&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
datefield [( [&amp;lt;dateFormat&amp;gt;] [&amp;lt;dateResolution&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        datefield MyDate&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a date field is created with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword, the Vaadin UI provides a date picker along with the field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A decimal field contains floating point numbers and is generated with the &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt; keyword. Decimal fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following may be defined in parentheses between the keyword and the given name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
* &amp;lt;code&amp;gt;precision&amp;lt;/code&amp;gt; - this option controls the number of digits after the decimal point to be displayed (integer). Defaults to 2.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
decimalField [( [noGrouping] [noMarkNegative] [precision=&amp;lt;precision&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    form Person {&lt;br /&gt;
        decimalField (noGrouping precision=3) noGrp&lt;br /&gt;
        decimalField (precision=5) Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, decimal fields are created by the &amp;lt;code&amp;gt;decimaField&amp;lt;/code&amp;gt; keyword. Mechanisms for controlling the number grouping and for adding a CSS class for negative numbers are available. The desired precision can be set optionally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A label is generated with the &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; keyword. Labels can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
label [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] )] {&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        label MyLabel&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will show a label, the most basic UI element.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A list is generated with the &amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt; keyword. Lists can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a list may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specfied.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
listSelect [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    form ConvertibleForm_left {&lt;br /&gt;
        listSelect someType {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.SomeType&lt;br /&gt;
        }&lt;br /&gt;
        bind convertible.someType &amp;lt;--&amp;gt; [this.someType].selection&lt;br /&gt;
    } align top-left&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, options groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A numeric field contains integers and is generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Numeric fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following&lt;br /&gt;
may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
numericField [( [noGrouping] [noMarkNegative] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Main {&lt;br /&gt;
    form person {&lt;br /&gt;
        numericField (noGrouping) noGrp&lt;br /&gt;
        numericField Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, numeric fields are generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Among other features, there are options to control the number grouping and a CSS class for negative numbers.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An optionsgroup is generated with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. Optionsgroups can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the captionField keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imagefield&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
optionsgroup [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
        [type &amp;lt;type&amp;gt;]&lt;br /&gt;
        [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
        [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
        [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
        [useBeanService]&lt;br /&gt;
        [readonly]&lt;br /&gt;
        [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
        [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
        [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        optionsgroup Buttons {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Buttons].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, option groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A progress bar is generated with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword. Progress bars can receive a name, an i18n key and a string with CSS styles. The value that is displayed by the progressbar is a floating point number between 0 and 1. It can be determined by databinding (see section &amp;quot;databinding&amp;quot; below&amp;quot;). Validator assignments, databinding instructions, and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
progressbar [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        progressbar Bar&lt;br /&gt;
        decimalField (precision=2) ValueField&lt;br /&gt;
    }&lt;br /&gt;
    bind [ValueField].value --&amp;gt; [Bar].value&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a progress bar is created with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword, displaying a value between 0 (0%) and 1 (100%), and the value is retrieved via databinding from a &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A bean reference field is generated with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. Bean reference fields look like combo boxes. They are used to display values from collections (tables etc.) that are only referenced in the entity or DTO model. Bean reference fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a bean reference field accepts the source of the reference it is supposed to resolve and display after the &amp;lt;code&amp;gt;refSource&amp;lt;/code&amp;gt; keyword. Additionally, it may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the reference target datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, an in-memory bean provider service may be specified. Validator assignments, databinding instructions and visibility processor directives may be set. After the closing braces, an alignment may be defined.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
referenceField [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [refSource &amp;lt;type : field&amp;gt;]&lt;br /&gt;
    [captionField &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [inMemoryService &amp;lt;inMemoryBeanProvider&amp;gt;]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textfield description {&lt;br /&gt;
            MinLengthValidator(3)&lt;br /&gt;
            MaxLengthValidator(125)&lt;br /&gt;
        }&lt;br /&gt;
        checkbox(readonly) dirty&lt;br /&gt;
        referenceField weightUom {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.UnitOfMeasureDto&lt;br /&gt;
            captionField description&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.WeightDto:uom&lt;br /&gt;
        }&lt;br /&gt;
        referenceField priceCurrency {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.CurrencyDto&lt;br /&gt;
            captionField iso3code&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.PriceDto:currency&lt;br /&gt;
        }&lt;br /&gt;
        bind main.description &amp;lt;--&amp;gt; [this.description].value&lt;br /&gt;
        bind main.dirty --&amp;gt; [this.dirty].value&lt;br /&gt;
        bind main.weight.uom &amp;lt;--&amp;gt; [this.weightUom].value&lt;br /&gt;
        bind main.price.currency &amp;lt;--&amp;gt; [this.priceCurrency].value&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, Reference fields are created with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved from a referenced entity or DTO.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search field is generated with the &amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; keyword. Search fields must be located inside a search panel. They provide wildcard support for search actions. A search field can be given an i18n key and a string with CSS styles. The property of the datatype that is searched must be specified.&lt;br /&gt;
&lt;br /&gt;
The datatype that is searched is defined in the &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; around the search field. A search panel can be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles. In curly braces, the datatype that shall be searched can be specified, and search fields for various properties of this datatype (nested properties are supported), databinding instructions and visibility processor directives may be defined. After the closing braces, an alignment may be specified. More about search is covered in section &amp;quot;search&amp;quot; below.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
searchPanel [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [searchfield [( [i18n &amp;lt;i18nKey&amp;gt;] &lt;br /&gt;
                [styles &amp;lt;stylesString&amp;gt;] )] &amp;lt;property&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    searchPanel SearchPanel {&lt;br /&gt;
        type net.osbee.sample.dtos.CurrencyDto&lt;br /&gt;
        searchfield abbrivation&lt;br /&gt;
        searchfield fullname&lt;br /&gt;
    } align top-fill&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, two search panels are created with the &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; keyword. They may be given a datatype to be searched. The single properties in which can be searched are specified in search fields.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
A table is generated with the table keyword. Tables can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a table may be given a datatype (e.g. a DTO) that can be set with the type keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If images are to be displayed in the table, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set.&lt;br /&gt;
&lt;br /&gt;
The values that are to be displayed can be fed into the table by databinding (see section &amp;quot;databinding&amp;quot; below). The columns displayed and their order are determined by the column keywords in the columns section of the table. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified. Columns are enumerated within the columns environment. For each column, the content has to be specified. This can be done by specifying a property of the datatype contained within the table. These properties may be nested.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
table [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [columns {&lt;br /&gt;
        [column &amp;lt;content&amp;gt;] [icon &amp;lt;iconString&amp;gt;]&lt;br /&gt;
    }]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
table DataTable {&lt;br /&gt;
    useBeanService&lt;br /&gt;
    type net.osbee.sample.foodmart.dtos.general.VegetableDto&lt;br /&gt;
&lt;br /&gt;
    columns {&lt;br /&gt;
        column category&lt;br /&gt;
        column weight&lt;br /&gt;
        column color&lt;br /&gt;
        column origin&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    bind tableRefresh --&amp;gt; [this].refresh&lt;br /&gt;
} align fill-fill&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a table is created with the &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; keyword. A BeanService is used, and a datatype is assigned to the table. Columns and their order are specified in the columns section.&lt;br /&gt;
The values are entered into the table by databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
A text area is generated with the &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt; keyword. Text areas can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
textarea [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textarea MyText&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a text area is created with the &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A text feld is generated with the &amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt; keyword. Textfields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following &amp;quot;datatype validators&amp;quot; may be defined in the parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;maxLength&amp;lt;/code&amp;gt; - creates a maximum-length validator for this field&lt;br /&gt;
(integer)&lt;br /&gt;
* &amp;lt;code&amp;gt;minLength&amp;lt;/code&amp;gt; - creates a minimum-length validator for this field&lt;br /&gt;
(integer)&lt;br /&gt;
* &amp;lt;code&amp;gt;regex&amp;lt;/code&amp;gt; - creates a regular expression validator for this field (String)&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions, and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
textfield [( [maxLength=&amp;lt;maxLength&amp;gt;]&lt;br /&gt;
             [minLength=&amp;lt;minLength&amp;gt;]&lt;br /&gt;
             [regex=&amp;lt;rexegString&amp;gt;]&lt;br /&gt;
             [i18n &amp;lt;i18nKey&amp;gt;]&lt;br /&gt;
             [styles &amp;lt;stylesString&amp;gt;]&lt;br /&gt;
             [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textfield (regex=&amp;quot;[A-Z]-[0-9]{4}&amp;quot;) TestText&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a textfield is created along with validators that check the input in the UI field for conformity to certain conditions. If the requirements are not met, an error mark will be displayed.&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a variety of elements that are optimised for display on mobile devices. Mobile UIs are described in &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; files similar to regular UI models. The main difference is that the top level element in a mobile UI is a &amp;quot;mobile view&amp;quot; (instead of an desktop view or &amp;quot;ideview&amp;quot;), created by the keyword &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Most of the UI elements that can be used in a desktop view (ideview) can be used inside a mobile view as well. In particular, these are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; - here they are called &amp;lt;code&amp;gt;mobileHorizontalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; - here called &amp;lt;code&amp;gt;mobileSearchPanel&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; - here called &amp;lt;code&amp;gt;mobileTab&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; - here called &amp;lt;code&amp;gt;mobileVerticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If these model elements are used in a mobile environment, they will be rendered by the appropriate UI elements for Vaadin mobile UIs.&lt;br /&gt;
&lt;br /&gt;
====Mobile-only Elements====&lt;br /&gt;
&lt;br /&gt;
In addition to the mobile version of &amp;quot;desktop&amp;quot; UI elements, currently there is one additional UI element that can only be used in mobile UIs:&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;switchIt&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A toggle switch for use in mobile UIs is generated with the &amp;lt;code&amp;gt;switchIt&amp;lt;/code&amp;gt; keyword. Switches serve the same purpose in mobile UIs that checkboxes do for desktop UIs. A switch can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
switchIt [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
mobile Sample {&lt;br /&gt;
    verticalGroup Options {&lt;br /&gt;
        switchIt Active&lt;br /&gt;
    } align fill-fill&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a &amp;quot;sliding style&amp;quot; switch is created with the &amp;lt;code&amp;gt;switchIt&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
====Mobile Layouts====&lt;br /&gt;
As has been stated above, vertical and horizontal layouts, search panels and tabsheets are available also in mobile UIs, albeit with another keyword. In these layouts, the simple UI elements listed above can be used in order to render mobile UIs.&lt;br /&gt;
&lt;br /&gt;
In addition to&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;mobileHorizontalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mobileSearchPanel&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mobileTab&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mobileVerticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
there are a few mobile-only layouts without desktop UI counterparts available:&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalButtonGroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal button group combines buttons to a unit in a mobile UI. It is created by the horizontalButtonGroup keyword. A horizontal button group can receive a name, an i18n key, a string with CSS styles and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
The elements contained in it, databinding instructions and visibility processor directives may be de�ned in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
horizontalButtonGroup [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;contained UI elements&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
horizontalButtonGroup Group {&lt;br /&gt;
    button PushMe&lt;br /&gt;
    button OrMe&lt;br /&gt;
    button (readonly) ButNotMe&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a horizontal button group will tie three buttons together horizontally.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;mobileTab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A mobile tabsheet is similar to the regular tabsheet with the big difference that the tab selection is at the bottom. It is created by the &amp;lt;code&amp;gt;mobileTab&amp;lt;/code&amp;gt; keyword. A mobile tabsheet can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
The tabs contained in it, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
mobileTab [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;contained UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
mobile Sample {&lt;br /&gt;
    mobileTab Main {&lt;br /&gt;
        tab first verticalGroup Person {&lt;br /&gt;
            form Demo {&lt;br /&gt;
                textfield FirstName&lt;br /&gt;
                textfield LastName&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        tab second verticalGroup Details {&lt;br /&gt;
            form Demo {&lt;br /&gt;
                textfield Address&lt;br /&gt;
                textfield City&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a mobile tabsheet is created with the keyword &amp;lt;code&amp;gt;mobileTab&amp;lt;/code&amp;gt;. Each tab can contain an UI element or a layout (in this case, a vertical group).&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;navRoot&amp;lt;/code&amp;gt;=====&lt;br /&gt;
=====&amp;lt;code&amp;gt;navbarActions&amp;lt;/code&amp;gt;=====&lt;br /&gt;
=====&amp;lt;code&amp;gt;navButton&amp;lt;/code&amp;gt;=====&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalGroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Mobile Navigation====&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2880</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2880"/>
				<updated>2017-10-27T07:47:58Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* horizontalButtonGroup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [( [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a wide range of &amp;quot;simple&amp;quot; UI elements.  This section documents these elements along with their appropriate options.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A push button is generated with the &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; keyword. Buttons can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag and an alignment specification.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
button [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        button clickMe align top-right&lt;br /&gt;
        button (readonly) doNotClickMePlease&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two buttons with the lower one set to read-only (disabled).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A checkbox is generated with the checkbox keyword. Checkboxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
checkbox [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        checkbox clickMe&lt;br /&gt;
        checkbox (readonly) doNotClick&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two checkboxes, with the second one disabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An combo box is generated with the combo keyword. Combo boxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the type keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the options group, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions, and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
combo [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        combo Combo {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Combo].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, combo boxes are created with the &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt; keyword, shown as image icons with the given caption. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A datefield is generated with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword. Datefields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the following may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* date format - one of the following values can be used to define the date format for the field: &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;.&lt;br /&gt;
* date/time resolution - the smallest unit of time the datefield should consider. Can be set to &amp;lt;code&amp;gt;second&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minute&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt; (default).&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
datefield [( [&amp;lt;dateFormat&amp;gt;] [&amp;lt;dateResolution&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        datefield MyDate&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a date field is created with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword, the Vaadin UI provides a date picker along with the field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A decimal field contains floating point numbers and is generated with the &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt; keyword. Decimal fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following may be defined in parentheses between the keyword and the given name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
* &amp;lt;code&amp;gt;precision&amp;lt;/code&amp;gt; - this option controls the number of digits after the decimal point to be displayed (integer). Defaults to 2.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
decimalField [( [noGrouping] [noMarkNegative] [precision=&amp;lt;precision&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    form Person {&lt;br /&gt;
        decimalField (noGrouping precision=3) noGrp&lt;br /&gt;
        decimalField (precision=5) Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, decimal fields are created by the &amp;lt;code&amp;gt;decimaField&amp;lt;/code&amp;gt; keyword. Mechanisms for controlling the number grouping and for adding a CSS class for negative numbers are available. The desired precision can be set optionally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A label is generated with the &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; keyword. Labels can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
label [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] )] {&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        label MyLabel&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will show a label, the most basic UI element.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A list is generated with the &amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt; keyword. Lists can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a list may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specfied.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
listSelect [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    form ConvertibleForm_left {&lt;br /&gt;
        listSelect someType {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.SomeType&lt;br /&gt;
        }&lt;br /&gt;
        bind convertible.someType &amp;lt;--&amp;gt; [this.someType].selection&lt;br /&gt;
    } align top-left&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, options groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A numeric field contains integers and is generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Numeric fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following&lt;br /&gt;
may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
numericField [( [noGrouping] [noMarkNegative] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Main {&lt;br /&gt;
    form person {&lt;br /&gt;
        numericField (noGrouping) noGrp&lt;br /&gt;
        numericField Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, numeric fields are generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Among other features, there are options to control the number grouping and a CSS class for negative numbers.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An optionsgroup is generated with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. Optionsgroups can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the captionField keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imagefield&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
optionsgroup [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
        [type &amp;lt;type&amp;gt;]&lt;br /&gt;
        [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
        [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
        [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
        [useBeanService]&lt;br /&gt;
        [readonly]&lt;br /&gt;
        [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
        [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
        [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        optionsgroup Buttons {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Buttons].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, option groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A progress bar is generated with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword. Progress bars can receive a name, an i18n key and a string with CSS styles. The value that is displayed by the progressbar is a floating point number between 0 and 1. It can be determined by databinding (see section &amp;quot;databinding&amp;quot; below&amp;quot;). Validator assignments, databinding instructions, and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
progressbar [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        progressbar Bar&lt;br /&gt;
        decimalField (precision=2) ValueField&lt;br /&gt;
    }&lt;br /&gt;
    bind [ValueField].value --&amp;gt; [Bar].value&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a progress bar is created with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword, displaying a value between 0 (0%) and 1 (100%), and the value is retrieved via databinding from a &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A bean reference field is generated with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. Bean reference fields look like combo boxes. They are used to display values from collections (tables etc.) that are only referenced in the entity or DTO model. Bean reference fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a bean reference field accepts the source of the reference it is supposed to resolve and display after the &amp;lt;code&amp;gt;refSource&amp;lt;/code&amp;gt; keyword. Additionally, it may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the reference target datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, an in-memory bean provider service may be specified. Validator assignments, databinding instructions and visibility processor directives may be set. After the closing braces, an alignment may be defined.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
referenceField [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [refSource &amp;lt;type : field&amp;gt;]&lt;br /&gt;
    [captionField &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [inMemoryService &amp;lt;inMemoryBeanProvider&amp;gt;]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textfield description {&lt;br /&gt;
            MinLengthValidator(3)&lt;br /&gt;
            MaxLengthValidator(125)&lt;br /&gt;
        }&lt;br /&gt;
        checkbox(readonly) dirty&lt;br /&gt;
        referenceField weightUom {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.UnitOfMeasureDto&lt;br /&gt;
            captionField description&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.WeightDto:uom&lt;br /&gt;
        }&lt;br /&gt;
        referenceField priceCurrency {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.CurrencyDto&lt;br /&gt;
            captionField iso3code&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.PriceDto:currency&lt;br /&gt;
        }&lt;br /&gt;
        bind main.description &amp;lt;--&amp;gt; [this.description].value&lt;br /&gt;
        bind main.dirty --&amp;gt; [this.dirty].value&lt;br /&gt;
        bind main.weight.uom &amp;lt;--&amp;gt; [this.weightUom].value&lt;br /&gt;
        bind main.price.currency &amp;lt;--&amp;gt; [this.priceCurrency].value&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, Reference fields are created with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved from a referenced entity or DTO.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search field is generated with the &amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; keyword. Search fields must be located inside a search panel. They provide wildcard support for search actions. A search field can be given an i18n key and a string with CSS styles. The property of the datatype that is searched must be specified.&lt;br /&gt;
&lt;br /&gt;
The datatype that is searched is defined in the &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; around the search field. A search panel can be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles. In curly braces, the datatype that shall be searched can be specified, and search fields for various properties of this datatype (nested properties are supported), databinding instructions and visibility processor directives may be defined. After the closing braces, an alignment may be specified. More about search is covered in section &amp;quot;search&amp;quot; below.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
searchPanel [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [searchfield [( [i18n &amp;lt;i18nKey&amp;gt;] &lt;br /&gt;
                [styles &amp;lt;stylesString&amp;gt;] )] &amp;lt;property&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    searchPanel SearchPanel {&lt;br /&gt;
        type net.osbee.sample.dtos.CurrencyDto&lt;br /&gt;
        searchfield abbrivation&lt;br /&gt;
        searchfield fullname&lt;br /&gt;
    } align top-fill&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, two search panels are created with the &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; keyword. They may be given a datatype to be searched. The single properties in which can be searched are specified in search fields.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
A table is generated with the table keyword. Tables can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a table may be given a datatype (e.g. a DTO) that can be set with the type keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If images are to be displayed in the table, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set.&lt;br /&gt;
&lt;br /&gt;
The values that are to be displayed can be fed into the table by databinding (see section &amp;quot;databinding&amp;quot; below). The columns displayed and their order are determined by the column keywords in the columns section of the table. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified. Columns are enumerated within the columns environment. For each column, the content has to be specified. This can be done by specifying a property of the datatype contained within the table. These properties may be nested.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
table [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [columns {&lt;br /&gt;
        [column &amp;lt;content&amp;gt;] [icon &amp;lt;iconString&amp;gt;]&lt;br /&gt;
    }]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
table DataTable {&lt;br /&gt;
    useBeanService&lt;br /&gt;
    type net.osbee.sample.foodmart.dtos.general.VegetableDto&lt;br /&gt;
&lt;br /&gt;
    columns {&lt;br /&gt;
        column category&lt;br /&gt;
        column weight&lt;br /&gt;
        column color&lt;br /&gt;
        column origin&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    bind tableRefresh --&amp;gt; [this].refresh&lt;br /&gt;
} align fill-fill&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a table is created with the &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; keyword. A BeanService is used, and a datatype is assigned to the table. Columns and their order are specified in the columns section.&lt;br /&gt;
The values are entered into the table by databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
A text area is generated with the &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt; keyword. Text areas can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
textarea [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textarea MyText&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a text area is created with the &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A text feld is generated with the &amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt; keyword. Textfields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following &amp;quot;datatype validators&amp;quot; may be defined in the parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;maxLength&amp;lt;/code&amp;gt; - creates a maximum-length validator for this field&lt;br /&gt;
(integer)&lt;br /&gt;
* &amp;lt;code&amp;gt;minLength&amp;lt;/code&amp;gt; - creates a minimum-length validator for this field&lt;br /&gt;
(integer)&lt;br /&gt;
* &amp;lt;code&amp;gt;regex&amp;lt;/code&amp;gt; - creates a regular expression validator for this field (String)&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions, and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
textfield [( [maxLength=&amp;lt;maxLength&amp;gt;]&lt;br /&gt;
             [minLength=&amp;lt;minLength&amp;gt;]&lt;br /&gt;
             [regex=&amp;lt;rexegString&amp;gt;]&lt;br /&gt;
             [i18n &amp;lt;i18nKey&amp;gt;]&lt;br /&gt;
             [styles &amp;lt;stylesString&amp;gt;]&lt;br /&gt;
             [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textfield (regex=&amp;quot;[A-Z]-[0-9]{4}&amp;quot;) TestText&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a textfield is created along with validators that check the input in the UI field for conformity to certain conditions. If the requirements are not met, an error mark will be displayed.&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a variety of elements that are optimised for display on mobile devices. Mobile UIs are described in &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; files similar to regular UI models. The main difference is that the top level element in a mobile UI is a &amp;quot;mobile view&amp;quot; (instead of an desktop view or &amp;quot;ideview&amp;quot;), created by the keyword &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Most of the UI elements that can be used in a desktop view (ideview) can be used inside a mobile view as well. In particular, these are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; - here they are called &amp;lt;code&amp;gt;mobileHorizontalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; - here called &amp;lt;code&amp;gt;mobileSearchPanel&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; - here called &amp;lt;code&amp;gt;mobileTab&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; - here called &amp;lt;code&amp;gt;mobileVerticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If these model elements are used in a mobile environment, they will be rendered by the appropriate UI elements for Vaadin mobile UIs.&lt;br /&gt;
&lt;br /&gt;
====Mobile-only Elements====&lt;br /&gt;
&lt;br /&gt;
In addition to the mobile version of &amp;quot;desktop&amp;quot; UI elements, currently there is one additional UI element that can only be used in mobile UIs:&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;switchIt&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A toggle switch for use in mobile UIs is generated with the &amp;lt;code&amp;gt;switchIt&amp;lt;/code&amp;gt; keyword. Switches serve the same purpose in mobile UIs that checkboxes do for desktop UIs. A switch can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
switchIt [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
mobile Sample {&lt;br /&gt;
    verticalGroup Options {&lt;br /&gt;
        switchIt Active&lt;br /&gt;
    } align fill-fill&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a &amp;quot;sliding style&amp;quot; switch is created with the &amp;lt;code&amp;gt;switchIt&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
====Mobile Layouts====&lt;br /&gt;
As has been stated above, vertical and horizontal layouts, search panels and tabsheets are available also in mobile UIs, albeit with another keyword. In these layouts, the simple UI elements listed above can be used in order to render mobile UIs.&lt;br /&gt;
&lt;br /&gt;
In addition to&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;mobileHorizontalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mobileSearchPanel&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mobileTab&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mobileVerticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
there are a few mobile-only layouts without desktop UI counterparts available:&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalButtonGroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal button group combines buttons to a unit in a mobile UI. It is created by the horizontalButtonGroup keyword. A horizontal button group can receive a name, an i18n key, a string with CSS styles and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
The elements contained in it, databinding instructions and visibility processor directives may be de�ned in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
horizontalButtonGroup [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;contained UI elements&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
horizontalButtonGroup Group {&lt;br /&gt;
    button PushMe&lt;br /&gt;
    button OrMe&lt;br /&gt;
    button (readonly) ButNotMe&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a horizontal button group will tie three buttons together horizontally.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;mobileTab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
=====&amp;lt;code&amp;gt;navRoot&amp;lt;/code&amp;gt;=====&lt;br /&gt;
=====&amp;lt;code&amp;gt;navbarActions&amp;lt;/code&amp;gt;=====&lt;br /&gt;
=====&amp;lt;code&amp;gt;navButton&amp;lt;/code&amp;gt;=====&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalGroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Mobile Navigation====&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2878</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2878"/>
				<updated>2017-10-26T16:42:21Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* switchIt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [( [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a wide range of &amp;quot;simple&amp;quot; UI elements.  This section documents these elements along with their appropriate options.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A push button is generated with the &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; keyword. Buttons can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag and an alignment specification.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
button [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        button clickMe align top-right&lt;br /&gt;
        button (readonly) doNotClickMePlease&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two buttons with the lower one set to read-only (disabled).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A checkbox is generated with the checkbox keyword. Checkboxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
checkbox [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        checkbox clickMe&lt;br /&gt;
        checkbox (readonly) doNotClick&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two checkboxes, with the second one disabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An combo box is generated with the combo keyword. Combo boxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the type keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the options group, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions, and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
combo [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        combo Combo {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Combo].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, combo boxes are created with the &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt; keyword, shown as image icons with the given caption. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A datefield is generated with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword. Datefields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the following may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* date format - one of the following values can be used to define the date format for the field: &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;.&lt;br /&gt;
* date/time resolution - the smallest unit of time the datefield should consider. Can be set to &amp;lt;code&amp;gt;second&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minute&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt; (default).&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
datefield [( [&amp;lt;dateFormat&amp;gt;] [&amp;lt;dateResolution&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        datefield MyDate&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a date field is created with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword, the Vaadin UI provides a date picker along with the field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A decimal field contains floating point numbers and is generated with the &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt; keyword. Decimal fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following may be defined in parentheses between the keyword and the given name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
* &amp;lt;code&amp;gt;precision&amp;lt;/code&amp;gt; - this option controls the number of digits after the decimal point to be displayed (integer). Defaults to 2.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
decimalField [( [noGrouping] [noMarkNegative] [precision=&amp;lt;precision&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    form Person {&lt;br /&gt;
        decimalField (noGrouping precision=3) noGrp&lt;br /&gt;
        decimalField (precision=5) Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, decimal fields are created by the &amp;lt;code&amp;gt;decimaField&amp;lt;/code&amp;gt; keyword. Mechanisms for controlling the number grouping and for adding a CSS class for negative numbers are available. The desired precision can be set optionally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A label is generated with the &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; keyword. Labels can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
label [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] )] {&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        label MyLabel&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will show a label, the most basic UI element.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A list is generated with the &amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt; keyword. Lists can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a list may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specfied.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
listSelect [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    form ConvertibleForm_left {&lt;br /&gt;
        listSelect someType {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.SomeType&lt;br /&gt;
        }&lt;br /&gt;
        bind convertible.someType &amp;lt;--&amp;gt; [this.someType].selection&lt;br /&gt;
    } align top-left&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, options groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A numeric field contains integers and is generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Numeric fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following&lt;br /&gt;
may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
numericField [( [noGrouping] [noMarkNegative] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Main {&lt;br /&gt;
    form person {&lt;br /&gt;
        numericField (noGrouping) noGrp&lt;br /&gt;
        numericField Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, numeric fields are generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Among other features, there are options to control the number grouping and a CSS class for negative numbers.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An optionsgroup is generated with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. Optionsgroups can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the captionField keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imagefield&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
optionsgroup [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
        [type &amp;lt;type&amp;gt;]&lt;br /&gt;
        [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
        [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
        [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
        [useBeanService]&lt;br /&gt;
        [readonly]&lt;br /&gt;
        [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
        [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
        [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        optionsgroup Buttons {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Buttons].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, option groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A progress bar is generated with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword. Progress bars can receive a name, an i18n key and a string with CSS styles. The value that is displayed by the progressbar is a floating point number between 0 and 1. It can be determined by databinding (see section &amp;quot;databinding&amp;quot; below&amp;quot;). Validator assignments, databinding instructions, and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
progressbar [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        progressbar Bar&lt;br /&gt;
        decimalField (precision=2) ValueField&lt;br /&gt;
    }&lt;br /&gt;
    bind [ValueField].value --&amp;gt; [Bar].value&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a progress bar is created with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword, displaying a value between 0 (0%) and 1 (100%), and the value is retrieved via databinding from a &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A bean reference field is generated with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. Bean reference fields look like combo boxes. They are used to display values from collections (tables etc.) that are only referenced in the entity or DTO model. Bean reference fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a bean reference field accepts the source of the reference it is supposed to resolve and display after the &amp;lt;code&amp;gt;refSource&amp;lt;/code&amp;gt; keyword. Additionally, it may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the reference target datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, an in-memory bean provider service may be specified. Validator assignments, databinding instructions and visibility processor directives may be set. After the closing braces, an alignment may be defined.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
referenceField [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [refSource &amp;lt;type : field&amp;gt;]&lt;br /&gt;
    [captionField &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [inMemoryService &amp;lt;inMemoryBeanProvider&amp;gt;]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textfield description {&lt;br /&gt;
            MinLengthValidator(3)&lt;br /&gt;
            MaxLengthValidator(125)&lt;br /&gt;
        }&lt;br /&gt;
        checkbox(readonly) dirty&lt;br /&gt;
        referenceField weightUom {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.UnitOfMeasureDto&lt;br /&gt;
            captionField description&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.WeightDto:uom&lt;br /&gt;
        }&lt;br /&gt;
        referenceField priceCurrency {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.CurrencyDto&lt;br /&gt;
            captionField iso3code&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.PriceDto:currency&lt;br /&gt;
        }&lt;br /&gt;
        bind main.description &amp;lt;--&amp;gt; [this.description].value&lt;br /&gt;
        bind main.dirty --&amp;gt; [this.dirty].value&lt;br /&gt;
        bind main.weight.uom &amp;lt;--&amp;gt; [this.weightUom].value&lt;br /&gt;
        bind main.price.currency &amp;lt;--&amp;gt; [this.priceCurrency].value&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, Reference fields are created with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved from a referenced entity or DTO.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search field is generated with the &amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; keyword. Search fields must be located inside a search panel. They provide wildcard support for search actions. A search field can be given an i18n key and a string with CSS styles. The property of the datatype that is searched must be specified.&lt;br /&gt;
&lt;br /&gt;
The datatype that is searched is defined in the &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; around the search field. A search panel can be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles. In curly braces, the datatype that shall be searched can be specified, and search fields for various properties of this datatype (nested properties are supported), databinding instructions and visibility processor directives may be defined. After the closing braces, an alignment may be specified. More about search is covered in section &amp;quot;search&amp;quot; below.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
searchPanel [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [searchfield [( [i18n &amp;lt;i18nKey&amp;gt;] &lt;br /&gt;
                [styles &amp;lt;stylesString&amp;gt;] )] &amp;lt;property&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    searchPanel SearchPanel {&lt;br /&gt;
        type net.osbee.sample.dtos.CurrencyDto&lt;br /&gt;
        searchfield abbrivation&lt;br /&gt;
        searchfield fullname&lt;br /&gt;
    } align top-fill&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, two search panels are created with the &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; keyword. They may be given a datatype to be searched. The single properties in which can be searched are specified in search fields.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
A table is generated with the table keyword. Tables can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a table may be given a datatype (e.g. a DTO) that can be set with the type keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If images are to be displayed in the table, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set.&lt;br /&gt;
&lt;br /&gt;
The values that are to be displayed can be fed into the table by databinding (see section &amp;quot;databinding&amp;quot; below). The columns displayed and their order are determined by the column keywords in the columns section of the table. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified. Columns are enumerated within the columns environment. For each column, the content has to be specified. This can be done by specifying a property of the datatype contained within the table. These properties may be nested.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
table [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [columns {&lt;br /&gt;
        [column &amp;lt;content&amp;gt;] [icon &amp;lt;iconString&amp;gt;]&lt;br /&gt;
    }]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
table DataTable {&lt;br /&gt;
    useBeanService&lt;br /&gt;
    type net.osbee.sample.foodmart.dtos.general.VegetableDto&lt;br /&gt;
&lt;br /&gt;
    columns {&lt;br /&gt;
        column category&lt;br /&gt;
        column weight&lt;br /&gt;
        column color&lt;br /&gt;
        column origin&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    bind tableRefresh --&amp;gt; [this].refresh&lt;br /&gt;
} align fill-fill&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a table is created with the &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; keyword. A BeanService is used, and a datatype is assigned to the table. Columns and their order are specified in the columns section.&lt;br /&gt;
The values are entered into the table by databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
A text area is generated with the &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt; keyword. Text areas can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
textarea [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textarea MyText&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a text area is created with the &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A text feld is generated with the &amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt; keyword. Textfields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following &amp;quot;datatype validators&amp;quot; may be defined in the parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;maxLength&amp;lt;/code&amp;gt; - creates a maximum-length validator for this field&lt;br /&gt;
(integer)&lt;br /&gt;
* &amp;lt;code&amp;gt;minLength&amp;lt;/code&amp;gt; - creates a minimum-length validator for this field&lt;br /&gt;
(integer)&lt;br /&gt;
* &amp;lt;code&amp;gt;regex&amp;lt;/code&amp;gt; - creates a regular expression validator for this field (String)&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions, and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
textfield [( [maxLength=&amp;lt;maxLength&amp;gt;]&lt;br /&gt;
             [minLength=&amp;lt;minLength&amp;gt;]&lt;br /&gt;
             [regex=&amp;lt;rexegString&amp;gt;]&lt;br /&gt;
             [i18n &amp;lt;i18nKey&amp;gt;]&lt;br /&gt;
             [styles &amp;lt;stylesString&amp;gt;]&lt;br /&gt;
             [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textfield (regex=&amp;quot;[A-Z]-[0-9]{4}&amp;quot;) TestText&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a textfield is created along with validators that check the input in the UI field for conformity to certain conditions. If the requirements are not met, an error mark will be displayed.&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a variety of elements that are optimised for display on mobile devices. Mobile UIs are described in &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; files similar to regular UI models. The main difference is that the top level element in a mobile UI is a &amp;quot;mobile view&amp;quot; (instead of an desktop view or &amp;quot;ideview&amp;quot;), created by the keyword &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Most of the UI elements that can be used in a desktop view (ideview) can be used inside a mobile view as well. In particular, these are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; - here they are called &amp;lt;code&amp;gt;mobileHorizontalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; - here called &amp;lt;code&amp;gt;mobileSearchPanel&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; - here called &amp;lt;code&amp;gt;mobileTab&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; - here called &amp;lt;code&amp;gt;mobileVerticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If these model elements are used in a mobile environment, they will be rendered by the appropriate UI elements for Vaadin mobile UIs.&lt;br /&gt;
&lt;br /&gt;
====Mobile-only Elements====&lt;br /&gt;
&lt;br /&gt;
In addition to the mobile version of &amp;quot;desktop&amp;quot; UI elements, currently there is one additional UI element that can only be used in mobile UIs:&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;switchIt&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A toggle switch for use in mobile UIs is generated with the &amp;lt;code&amp;gt;switchIt&amp;lt;/code&amp;gt; keyword. Switches serve the same purpose in mobile UIs that checkboxes do for desktop UIs. A switch can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
switchIt [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
mobile Sample {&lt;br /&gt;
    verticalGroup Options {&lt;br /&gt;
        switchIt Active&lt;br /&gt;
    } align fill-fill&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a &amp;quot;sliding style&amp;quot; switch is created with the &amp;lt;code&amp;gt;switchIt&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
====Mobile Layouts====&lt;br /&gt;
As has been stated above, vertical and horizontal layouts, search panels and tabsheets are available also in mobile UIs, albeit with another keyword. In these layouts, the simple UI elements listed above can be used in order to render mobile UIs.&lt;br /&gt;
&lt;br /&gt;
In addition to&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;mobileHorizontalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mobileSearchPanel&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mobileTab&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;mobileVerticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
there are a few mobile-only layouts without desktop UI counterparts available:&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalButtonGroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
=====&amp;lt;code&amp;gt;mobileTab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
=====&amp;lt;code&amp;gt;navRoot&amp;lt;/code&amp;gt;=====&lt;br /&gt;
=====&amp;lt;code&amp;gt;navbarActions&amp;lt;/code&amp;gt;=====&lt;br /&gt;
=====&amp;lt;code&amp;gt;navButton&amp;lt;/code&amp;gt;=====&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalGroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Mobile Navigation====&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2877</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2877"/>
				<updated>2017-10-26T16:36:16Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* Alignment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [( [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a wide range of &amp;quot;simple&amp;quot; UI elements.  This section documents these elements along with their appropriate options.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A push button is generated with the &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; keyword. Buttons can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag and an alignment specification.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
button [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        button clickMe align top-right&lt;br /&gt;
        button (readonly) doNotClickMePlease&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two buttons with the lower one set to read-only (disabled).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A checkbox is generated with the checkbox keyword. Checkboxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
checkbox [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        checkbox clickMe&lt;br /&gt;
        checkbox (readonly) doNotClick&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two checkboxes, with the second one disabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An combo box is generated with the combo keyword. Combo boxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the type keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the options group, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions, and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
combo [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        combo Combo {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Combo].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, combo boxes are created with the &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt; keyword, shown as image icons with the given caption. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A datefield is generated with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword. Datefields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the following may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* date format - one of the following values can be used to define the date format for the field: &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;.&lt;br /&gt;
* date/time resolution - the smallest unit of time the datefield should consider. Can be set to &amp;lt;code&amp;gt;second&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minute&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt; (default).&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
datefield [( [&amp;lt;dateFormat&amp;gt;] [&amp;lt;dateResolution&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        datefield MyDate&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a date field is created with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword, the Vaadin UI provides a date picker along with the field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A decimal field contains floating point numbers and is generated with the &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt; keyword. Decimal fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following may be defined in parentheses between the keyword and the given name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
* &amp;lt;code&amp;gt;precision&amp;lt;/code&amp;gt; - this option controls the number of digits after the decimal point to be displayed (integer). Defaults to 2.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
decimalField [( [noGrouping] [noMarkNegative] [precision=&amp;lt;precision&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    form Person {&lt;br /&gt;
        decimalField (noGrouping precision=3) noGrp&lt;br /&gt;
        decimalField (precision=5) Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, decimal fields are created by the &amp;lt;code&amp;gt;decimaField&amp;lt;/code&amp;gt; keyword. Mechanisms for controlling the number grouping and for adding a CSS class for negative numbers are available. The desired precision can be set optionally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A label is generated with the &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; keyword. Labels can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
label [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] )] {&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        label MyLabel&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will show a label, the most basic UI element.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A list is generated with the &amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt; keyword. Lists can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a list may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specfied.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
listSelect [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    form ConvertibleForm_left {&lt;br /&gt;
        listSelect someType {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.SomeType&lt;br /&gt;
        }&lt;br /&gt;
        bind convertible.someType &amp;lt;--&amp;gt; [this.someType].selection&lt;br /&gt;
    } align top-left&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, options groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A numeric field contains integers and is generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Numeric fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following&lt;br /&gt;
may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
numericField [( [noGrouping] [noMarkNegative] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Main {&lt;br /&gt;
    form person {&lt;br /&gt;
        numericField (noGrouping) noGrp&lt;br /&gt;
        numericField Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, numeric fields are generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Among other features, there are options to control the number grouping and a CSS class for negative numbers.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An optionsgroup is generated with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. Optionsgroups can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the captionField keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imagefield&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
optionsgroup [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
        [type &amp;lt;type&amp;gt;]&lt;br /&gt;
        [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
        [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
        [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
        [useBeanService]&lt;br /&gt;
        [readonly]&lt;br /&gt;
        [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
        [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
        [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        optionsgroup Buttons {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Buttons].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, option groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A progress bar is generated with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword. Progress bars can receive a name, an i18n key and a string with CSS styles. The value that is displayed by the progressbar is a floating point number between 0 and 1. It can be determined by databinding (see section &amp;quot;databinding&amp;quot; below&amp;quot;). Validator assignments, databinding instructions, and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
progressbar [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        progressbar Bar&lt;br /&gt;
        decimalField (precision=2) ValueField&lt;br /&gt;
    }&lt;br /&gt;
    bind [ValueField].value --&amp;gt; [Bar].value&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a progress bar is created with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword, displaying a value between 0 (0%) and 1 (100%), and the value is retrieved via databinding from a &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A bean reference field is generated with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. Bean reference fields look like combo boxes. They are used to display values from collections (tables etc.) that are only referenced in the entity or DTO model. Bean reference fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a bean reference field accepts the source of the reference it is supposed to resolve and display after the &amp;lt;code&amp;gt;refSource&amp;lt;/code&amp;gt; keyword. Additionally, it may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the reference target datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, an in-memory bean provider service may be specified. Validator assignments, databinding instructions and visibility processor directives may be set. After the closing braces, an alignment may be defined.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
referenceField [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [refSource &amp;lt;type : field&amp;gt;]&lt;br /&gt;
    [captionField &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [inMemoryService &amp;lt;inMemoryBeanProvider&amp;gt;]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textfield description {&lt;br /&gt;
            MinLengthValidator(3)&lt;br /&gt;
            MaxLengthValidator(125)&lt;br /&gt;
        }&lt;br /&gt;
        checkbox(readonly) dirty&lt;br /&gt;
        referenceField weightUom {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.UnitOfMeasureDto&lt;br /&gt;
            captionField description&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.WeightDto:uom&lt;br /&gt;
        }&lt;br /&gt;
        referenceField priceCurrency {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.CurrencyDto&lt;br /&gt;
            captionField iso3code&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.PriceDto:currency&lt;br /&gt;
        }&lt;br /&gt;
        bind main.description &amp;lt;--&amp;gt; [this.description].value&lt;br /&gt;
        bind main.dirty --&amp;gt; [this.dirty].value&lt;br /&gt;
        bind main.weight.uom &amp;lt;--&amp;gt; [this.weightUom].value&lt;br /&gt;
        bind main.price.currency &amp;lt;--&amp;gt; [this.priceCurrency].value&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, Reference fields are created with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved from a referenced entity or DTO.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search field is generated with the &amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; keyword. Search fields must be located inside a search panel. They provide wildcard support for search actions. A search field can be given an i18n key and a string with CSS styles. The property of the datatype that is searched must be specified.&lt;br /&gt;
&lt;br /&gt;
The datatype that is searched is defined in the &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; around the search field. A search panel can be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles. In curly braces, the datatype that shall be searched can be specified, and search fields for various properties of this datatype (nested properties are supported), databinding instructions and visibility processor directives may be defined. After the closing braces, an alignment may be specified. More about search is covered in section &amp;quot;search&amp;quot; below.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
searchPanel [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [searchfield [( [i18n &amp;lt;i18nKey&amp;gt;] &lt;br /&gt;
                [styles &amp;lt;stylesString&amp;gt;] )] &amp;lt;property&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    searchPanel SearchPanel {&lt;br /&gt;
        type net.osbee.sample.dtos.CurrencyDto&lt;br /&gt;
        searchfield abbrivation&lt;br /&gt;
        searchfield fullname&lt;br /&gt;
    } align top-fill&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, two search panels are created with the &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; keyword. They may be given a datatype to be searched. The single properties in which can be searched are specified in search fields.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
A table is generated with the table keyword. Tables can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a table may be given a datatype (e.g. a DTO) that can be set with the type keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If images are to be displayed in the table, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set.&lt;br /&gt;
&lt;br /&gt;
The values that are to be displayed can be fed into the table by databinding (see section &amp;quot;databinding&amp;quot; below). The columns displayed and their order are determined by the column keywords in the columns section of the table. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified. Columns are enumerated within the columns environment. For each column, the content has to be specified. This can be done by specifying a property of the datatype contained within the table. These properties may be nested.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
table [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [columns {&lt;br /&gt;
        [column &amp;lt;content&amp;gt;] [icon &amp;lt;iconString&amp;gt;]&lt;br /&gt;
    }]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
table DataTable {&lt;br /&gt;
    useBeanService&lt;br /&gt;
    type net.osbee.sample.foodmart.dtos.general.VegetableDto&lt;br /&gt;
&lt;br /&gt;
    columns {&lt;br /&gt;
        column category&lt;br /&gt;
        column weight&lt;br /&gt;
        column color&lt;br /&gt;
        column origin&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    bind tableRefresh --&amp;gt; [this].refresh&lt;br /&gt;
} align fill-fill&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a table is created with the &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; keyword. A BeanService is used, and a datatype is assigned to the table. Columns and their order are specified in the columns section.&lt;br /&gt;
The values are entered into the table by databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
A text area is generated with the &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt; keyword. Text areas can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
textarea [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textarea MyText&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a text area is created with the &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A text feld is generated with the &amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt; keyword. Textfields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following &amp;quot;datatype validators&amp;quot; may be defined in the parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;maxLength&amp;lt;/code&amp;gt; - creates a maximum-length validator for this field&lt;br /&gt;
(integer)&lt;br /&gt;
* &amp;lt;code&amp;gt;minLength&amp;lt;/code&amp;gt; - creates a minimum-length validator for this field&lt;br /&gt;
(integer)&lt;br /&gt;
* &amp;lt;code&amp;gt;regex&amp;lt;/code&amp;gt; - creates a regular expression validator for this field (String)&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions, and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
textfield [( [maxLength=&amp;lt;maxLength&amp;gt;]&lt;br /&gt;
             [minLength=&amp;lt;minLength&amp;gt;]&lt;br /&gt;
             [regex=&amp;lt;rexegString&amp;gt;]&lt;br /&gt;
             [i18n &amp;lt;i18nKey&amp;gt;]&lt;br /&gt;
             [styles &amp;lt;stylesString&amp;gt;]&lt;br /&gt;
             [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textfield (regex=&amp;quot;[A-Z]-[0-9]{4}&amp;quot;) TestText&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a textfield is created along with validators that check the input in the UI field for conformity to certain conditions. If the requirements are not met, an error mark will be displayed.&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a variety of elements that are optimised for display on mobile devices. Mobile UIs are described in &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; files similar to regular UI models. The main difference is that the top level element in a mobile UI is a &amp;quot;mobile view&amp;quot; (instead of an desktop view or &amp;quot;ideview&amp;quot;), created by the keyword &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Most of the UI elements that can be used in a desktop view (ideview) can be used inside a mobile view as well. In particular, these are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; - here they are called &amp;lt;code&amp;gt;mobileHorizontalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; - here called &amp;lt;code&amp;gt;mobileSearchPanel&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; - here called &amp;lt;code&amp;gt;mobileTab&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; - here called &amp;lt;code&amp;gt;mobileVerticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If these model elements are used in a mobile environment, they will be rendered by the appropriate UI elements for Vaadin mobile UIs.&lt;br /&gt;
&lt;br /&gt;
====Mobile-only Elements====&lt;br /&gt;
&lt;br /&gt;
In addition to the mobile version of &amp;quot;desktop&amp;quot; UI elements, currently there is one additional UI element that can only be used in mobile UIs:&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;switchIt&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A toggle switch for use in mobile UIs is generated with the &amp;lt;code&amp;gt;switchIt&amp;lt;/code&amp;gt; keyword. Switches serve the same purpose in mobile UIs that checkboxes do for desktop UIs. A switch can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
switchIt [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
mobile Sample {&lt;br /&gt;
    verticalGroup Options {&lt;br /&gt;
        switchIt Active&lt;br /&gt;
    } align fill-fill&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a &amp;quot;sliding style&amp;quot; switch is created with the &amp;lt;code&amp;gt;switchIt&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2876</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2876"/>
				<updated>2017-10-26T16:31:26Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* Mobile UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [( [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a wide range of &amp;quot;simple&amp;quot; UI elements.  This section documents these elements along with their appropriate options.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A push button is generated with the &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; keyword. Buttons can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag and an alignment specification.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
button [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        button clickMe align top-right&lt;br /&gt;
        button (readonly) doNotClickMePlease&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two buttons with the lower one set to read-only (disabled).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A checkbox is generated with the checkbox keyword. Checkboxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
checkbox [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        checkbox clickMe&lt;br /&gt;
        checkbox (readonly) doNotClick&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two checkboxes, with the second one disabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An combo box is generated with the combo keyword. Combo boxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the type keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the options group, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions, and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
combo [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        combo Combo {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Combo].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, combo boxes are created with the &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt; keyword, shown as image icons with the given caption. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A datefield is generated with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword. Datefields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the following may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* date format - one of the following values can be used to define the date format for the field: &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;.&lt;br /&gt;
* date/time resolution - the smallest unit of time the datefield should consider. Can be set to &amp;lt;code&amp;gt;second&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minute&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt; (default).&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
datefield [( [&amp;lt;dateFormat&amp;gt;] [&amp;lt;dateResolution&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        datefield MyDate&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a date field is created with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword, the Vaadin UI provides a date picker along with the field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A decimal field contains floating point numbers and is generated with the &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt; keyword. Decimal fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following may be defined in parentheses between the keyword and the given name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
* &amp;lt;code&amp;gt;precision&amp;lt;/code&amp;gt; - this option controls the number of digits after the decimal point to be displayed (integer). Defaults to 2.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
decimalField [( [noGrouping] [noMarkNegative] [precision=&amp;lt;precision&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    form Person {&lt;br /&gt;
        decimalField (noGrouping precision=3) noGrp&lt;br /&gt;
        decimalField (precision=5) Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, decimal fields are created by the &amp;lt;code&amp;gt;decimaField&amp;lt;/code&amp;gt; keyword. Mechanisms for controlling the number grouping and for adding a CSS class for negative numbers are available. The desired precision can be set optionally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A label is generated with the &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; keyword. Labels can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
label [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] )] {&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        label MyLabel&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will show a label, the most basic UI element.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A list is generated with the &amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt; keyword. Lists can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a list may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specfied.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
listSelect [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    form ConvertibleForm_left {&lt;br /&gt;
        listSelect someType {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.SomeType&lt;br /&gt;
        }&lt;br /&gt;
        bind convertible.someType &amp;lt;--&amp;gt; [this.someType].selection&lt;br /&gt;
    } align top-left&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, options groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A numeric field contains integers and is generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Numeric fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following&lt;br /&gt;
may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
numericField [( [noGrouping] [noMarkNegative] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Main {&lt;br /&gt;
    form person {&lt;br /&gt;
        numericField (noGrouping) noGrp&lt;br /&gt;
        numericField Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, numeric fields are generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Among other features, there are options to control the number grouping and a CSS class for negative numbers.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An optionsgroup is generated with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. Optionsgroups can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the captionField keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imagefield&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
optionsgroup [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
        [type &amp;lt;type&amp;gt;]&lt;br /&gt;
        [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
        [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
        [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
        [useBeanService]&lt;br /&gt;
        [readonly]&lt;br /&gt;
        [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
        [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
        [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        optionsgroup Buttons {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Buttons].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, option groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A progress bar is generated with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword. Progress bars can receive a name, an i18n key and a string with CSS styles. The value that is displayed by the progressbar is a floating point number between 0 and 1. It can be determined by databinding (see section &amp;quot;databinding&amp;quot; below&amp;quot;). Validator assignments, databinding instructions, and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
progressbar [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        progressbar Bar&lt;br /&gt;
        decimalField (precision=2) ValueField&lt;br /&gt;
    }&lt;br /&gt;
    bind [ValueField].value --&amp;gt; [Bar].value&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a progress bar is created with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword, displaying a value between 0 (0%) and 1 (100%), and the value is retrieved via databinding from a &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A bean reference field is generated with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. Bean reference fields look like combo boxes. They are used to display values from collections (tables etc.) that are only referenced in the entity or DTO model. Bean reference fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a bean reference field accepts the source of the reference it is supposed to resolve and display after the &amp;lt;code&amp;gt;refSource&amp;lt;/code&amp;gt; keyword. Additionally, it may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the reference target datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, an in-memory bean provider service may be specified. Validator assignments, databinding instructions and visibility processor directives may be set. After the closing braces, an alignment may be defined.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
referenceField [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [refSource &amp;lt;type : field&amp;gt;]&lt;br /&gt;
    [captionField &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [inMemoryService &amp;lt;inMemoryBeanProvider&amp;gt;]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textfield description {&lt;br /&gt;
            MinLengthValidator(3)&lt;br /&gt;
            MaxLengthValidator(125)&lt;br /&gt;
        }&lt;br /&gt;
        checkbox(readonly) dirty&lt;br /&gt;
        referenceField weightUom {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.UnitOfMeasureDto&lt;br /&gt;
            captionField description&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.WeightDto:uom&lt;br /&gt;
        }&lt;br /&gt;
        referenceField priceCurrency {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.CurrencyDto&lt;br /&gt;
            captionField iso3code&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.PriceDto:currency&lt;br /&gt;
        }&lt;br /&gt;
        bind main.description &amp;lt;--&amp;gt; [this.description].value&lt;br /&gt;
        bind main.dirty --&amp;gt; [this.dirty].value&lt;br /&gt;
        bind main.weight.uom &amp;lt;--&amp;gt; [this.weightUom].value&lt;br /&gt;
        bind main.price.currency &amp;lt;--&amp;gt; [this.priceCurrency].value&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, Reference fields are created with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved from a referenced entity or DTO.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search field is generated with the &amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; keyword. Search fields must be located inside a search panel. They provide wildcard support for search actions. A search field can be given an i18n key and a string with CSS styles. The property of the datatype that is searched must be specified.&lt;br /&gt;
&lt;br /&gt;
The datatype that is searched is defined in the &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; around the search field. A search panel can be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles. In curly braces, the datatype that shall be searched can be specified, and search fields for various properties of this datatype (nested properties are supported), databinding instructions and visibility processor directives may be defined. After the closing braces, an alignment may be specified. More about search is covered in section &amp;quot;search&amp;quot; below.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
searchPanel [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [searchfield [( [i18n &amp;lt;i18nKey&amp;gt;] &lt;br /&gt;
                [styles &amp;lt;stylesString&amp;gt;] )] &amp;lt;property&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    searchPanel SearchPanel {&lt;br /&gt;
        type net.osbee.sample.dtos.CurrencyDto&lt;br /&gt;
        searchfield abbrivation&lt;br /&gt;
        searchfield fullname&lt;br /&gt;
    } align top-fill&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, two search panels are created with the &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; keyword. They may be given a datatype to be searched. The single properties in which can be searched are specified in search fields.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
A table is generated with the table keyword. Tables can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a table may be given a datatype (e.g. a DTO) that can be set with the type keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If images are to be displayed in the table, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set.&lt;br /&gt;
&lt;br /&gt;
The values that are to be displayed can be fed into the table by databinding (see section &amp;quot;databinding&amp;quot; below). The columns displayed and their order are determined by the column keywords in the columns section of the table. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified. Columns are enumerated within the columns environment. For each column, the content has to be specified. This can be done by specifying a property of the datatype contained within the table. These properties may be nested.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
table [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [columns {&lt;br /&gt;
        [column &amp;lt;content&amp;gt;] [icon &amp;lt;iconString&amp;gt;]&lt;br /&gt;
    }]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
table DataTable {&lt;br /&gt;
    useBeanService&lt;br /&gt;
    type net.osbee.sample.foodmart.dtos.general.VegetableDto&lt;br /&gt;
&lt;br /&gt;
    columns {&lt;br /&gt;
        column category&lt;br /&gt;
        column weight&lt;br /&gt;
        column color&lt;br /&gt;
        column origin&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    bind tableRefresh --&amp;gt; [this].refresh&lt;br /&gt;
} align fill-fill&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a table is created with the &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; keyword. A BeanService is used, and a datatype is assigned to the table. Columns and their order are specified in the columns section.&lt;br /&gt;
The values are entered into the table by databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
A text area is generated with the &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt; keyword. Text areas can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
textarea [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textarea MyText&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a text area is created with the &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A text feld is generated with the &amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt; keyword. Textfields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following &amp;quot;datatype validators&amp;quot; may be defined in the parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;maxLength&amp;lt;/code&amp;gt; - creates a maximum-length validator for this field&lt;br /&gt;
(integer)&lt;br /&gt;
* &amp;lt;code&amp;gt;minLength&amp;lt;/code&amp;gt; - creates a minimum-length validator for this field&lt;br /&gt;
(integer)&lt;br /&gt;
* &amp;lt;code&amp;gt;regex&amp;lt;/code&amp;gt; - creates a regular expression validator for this field (String)&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions, and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
textfield [( [maxLength=&amp;lt;maxLength&amp;gt;]&lt;br /&gt;
             [minLength=&amp;lt;minLength&amp;gt;]&lt;br /&gt;
             [regex=&amp;lt;rexegString&amp;gt;]&lt;br /&gt;
             [i18n &amp;lt;i18nKey&amp;gt;]&lt;br /&gt;
             [styles &amp;lt;stylesString&amp;gt;]&lt;br /&gt;
             [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textfield (regex=&amp;quot;[A-Z]-[0-9]{4}&amp;quot;) TestText&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a textfield is created along with validators that check the input in the UI field for conformity to certain conditions. If the requirements are not met, an error mark will be displayed.&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a variety of elements that are optimised for display on mobile devices. Mobile UIs are described in &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; files similar to regular UI models. The main difference is that the top level element in a mobile UI is a &amp;quot;mobile view&amp;quot; (instead of an desktop view or &amp;quot;ideview&amp;quot;), created by the keyword &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Most of the UI elements that can be used in a desktop view (ideview) can be used inside a mobile view as well. In particular, these are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; - here they are called &amp;lt;code&amp;gt;mobileHorizontalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; - here called &amp;lt;code&amp;gt;mobileSearchPanel&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; - here called &amp;lt;code&amp;gt;mobileTab&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; - here called &amp;lt;code&amp;gt;mobileVerticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If these model elements are used in a mobile environment, they will be rendered by the appropriate UI elements for Vaadin mobile UIs.&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2875</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2875"/>
				<updated>2017-10-26T16:27:36Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* textfield */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [( [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a wide range of &amp;quot;simple&amp;quot; UI elements.  This section documents these elements along with their appropriate options.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A push button is generated with the &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; keyword. Buttons can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag and an alignment specification.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
button [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        button clickMe align top-right&lt;br /&gt;
        button (readonly) doNotClickMePlease&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two buttons with the lower one set to read-only (disabled).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A checkbox is generated with the checkbox keyword. Checkboxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
checkbox [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        checkbox clickMe&lt;br /&gt;
        checkbox (readonly) doNotClick&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two checkboxes, with the second one disabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An combo box is generated with the combo keyword. Combo boxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the type keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the options group, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions, and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
combo [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        combo Combo {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Combo].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, combo boxes are created with the &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt; keyword, shown as image icons with the given caption. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A datefield is generated with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword. Datefields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the following may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* date format - one of the following values can be used to define the date format for the field: &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;.&lt;br /&gt;
* date/time resolution - the smallest unit of time the datefield should consider. Can be set to &amp;lt;code&amp;gt;second&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minute&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt; (default).&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
datefield [( [&amp;lt;dateFormat&amp;gt;] [&amp;lt;dateResolution&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        datefield MyDate&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a date field is created with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword, the Vaadin UI provides a date picker along with the field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A decimal field contains floating point numbers and is generated with the &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt; keyword. Decimal fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following may be defined in parentheses between the keyword and the given name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
* &amp;lt;code&amp;gt;precision&amp;lt;/code&amp;gt; - this option controls the number of digits after the decimal point to be displayed (integer). Defaults to 2.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
decimalField [( [noGrouping] [noMarkNegative] [precision=&amp;lt;precision&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    form Person {&lt;br /&gt;
        decimalField (noGrouping precision=3) noGrp&lt;br /&gt;
        decimalField (precision=5) Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, decimal fields are created by the &amp;lt;code&amp;gt;decimaField&amp;lt;/code&amp;gt; keyword. Mechanisms for controlling the number grouping and for adding a CSS class for negative numbers are available. The desired precision can be set optionally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A label is generated with the &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; keyword. Labels can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
label [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] )] {&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        label MyLabel&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will show a label, the most basic UI element.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A list is generated with the &amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt; keyword. Lists can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a list may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specfied.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
listSelect [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    form ConvertibleForm_left {&lt;br /&gt;
        listSelect someType {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.SomeType&lt;br /&gt;
        }&lt;br /&gt;
        bind convertible.someType &amp;lt;--&amp;gt; [this.someType].selection&lt;br /&gt;
    } align top-left&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, options groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A numeric field contains integers and is generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Numeric fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following&lt;br /&gt;
may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
numericField [( [noGrouping] [noMarkNegative] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Main {&lt;br /&gt;
    form person {&lt;br /&gt;
        numericField (noGrouping) noGrp&lt;br /&gt;
        numericField Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, numeric fields are generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Among other features, there are options to control the number grouping and a CSS class for negative numbers.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An optionsgroup is generated with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. Optionsgroups can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the captionField keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imagefield&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
optionsgroup [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
        [type &amp;lt;type&amp;gt;]&lt;br /&gt;
        [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
        [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
        [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
        [useBeanService]&lt;br /&gt;
        [readonly]&lt;br /&gt;
        [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
        [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
        [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        optionsgroup Buttons {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Buttons].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, option groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A progress bar is generated with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword. Progress bars can receive a name, an i18n key and a string with CSS styles. The value that is displayed by the progressbar is a floating point number between 0 and 1. It can be determined by databinding (see section &amp;quot;databinding&amp;quot; below&amp;quot;). Validator assignments, databinding instructions, and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
progressbar [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        progressbar Bar&lt;br /&gt;
        decimalField (precision=2) ValueField&lt;br /&gt;
    }&lt;br /&gt;
    bind [ValueField].value --&amp;gt; [Bar].value&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a progress bar is created with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword, displaying a value between 0 (0%) and 1 (100%), and the value is retrieved via databinding from a &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A bean reference field is generated with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. Bean reference fields look like combo boxes. They are used to display values from collections (tables etc.) that are only referenced in the entity or DTO model. Bean reference fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a bean reference field accepts the source of the reference it is supposed to resolve and display after the &amp;lt;code&amp;gt;refSource&amp;lt;/code&amp;gt; keyword. Additionally, it may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the reference target datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, an in-memory bean provider service may be specified. Validator assignments, databinding instructions and visibility processor directives may be set. After the closing braces, an alignment may be defined.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
referenceField [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [refSource &amp;lt;type : field&amp;gt;]&lt;br /&gt;
    [captionField &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [inMemoryService &amp;lt;inMemoryBeanProvider&amp;gt;]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textfield description {&lt;br /&gt;
            MinLengthValidator(3)&lt;br /&gt;
            MaxLengthValidator(125)&lt;br /&gt;
        }&lt;br /&gt;
        checkbox(readonly) dirty&lt;br /&gt;
        referenceField weightUom {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.UnitOfMeasureDto&lt;br /&gt;
            captionField description&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.WeightDto:uom&lt;br /&gt;
        }&lt;br /&gt;
        referenceField priceCurrency {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.CurrencyDto&lt;br /&gt;
            captionField iso3code&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.PriceDto:currency&lt;br /&gt;
        }&lt;br /&gt;
        bind main.description &amp;lt;--&amp;gt; [this.description].value&lt;br /&gt;
        bind main.dirty --&amp;gt; [this.dirty].value&lt;br /&gt;
        bind main.weight.uom &amp;lt;--&amp;gt; [this.weightUom].value&lt;br /&gt;
        bind main.price.currency &amp;lt;--&amp;gt; [this.priceCurrency].value&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, Reference fields are created with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved from a referenced entity or DTO.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search field is generated with the &amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; keyword. Search fields must be located inside a search panel. They provide wildcard support for search actions. A search field can be given an i18n key and a string with CSS styles. The property of the datatype that is searched must be specified.&lt;br /&gt;
&lt;br /&gt;
The datatype that is searched is defined in the &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; around the search field. A search panel can be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles. In curly braces, the datatype that shall be searched can be specified, and search fields for various properties of this datatype (nested properties are supported), databinding instructions and visibility processor directives may be defined. After the closing braces, an alignment may be specified. More about search is covered in section &amp;quot;search&amp;quot; below.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
searchPanel [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [searchfield [( [i18n &amp;lt;i18nKey&amp;gt;] &lt;br /&gt;
                [styles &amp;lt;stylesString&amp;gt;] )] &amp;lt;property&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    searchPanel SearchPanel {&lt;br /&gt;
        type net.osbee.sample.dtos.CurrencyDto&lt;br /&gt;
        searchfield abbrivation&lt;br /&gt;
        searchfield fullname&lt;br /&gt;
    } align top-fill&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, two search panels are created with the &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; keyword. They may be given a datatype to be searched. The single properties in which can be searched are specified in search fields.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
A table is generated with the table keyword. Tables can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a table may be given a datatype (e.g. a DTO) that can be set with the type keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If images are to be displayed in the table, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set.&lt;br /&gt;
&lt;br /&gt;
The values that are to be displayed can be fed into the table by databinding (see section &amp;quot;databinding&amp;quot; below). The columns displayed and their order are determined by the column keywords in the columns section of the table. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified. Columns are enumerated within the columns environment. For each column, the content has to be specified. This can be done by specifying a property of the datatype contained within the table. These properties may be nested.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
table [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [columns {&lt;br /&gt;
        [column &amp;lt;content&amp;gt;] [icon &amp;lt;iconString&amp;gt;]&lt;br /&gt;
    }]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
table DataTable {&lt;br /&gt;
    useBeanService&lt;br /&gt;
    type net.osbee.sample.foodmart.dtos.general.VegetableDto&lt;br /&gt;
&lt;br /&gt;
    columns {&lt;br /&gt;
        column category&lt;br /&gt;
        column weight&lt;br /&gt;
        column color&lt;br /&gt;
        column origin&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    bind tableRefresh --&amp;gt; [this].refresh&lt;br /&gt;
} align fill-fill&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a table is created with the &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; keyword. A BeanService is used, and a datatype is assigned to the table. Columns and their order are specified in the columns section.&lt;br /&gt;
The values are entered into the table by databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
A text area is generated with the &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt; keyword. Text areas can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
textarea [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textarea MyText&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a text area is created with the &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A text feld is generated with the &amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt; keyword. Textfields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following &amp;quot;datatype validators&amp;quot; may be defined in the parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;maxLength&amp;lt;/code&amp;gt; - creates a maximum-length validator for this field&lt;br /&gt;
(integer)&lt;br /&gt;
* &amp;lt;code&amp;gt;minLength&amp;lt;/code&amp;gt; - creates a minimum-length validator for this field&lt;br /&gt;
(integer)&lt;br /&gt;
* &amp;lt;code&amp;gt;regex&amp;lt;/code&amp;gt; - creates a regular expression validator for this field (String)&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions, and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
textfield [( [maxLength=&amp;lt;maxLength&amp;gt;]&lt;br /&gt;
             [minLength=&amp;lt;minLength&amp;gt;]&lt;br /&gt;
             [regex=&amp;lt;rexegString&amp;gt;]&lt;br /&gt;
             [i18n &amp;lt;i18nKey&amp;gt;]&lt;br /&gt;
             [styles &amp;lt;stylesString&amp;gt;]&lt;br /&gt;
             [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textfield (regex=&amp;quot;[A-Z]-[0-9]{4}&amp;quot;) TestText&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a textfield is created along with validators that check the input in the UI field for conformity to certain conditions. If the requirements are not met, an error mark will be displayed.&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2874</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2874"/>
				<updated>2017-10-26T16:20:05Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* textarea */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [( [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a wide range of &amp;quot;simple&amp;quot; UI elements.  This section documents these elements along with their appropriate options.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A push button is generated with the &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; keyword. Buttons can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag and an alignment specification.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
button [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        button clickMe align top-right&lt;br /&gt;
        button (readonly) doNotClickMePlease&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two buttons with the lower one set to read-only (disabled).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A checkbox is generated with the checkbox keyword. Checkboxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
checkbox [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        checkbox clickMe&lt;br /&gt;
        checkbox (readonly) doNotClick&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two checkboxes, with the second one disabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An combo box is generated with the combo keyword. Combo boxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the type keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the options group, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions, and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
combo [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        combo Combo {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Combo].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, combo boxes are created with the &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt; keyword, shown as image icons with the given caption. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A datefield is generated with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword. Datefields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the following may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* date format - one of the following values can be used to define the date format for the field: &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;.&lt;br /&gt;
* date/time resolution - the smallest unit of time the datefield should consider. Can be set to &amp;lt;code&amp;gt;second&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minute&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt; (default).&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
datefield [( [&amp;lt;dateFormat&amp;gt;] [&amp;lt;dateResolution&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        datefield MyDate&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a date field is created with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword, the Vaadin UI provides a date picker along with the field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A decimal field contains floating point numbers and is generated with the &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt; keyword. Decimal fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following may be defined in parentheses between the keyword and the given name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
* &amp;lt;code&amp;gt;precision&amp;lt;/code&amp;gt; - this option controls the number of digits after the decimal point to be displayed (integer). Defaults to 2.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
decimalField [( [noGrouping] [noMarkNegative] [precision=&amp;lt;precision&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    form Person {&lt;br /&gt;
        decimalField (noGrouping precision=3) noGrp&lt;br /&gt;
        decimalField (precision=5) Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, decimal fields are created by the &amp;lt;code&amp;gt;decimaField&amp;lt;/code&amp;gt; keyword. Mechanisms for controlling the number grouping and for adding a CSS class for negative numbers are available. The desired precision can be set optionally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A label is generated with the &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; keyword. Labels can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
label [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] )] {&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        label MyLabel&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will show a label, the most basic UI element.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A list is generated with the &amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt; keyword. Lists can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a list may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specfied.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
listSelect [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    form ConvertibleForm_left {&lt;br /&gt;
        listSelect someType {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.SomeType&lt;br /&gt;
        }&lt;br /&gt;
        bind convertible.someType &amp;lt;--&amp;gt; [this.someType].selection&lt;br /&gt;
    } align top-left&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, options groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A numeric field contains integers and is generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Numeric fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following&lt;br /&gt;
may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
numericField [( [noGrouping] [noMarkNegative] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Main {&lt;br /&gt;
    form person {&lt;br /&gt;
        numericField (noGrouping) noGrp&lt;br /&gt;
        numericField Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, numeric fields are generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Among other features, there are options to control the number grouping and a CSS class for negative numbers.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An optionsgroup is generated with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. Optionsgroups can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the captionField keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imagefield&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
optionsgroup [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
        [type &amp;lt;type&amp;gt;]&lt;br /&gt;
        [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
        [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
        [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
        [useBeanService]&lt;br /&gt;
        [readonly]&lt;br /&gt;
        [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
        [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
        [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        optionsgroup Buttons {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Buttons].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, option groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A progress bar is generated with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword. Progress bars can receive a name, an i18n key and a string with CSS styles. The value that is displayed by the progressbar is a floating point number between 0 and 1. It can be determined by databinding (see section &amp;quot;databinding&amp;quot; below&amp;quot;). Validator assignments, databinding instructions, and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
progressbar [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        progressbar Bar&lt;br /&gt;
        decimalField (precision=2) ValueField&lt;br /&gt;
    }&lt;br /&gt;
    bind [ValueField].value --&amp;gt; [Bar].value&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a progress bar is created with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword, displaying a value between 0 (0%) and 1 (100%), and the value is retrieved via databinding from a &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A bean reference field is generated with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. Bean reference fields look like combo boxes. They are used to display values from collections (tables etc.) that are only referenced in the entity or DTO model. Bean reference fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a bean reference field accepts the source of the reference it is supposed to resolve and display after the &amp;lt;code&amp;gt;refSource&amp;lt;/code&amp;gt; keyword. Additionally, it may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the reference target datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, an in-memory bean provider service may be specified. Validator assignments, databinding instructions and visibility processor directives may be set. After the closing braces, an alignment may be defined.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
referenceField [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [refSource &amp;lt;type : field&amp;gt;]&lt;br /&gt;
    [captionField &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [inMemoryService &amp;lt;inMemoryBeanProvider&amp;gt;]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textfield description {&lt;br /&gt;
            MinLengthValidator(3)&lt;br /&gt;
            MaxLengthValidator(125)&lt;br /&gt;
        }&lt;br /&gt;
        checkbox(readonly) dirty&lt;br /&gt;
        referenceField weightUom {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.UnitOfMeasureDto&lt;br /&gt;
            captionField description&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.WeightDto:uom&lt;br /&gt;
        }&lt;br /&gt;
        referenceField priceCurrency {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.CurrencyDto&lt;br /&gt;
            captionField iso3code&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.PriceDto:currency&lt;br /&gt;
        }&lt;br /&gt;
        bind main.description &amp;lt;--&amp;gt; [this.description].value&lt;br /&gt;
        bind main.dirty --&amp;gt; [this.dirty].value&lt;br /&gt;
        bind main.weight.uom &amp;lt;--&amp;gt; [this.weightUom].value&lt;br /&gt;
        bind main.price.currency &amp;lt;--&amp;gt; [this.priceCurrency].value&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, Reference fields are created with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved from a referenced entity or DTO.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search field is generated with the &amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; keyword. Search fields must be located inside a search panel. They provide wildcard support for search actions. A search field can be given an i18n key and a string with CSS styles. The property of the datatype that is searched must be specified.&lt;br /&gt;
&lt;br /&gt;
The datatype that is searched is defined in the &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; around the search field. A search panel can be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles. In curly braces, the datatype that shall be searched can be specified, and search fields for various properties of this datatype (nested properties are supported), databinding instructions and visibility processor directives may be defined. After the closing braces, an alignment may be specified. More about search is covered in section &amp;quot;search&amp;quot; below.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
searchPanel [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [searchfield [( [i18n &amp;lt;i18nKey&amp;gt;] &lt;br /&gt;
                [styles &amp;lt;stylesString&amp;gt;] )] &amp;lt;property&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    searchPanel SearchPanel {&lt;br /&gt;
        type net.osbee.sample.dtos.CurrencyDto&lt;br /&gt;
        searchfield abbrivation&lt;br /&gt;
        searchfield fullname&lt;br /&gt;
    } align top-fill&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, two search panels are created with the &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; keyword. They may be given a datatype to be searched. The single properties in which can be searched are specified in search fields.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
A table is generated with the table keyword. Tables can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a table may be given a datatype (e.g. a DTO) that can be set with the type keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If images are to be displayed in the table, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set.&lt;br /&gt;
&lt;br /&gt;
The values that are to be displayed can be fed into the table by databinding (see section &amp;quot;databinding&amp;quot; below). The columns displayed and their order are determined by the column keywords in the columns section of the table. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified. Columns are enumerated within the columns environment. For each column, the content has to be specified. This can be done by specifying a property of the datatype contained within the table. These properties may be nested.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
table [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [columns {&lt;br /&gt;
        [column &amp;lt;content&amp;gt;] [icon &amp;lt;iconString&amp;gt;]&lt;br /&gt;
    }]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
table DataTable {&lt;br /&gt;
    useBeanService&lt;br /&gt;
    type net.osbee.sample.foodmart.dtos.general.VegetableDto&lt;br /&gt;
&lt;br /&gt;
    columns {&lt;br /&gt;
        column category&lt;br /&gt;
        column weight&lt;br /&gt;
        column color&lt;br /&gt;
        column origin&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    bind tableRefresh --&amp;gt; [this].refresh&lt;br /&gt;
} align fill-fill&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a table is created with the &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; keyword. A BeanService is used, and a datatype is assigned to the table. Columns and their order are specified in the columns section.&lt;br /&gt;
The values are entered into the table by databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
A text area is generated with the &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt; keyword. Text areas can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
textarea [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textarea MyText&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a text area is created with the &amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2873</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2873"/>
				<updated>2017-10-26T16:16:10Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* table */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [( [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a wide range of &amp;quot;simple&amp;quot; UI elements.  This section documents these elements along with their appropriate options.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A push button is generated with the &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; keyword. Buttons can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag and an alignment specification.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
button [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        button clickMe align top-right&lt;br /&gt;
        button (readonly) doNotClickMePlease&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two buttons with the lower one set to read-only (disabled).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A checkbox is generated with the checkbox keyword. Checkboxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
checkbox [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        checkbox clickMe&lt;br /&gt;
        checkbox (readonly) doNotClick&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two checkboxes, with the second one disabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An combo box is generated with the combo keyword. Combo boxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the type keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the options group, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions, and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
combo [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        combo Combo {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Combo].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, combo boxes are created with the &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt; keyword, shown as image icons with the given caption. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A datefield is generated with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword. Datefields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the following may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* date format - one of the following values can be used to define the date format for the field: &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;.&lt;br /&gt;
* date/time resolution - the smallest unit of time the datefield should consider. Can be set to &amp;lt;code&amp;gt;second&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minute&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt; (default).&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
datefield [( [&amp;lt;dateFormat&amp;gt;] [&amp;lt;dateResolution&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        datefield MyDate&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a date field is created with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword, the Vaadin UI provides a date picker along with the field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A decimal field contains floating point numbers and is generated with the &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt; keyword. Decimal fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following may be defined in parentheses between the keyword and the given name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
* &amp;lt;code&amp;gt;precision&amp;lt;/code&amp;gt; - this option controls the number of digits after the decimal point to be displayed (integer). Defaults to 2.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
decimalField [( [noGrouping] [noMarkNegative] [precision=&amp;lt;precision&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    form Person {&lt;br /&gt;
        decimalField (noGrouping precision=3) noGrp&lt;br /&gt;
        decimalField (precision=5) Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, decimal fields are created by the &amp;lt;code&amp;gt;decimaField&amp;lt;/code&amp;gt; keyword. Mechanisms for controlling the number grouping and for adding a CSS class for negative numbers are available. The desired precision can be set optionally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A label is generated with the &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; keyword. Labels can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
label [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] )] {&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        label MyLabel&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will show a label, the most basic UI element.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A list is generated with the &amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt; keyword. Lists can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a list may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specfied.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
listSelect [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    form ConvertibleForm_left {&lt;br /&gt;
        listSelect someType {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.SomeType&lt;br /&gt;
        }&lt;br /&gt;
        bind convertible.someType &amp;lt;--&amp;gt; [this.someType].selection&lt;br /&gt;
    } align top-left&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, options groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A numeric field contains integers and is generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Numeric fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following&lt;br /&gt;
may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
numericField [( [noGrouping] [noMarkNegative] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Main {&lt;br /&gt;
    form person {&lt;br /&gt;
        numericField (noGrouping) noGrp&lt;br /&gt;
        numericField Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, numeric fields are generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Among other features, there are options to control the number grouping and a CSS class for negative numbers.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An optionsgroup is generated with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. Optionsgroups can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the captionField keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imagefield&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
optionsgroup [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
        [type &amp;lt;type&amp;gt;]&lt;br /&gt;
        [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
        [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
        [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
        [useBeanService]&lt;br /&gt;
        [readonly]&lt;br /&gt;
        [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
        [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
        [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        optionsgroup Buttons {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Buttons].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, option groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A progress bar is generated with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword. Progress bars can receive a name, an i18n key and a string with CSS styles. The value that is displayed by the progressbar is a floating point number between 0 and 1. It can be determined by databinding (see section &amp;quot;databinding&amp;quot; below&amp;quot;). Validator assignments, databinding instructions, and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
progressbar [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        progressbar Bar&lt;br /&gt;
        decimalField (precision=2) ValueField&lt;br /&gt;
    }&lt;br /&gt;
    bind [ValueField].value --&amp;gt; [Bar].value&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a progress bar is created with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword, displaying a value between 0 (0%) and 1 (100%), and the value is retrieved via databinding from a &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A bean reference field is generated with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. Bean reference fields look like combo boxes. They are used to display values from collections (tables etc.) that are only referenced in the entity or DTO model. Bean reference fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a bean reference field accepts the source of the reference it is supposed to resolve and display after the &amp;lt;code&amp;gt;refSource&amp;lt;/code&amp;gt; keyword. Additionally, it may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the reference target datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, an in-memory bean provider service may be specified. Validator assignments, databinding instructions and visibility processor directives may be set. After the closing braces, an alignment may be defined.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
referenceField [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [refSource &amp;lt;type : field&amp;gt;]&lt;br /&gt;
    [captionField &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [inMemoryService &amp;lt;inMemoryBeanProvider&amp;gt;]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textfield description {&lt;br /&gt;
            MinLengthValidator(3)&lt;br /&gt;
            MaxLengthValidator(125)&lt;br /&gt;
        }&lt;br /&gt;
        checkbox(readonly) dirty&lt;br /&gt;
        referenceField weightUom {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.UnitOfMeasureDto&lt;br /&gt;
            captionField description&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.WeightDto:uom&lt;br /&gt;
        }&lt;br /&gt;
        referenceField priceCurrency {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.CurrencyDto&lt;br /&gt;
            captionField iso3code&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.PriceDto:currency&lt;br /&gt;
        }&lt;br /&gt;
        bind main.description &amp;lt;--&amp;gt; [this.description].value&lt;br /&gt;
        bind main.dirty --&amp;gt; [this.dirty].value&lt;br /&gt;
        bind main.weight.uom &amp;lt;--&amp;gt; [this.weightUom].value&lt;br /&gt;
        bind main.price.currency &amp;lt;--&amp;gt; [this.priceCurrency].value&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, Reference fields are created with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved from a referenced entity or DTO.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search field is generated with the &amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; keyword. Search fields must be located inside a search panel. They provide wildcard support for search actions. A search field can be given an i18n key and a string with CSS styles. The property of the datatype that is searched must be specified.&lt;br /&gt;
&lt;br /&gt;
The datatype that is searched is defined in the &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; around the search field. A search panel can be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles. In curly braces, the datatype that shall be searched can be specified, and search fields for various properties of this datatype (nested properties are supported), databinding instructions and visibility processor directives may be defined. After the closing braces, an alignment may be specified. More about search is covered in section &amp;quot;search&amp;quot; below.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
searchPanel [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [searchfield [( [i18n &amp;lt;i18nKey&amp;gt;] &lt;br /&gt;
                [styles &amp;lt;stylesString&amp;gt;] )] &amp;lt;property&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    searchPanel SearchPanel {&lt;br /&gt;
        type net.osbee.sample.dtos.CurrencyDto&lt;br /&gt;
        searchfield abbrivation&lt;br /&gt;
        searchfield fullname&lt;br /&gt;
    } align top-fill&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, two search panels are created with the &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; keyword. They may be given a datatype to be searched. The single properties in which can be searched are specified in search fields.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
A table is generated with the table keyword. Tables can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a table may be given a datatype (e.g. a DTO) that can be set with the type keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If images are to be displayed in the table, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set.&lt;br /&gt;
&lt;br /&gt;
The values that are to be displayed can be fed into the table by databinding (see section &amp;quot;databinding&amp;quot; below). The columns displayed and their order are determined by the column keywords in the columns section of the table. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified. Columns are enumerated within the columns environment. For each column, the content has to be specified. This can be done by specifying a property of the datatype contained within the table. These properties may be nested.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
table [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [columns {&lt;br /&gt;
        [column &amp;lt;content&amp;gt;] [icon &amp;lt;iconString&amp;gt;]&lt;br /&gt;
    }]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
table DataTable {&lt;br /&gt;
    useBeanService&lt;br /&gt;
    type net.osbee.sample.foodmart.dtos.general.VegetableDto&lt;br /&gt;
&lt;br /&gt;
    columns {&lt;br /&gt;
        column category&lt;br /&gt;
        column weight&lt;br /&gt;
        column color&lt;br /&gt;
        column origin&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    bind tableRefresh --&amp;gt; [this].refresh&lt;br /&gt;
} align fill-fill&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a table is created with the &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; keyword. A BeanService is used, and a datatype is assigned to the table. Columns and their order are specified in the columns section.&lt;br /&gt;
The values are entered into the table by databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2872</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2872"/>
				<updated>2017-10-26T15:29:43Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* searchfield and searchPanel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [( [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a wide range of &amp;quot;simple&amp;quot; UI elements.  This section documents these elements along with their appropriate options.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A push button is generated with the &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; keyword. Buttons can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag and an alignment specification.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
button [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        button clickMe align top-right&lt;br /&gt;
        button (readonly) doNotClickMePlease&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two buttons with the lower one set to read-only (disabled).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A checkbox is generated with the checkbox keyword. Checkboxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
checkbox [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        checkbox clickMe&lt;br /&gt;
        checkbox (readonly) doNotClick&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two checkboxes, with the second one disabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An combo box is generated with the combo keyword. Combo boxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the type keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the options group, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions, and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
combo [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        combo Combo {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Combo].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, combo boxes are created with the &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt; keyword, shown as image icons with the given caption. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A datefield is generated with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword. Datefields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the following may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* date format - one of the following values can be used to define the date format for the field: &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;.&lt;br /&gt;
* date/time resolution - the smallest unit of time the datefield should consider. Can be set to &amp;lt;code&amp;gt;second&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minute&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt; (default).&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
datefield [( [&amp;lt;dateFormat&amp;gt;] [&amp;lt;dateResolution&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        datefield MyDate&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a date field is created with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword, the Vaadin UI provides a date picker along with the field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A decimal field contains floating point numbers and is generated with the &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt; keyword. Decimal fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following may be defined in parentheses between the keyword and the given name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
* &amp;lt;code&amp;gt;precision&amp;lt;/code&amp;gt; - this option controls the number of digits after the decimal point to be displayed (integer). Defaults to 2.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
decimalField [( [noGrouping] [noMarkNegative] [precision=&amp;lt;precision&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    form Person {&lt;br /&gt;
        decimalField (noGrouping precision=3) noGrp&lt;br /&gt;
        decimalField (precision=5) Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, decimal fields are created by the &amp;lt;code&amp;gt;decimaField&amp;lt;/code&amp;gt; keyword. Mechanisms for controlling the number grouping and for adding a CSS class for negative numbers are available. The desired precision can be set optionally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A label is generated with the &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; keyword. Labels can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
label [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] )] {&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        label MyLabel&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will show a label, the most basic UI element.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A list is generated with the &amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt; keyword. Lists can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a list may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specfied.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
listSelect [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    form ConvertibleForm_left {&lt;br /&gt;
        listSelect someType {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.SomeType&lt;br /&gt;
        }&lt;br /&gt;
        bind convertible.someType &amp;lt;--&amp;gt; [this.someType].selection&lt;br /&gt;
    } align top-left&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, options groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A numeric field contains integers and is generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Numeric fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following&lt;br /&gt;
may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
numericField [( [noGrouping] [noMarkNegative] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Main {&lt;br /&gt;
    form person {&lt;br /&gt;
        numericField (noGrouping) noGrp&lt;br /&gt;
        numericField Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, numeric fields are generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Among other features, there are options to control the number grouping and a CSS class for negative numbers.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An optionsgroup is generated with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. Optionsgroups can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the captionField keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imagefield&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
optionsgroup [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
        [type &amp;lt;type&amp;gt;]&lt;br /&gt;
        [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
        [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
        [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
        [useBeanService]&lt;br /&gt;
        [readonly]&lt;br /&gt;
        [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
        [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
        [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        optionsgroup Buttons {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Buttons].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, option groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A progress bar is generated with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword. Progress bars can receive a name, an i18n key and a string with CSS styles. The value that is displayed by the progressbar is a floating point number between 0 and 1. It can be determined by databinding (see section &amp;quot;databinding&amp;quot; below&amp;quot;). Validator assignments, databinding instructions, and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
progressbar [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        progressbar Bar&lt;br /&gt;
        decimalField (precision=2) ValueField&lt;br /&gt;
    }&lt;br /&gt;
    bind [ValueField].value --&amp;gt; [Bar].value&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a progress bar is created with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword, displaying a value between 0 (0%) and 1 (100%), and the value is retrieved via databinding from a &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A bean reference field is generated with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. Bean reference fields look like combo boxes. They are used to display values from collections (tables etc.) that are only referenced in the entity or DTO model. Bean reference fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a bean reference field accepts the source of the reference it is supposed to resolve and display after the &amp;lt;code&amp;gt;refSource&amp;lt;/code&amp;gt; keyword. Additionally, it may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the reference target datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, an in-memory bean provider service may be specified. Validator assignments, databinding instructions and visibility processor directives may be set. After the closing braces, an alignment may be defined.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
referenceField [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [refSource &amp;lt;type : field&amp;gt;]&lt;br /&gt;
    [captionField &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [inMemoryService &amp;lt;inMemoryBeanProvider&amp;gt;]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textfield description {&lt;br /&gt;
            MinLengthValidator(3)&lt;br /&gt;
            MaxLengthValidator(125)&lt;br /&gt;
        }&lt;br /&gt;
        checkbox(readonly) dirty&lt;br /&gt;
        referenceField weightUom {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.UnitOfMeasureDto&lt;br /&gt;
            captionField description&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.WeightDto:uom&lt;br /&gt;
        }&lt;br /&gt;
        referenceField priceCurrency {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.CurrencyDto&lt;br /&gt;
            captionField iso3code&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.PriceDto:currency&lt;br /&gt;
        }&lt;br /&gt;
        bind main.description &amp;lt;--&amp;gt; [this.description].value&lt;br /&gt;
        bind main.dirty --&amp;gt; [this.dirty].value&lt;br /&gt;
        bind main.weight.uom &amp;lt;--&amp;gt; [this.weightUom].value&lt;br /&gt;
        bind main.price.currency &amp;lt;--&amp;gt; [this.priceCurrency].value&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, Reference fields are created with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved from a referenced entity or DTO.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search field is generated with the &amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; keyword. Search fields must be located inside a search panel. They provide wildcard support for search actions. A search field can be given an i18n key and a string with CSS styles. The property of the datatype that is searched must be specified.&lt;br /&gt;
&lt;br /&gt;
The datatype that is searched is defined in the &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; around the search field. A search panel can be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles. In curly braces, the datatype that shall be searched can be specified, and search fields for various properties of this datatype (nested properties are supported), databinding instructions and visibility processor directives may be defined. After the closing braces, an alignment may be specified. More about search is covered in section &amp;quot;search&amp;quot; below.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
searchPanel [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [searchfield [( [i18n &amp;lt;i18nKey&amp;gt;] &lt;br /&gt;
                [styles &amp;lt;stylesString&amp;gt;] )] &amp;lt;property&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    searchPanel SearchPanel {&lt;br /&gt;
        type net.osbee.sample.dtos.CurrencyDto&lt;br /&gt;
        searchfield abbrivation&lt;br /&gt;
        searchfield fullname&lt;br /&gt;
    } align top-fill&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, two search panels are created with the &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt; keyword. They may be given a datatype to be searched. The single properties in which can be searched are specified in search fields.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2871</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2871"/>
				<updated>2017-10-26T14:43:37Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* optionsgroup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [( [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a wide range of &amp;quot;simple&amp;quot; UI elements.  This section documents these elements along with their appropriate options.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A push button is generated with the &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; keyword. Buttons can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag and an alignment specification.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
button [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        button clickMe align top-right&lt;br /&gt;
        button (readonly) doNotClickMePlease&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two buttons with the lower one set to read-only (disabled).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A checkbox is generated with the checkbox keyword. Checkboxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
checkbox [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        checkbox clickMe&lt;br /&gt;
        checkbox (readonly) doNotClick&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two checkboxes, with the second one disabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An combo box is generated with the combo keyword. Combo boxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the type keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the options group, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions, and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
combo [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        combo Combo {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Combo].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, combo boxes are created with the &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt; keyword, shown as image icons with the given caption. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A datefield is generated with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword. Datefields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the following may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* date format - one of the following values can be used to define the date format for the field: &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;.&lt;br /&gt;
* date/time resolution - the smallest unit of time the datefield should consider. Can be set to &amp;lt;code&amp;gt;second&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minute&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt; (default).&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
datefield [( [&amp;lt;dateFormat&amp;gt;] [&amp;lt;dateResolution&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        datefield MyDate&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a date field is created with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword, the Vaadin UI provides a date picker along with the field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A decimal field contains floating point numbers and is generated with the &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt; keyword. Decimal fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following may be defined in parentheses between the keyword and the given name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
* &amp;lt;code&amp;gt;precision&amp;lt;/code&amp;gt; - this option controls the number of digits after the decimal point to be displayed (integer). Defaults to 2.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
decimalField [( [noGrouping] [noMarkNegative] [precision=&amp;lt;precision&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    form Person {&lt;br /&gt;
        decimalField (noGrouping precision=3) noGrp&lt;br /&gt;
        decimalField (precision=5) Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, decimal fields are created by the &amp;lt;code&amp;gt;decimaField&amp;lt;/code&amp;gt; keyword. Mechanisms for controlling the number grouping and for adding a CSS class for negative numbers are available. The desired precision can be set optionally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A label is generated with the &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; keyword. Labels can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
label [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] )] {&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        label MyLabel&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will show a label, the most basic UI element.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A list is generated with the &amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt; keyword. Lists can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a list may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specfied.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
listSelect [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    form ConvertibleForm_left {&lt;br /&gt;
        listSelect someType {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.SomeType&lt;br /&gt;
        }&lt;br /&gt;
        bind convertible.someType &amp;lt;--&amp;gt; [this.someType].selection&lt;br /&gt;
    } align top-left&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, options groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A numeric field contains integers and is generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Numeric fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following&lt;br /&gt;
may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
numericField [( [noGrouping] [noMarkNegative] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Main {&lt;br /&gt;
    form person {&lt;br /&gt;
        numericField (noGrouping) noGrp&lt;br /&gt;
        numericField Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, numeric fields are generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Among other features, there are options to control the number grouping and a CSS class for negative numbers.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An optionsgroup is generated with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. Optionsgroups can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the captionField keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imagefield&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
optionsgroup [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
        [type &amp;lt;type&amp;gt;]&lt;br /&gt;
        [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
        [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
        [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
        [useBeanService]&lt;br /&gt;
        [readonly]&lt;br /&gt;
        [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
        [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
        [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        optionsgroup Buttons {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Buttons].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, option groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A progress bar is generated with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword. Progress bars can receive a name, an i18n key and a string with CSS styles. The value that is displayed by the progressbar is a floating point number between 0 and 1. It can be determined by databinding (see section &amp;quot;databinding&amp;quot; below&amp;quot;). Validator assignments, databinding instructions, and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
progressbar [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        progressbar Bar&lt;br /&gt;
        decimalField (precision=2) ValueField&lt;br /&gt;
    }&lt;br /&gt;
    bind [ValueField].value --&amp;gt; [Bar].value&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a progress bar is created with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword, displaying a value between 0 (0%) and 1 (100%), and the value is retrieved via databinding from a &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A bean reference field is generated with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. Bean reference fields look like combo boxes. They are used to display values from collections (tables etc.) that are only referenced in the entity or DTO model. Bean reference fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a bean reference field accepts the source of the reference it is supposed to resolve and display after the &amp;lt;code&amp;gt;refSource&amp;lt;/code&amp;gt; keyword. Additionally, it may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the reference target datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, an in-memory bean provider service may be specified. Validator assignments, databinding instructions and visibility processor directives may be set. After the closing braces, an alignment may be defined.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
referenceField [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [refSource &amp;lt;type : field&amp;gt;]&lt;br /&gt;
    [captionField &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [inMemoryService &amp;lt;inMemoryBeanProvider&amp;gt;]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textfield description {&lt;br /&gt;
            MinLengthValidator(3)&lt;br /&gt;
            MaxLengthValidator(125)&lt;br /&gt;
        }&lt;br /&gt;
        checkbox(readonly) dirty&lt;br /&gt;
        referenceField weightUom {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.UnitOfMeasureDto&lt;br /&gt;
            captionField description&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.WeightDto:uom&lt;br /&gt;
        }&lt;br /&gt;
        referenceField priceCurrency {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.CurrencyDto&lt;br /&gt;
            captionField iso3code&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.PriceDto:currency&lt;br /&gt;
        }&lt;br /&gt;
        bind main.description &amp;lt;--&amp;gt; [this.description].value&lt;br /&gt;
        bind main.dirty --&amp;gt; [this.dirty].value&lt;br /&gt;
        bind main.weight.uom &amp;lt;--&amp;gt; [this.weightUom].value&lt;br /&gt;
        bind main.price.currency &amp;lt;--&amp;gt; [this.priceCurrency].value&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, Reference fields are created with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved from a referenced entity or DTO.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2870</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2870"/>
				<updated>2017-10-26T14:40:10Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* referenceField */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [( [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a wide range of &amp;quot;simple&amp;quot; UI elements.  This section documents these elements along with their appropriate options.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A push button is generated with the &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; keyword. Buttons can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag and an alignment specification.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
button [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        button clickMe align top-right&lt;br /&gt;
        button (readonly) doNotClickMePlease&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two buttons with the lower one set to read-only (disabled).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A checkbox is generated with the checkbox keyword. Checkboxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
checkbox [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        checkbox clickMe&lt;br /&gt;
        checkbox (readonly) doNotClick&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two checkboxes, with the second one disabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An combo box is generated with the combo keyword. Combo boxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the type keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the options group, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions, and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
combo [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        combo Combo {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Combo].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, combo boxes are created with the &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt; keyword, shown as image icons with the given caption. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A datefield is generated with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword. Datefields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the following may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* date format - one of the following values can be used to define the date format for the field: &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;.&lt;br /&gt;
* date/time resolution - the smallest unit of time the datefield should consider. Can be set to &amp;lt;code&amp;gt;second&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minute&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt; (default).&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
datefield [( [&amp;lt;dateFormat&amp;gt;] [&amp;lt;dateResolution&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        datefield MyDate&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a date field is created with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword, the Vaadin UI provides a date picker along with the field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A decimal field contains floating point numbers and is generated with the &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt; keyword. Decimal fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following may be defined in parentheses between the keyword and the given name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
* &amp;lt;code&amp;gt;precision&amp;lt;/code&amp;gt; - this option controls the number of digits after the decimal point to be displayed (integer). Defaults to 2.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
decimalField [( [noGrouping] [noMarkNegative] [precision=&amp;lt;precision&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    form Person {&lt;br /&gt;
        decimalField (noGrouping precision=3) noGrp&lt;br /&gt;
        decimalField (precision=5) Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, decimal fields are created by the &amp;lt;code&amp;gt;decimaField&amp;lt;/code&amp;gt; keyword. Mechanisms for controlling the number grouping and for adding a CSS class for negative numbers are available. The desired precision can be set optionally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A label is generated with the &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; keyword. Labels can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
label [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] )] {&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        label MyLabel&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will show a label, the most basic UI element.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A list is generated with the &amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt; keyword. Lists can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a list may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specfied.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
listSelect [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    form ConvertibleForm_left {&lt;br /&gt;
        listSelect someType {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.SomeType&lt;br /&gt;
        }&lt;br /&gt;
        bind convertible.someType &amp;lt;--&amp;gt; [this.someType].selection&lt;br /&gt;
    } align top-left&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, options groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A numeric field contains integers and is generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Numeric fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following&lt;br /&gt;
may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
numericField [( [noGrouping] [noMarkNegative] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Main {&lt;br /&gt;
    form person {&lt;br /&gt;
        numericField (noGrouping) noGrp&lt;br /&gt;
        numericField Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, numeric fields are generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Among other features, there are options to control the number grouping and a CSS class for negative numbers.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An optionsgroup is generated with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. Optionsgroups can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the captionField keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imagefield&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
    optionsgroup [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
        [type &amp;lt;type&amp;gt;]&lt;br /&gt;
        [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
        [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
        [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
        [useBeanService]&lt;br /&gt;
        [readonly]&lt;br /&gt;
        [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
        [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
        [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        optionsgroup Buttons {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Buttons].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, option groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A progress bar is generated with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword. Progress bars can receive a name, an i18n key and a string with CSS styles. The value that is displayed by the progressbar is a floating point number between 0 and 1. It can be determined by databinding (see section &amp;quot;databinding&amp;quot; below&amp;quot;). Validator assignments, databinding instructions, and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
progressbar [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        progressbar Bar&lt;br /&gt;
        decimalField (precision=2) ValueField&lt;br /&gt;
    }&lt;br /&gt;
    bind [ValueField].value --&amp;gt; [Bar].value&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a progress bar is created with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword, displaying a value between 0 (0%) and 1 (100%), and the value is retrieved via databinding from a &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A bean reference field is generated with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. Bean reference fields look like combo boxes. They are used to display values from collections (tables etc.) that are only referenced in the entity or DTO model. Bean reference fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a bean reference field accepts the source of the reference it is supposed to resolve and display after the &amp;lt;code&amp;gt;refSource&amp;lt;/code&amp;gt; keyword. Additionally, it may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the reference target datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, an in-memory bean provider service may be specified. Validator assignments, databinding instructions and visibility processor directives may be set. After the closing braces, an alignment may be defined.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
referenceField [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [refSource &amp;lt;type : field&amp;gt;]&lt;br /&gt;
    [captionField &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [inMemoryService &amp;lt;inMemoryBeanProvider&amp;gt;]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        textfield description {&lt;br /&gt;
            MinLengthValidator(3)&lt;br /&gt;
            MaxLengthValidator(125)&lt;br /&gt;
        }&lt;br /&gt;
        checkbox(readonly) dirty&lt;br /&gt;
        referenceField weightUom {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.UnitOfMeasureDto&lt;br /&gt;
            captionField description&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.WeightDto:uom&lt;br /&gt;
        }&lt;br /&gt;
        referenceField priceCurrency {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.CurrencyDto&lt;br /&gt;
            captionField iso3code&lt;br /&gt;
            refSource net.osbee.sample.pos.dtos.general.PriceDto:currency&lt;br /&gt;
        }&lt;br /&gt;
        bind main.description &amp;lt;--&amp;gt; [this.description].value&lt;br /&gt;
        bind main.dirty --&amp;gt; [this.dirty].value&lt;br /&gt;
        bind main.weight.uom &amp;lt;--&amp;gt; [this.weightUom].value&lt;br /&gt;
        bind main.price.currency &amp;lt;--&amp;gt; [this.priceCurrency].value&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, Reference fields are created with the &amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved from a referenced entity or DTO.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2869</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2869"/>
				<updated>2017-10-26T13:57:16Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* progressbar */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [( [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a wide range of &amp;quot;simple&amp;quot; UI elements.  This section documents these elements along with their appropriate options.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A push button is generated with the &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; keyword. Buttons can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag and an alignment specification.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
button [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        button clickMe align top-right&lt;br /&gt;
        button (readonly) doNotClickMePlease&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two buttons with the lower one set to read-only (disabled).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A checkbox is generated with the checkbox keyword. Checkboxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
checkbox [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        checkbox clickMe&lt;br /&gt;
        checkbox (readonly) doNotClick&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two checkboxes, with the second one disabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An combo box is generated with the combo keyword. Combo boxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the type keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the options group, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions, and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
combo [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        combo Combo {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Combo].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, combo boxes are created with the &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt; keyword, shown as image icons with the given caption. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A datefield is generated with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword. Datefields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the following may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* date format - one of the following values can be used to define the date format for the field: &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;.&lt;br /&gt;
* date/time resolution - the smallest unit of time the datefield should consider. Can be set to &amp;lt;code&amp;gt;second&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minute&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt; (default).&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
datefield [( [&amp;lt;dateFormat&amp;gt;] [&amp;lt;dateResolution&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        datefield MyDate&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a date field is created with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword, the Vaadin UI provides a date picker along with the field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A decimal field contains floating point numbers and is generated with the &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt; keyword. Decimal fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following may be defined in parentheses between the keyword and the given name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
* &amp;lt;code&amp;gt;precision&amp;lt;/code&amp;gt; - this option controls the number of digits after the decimal point to be displayed (integer). Defaults to 2.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
decimalField [( [noGrouping] [noMarkNegative] [precision=&amp;lt;precision&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    form Person {&lt;br /&gt;
        decimalField (noGrouping precision=3) noGrp&lt;br /&gt;
        decimalField (precision=5) Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, decimal fields are created by the &amp;lt;code&amp;gt;decimaField&amp;lt;/code&amp;gt; keyword. Mechanisms for controlling the number grouping and for adding a CSS class for negative numbers are available. The desired precision can be set optionally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A label is generated with the &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; keyword. Labels can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
label [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] )] {&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        label MyLabel&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will show a label, the most basic UI element.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A list is generated with the &amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt; keyword. Lists can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a list may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specfied.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
listSelect [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    form ConvertibleForm_left {&lt;br /&gt;
        listSelect someType {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.SomeType&lt;br /&gt;
        }&lt;br /&gt;
        bind convertible.someType &amp;lt;--&amp;gt; [this.someType].selection&lt;br /&gt;
    } align top-left&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, options groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A numeric field contains integers and is generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Numeric fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following&lt;br /&gt;
may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
numericField [( [noGrouping] [noMarkNegative] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Main {&lt;br /&gt;
    form person {&lt;br /&gt;
        numericField (noGrouping) noGrp&lt;br /&gt;
        numericField Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, numeric fields are generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Among other features, there are options to control the number grouping and a CSS class for negative numbers.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An optionsgroup is generated with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. Optionsgroups can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the captionField keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imagefield&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
    optionsgroup [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
        [type &amp;lt;type&amp;gt;]&lt;br /&gt;
        [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
        [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
        [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
        [useBeanService]&lt;br /&gt;
        [readonly]&lt;br /&gt;
        [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
        [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
        [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        optionsgroup Buttons {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Buttons].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, option groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A progress bar is generated with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword. Progress bars can receive a name, an i18n key and a string with CSS styles. The value that is displayed by the progressbar is a floating point number between 0 and 1. It can be determined by databinding (see section &amp;quot;databinding&amp;quot; below&amp;quot;). Validator assignments, databinding instructions, and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
progressbar [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        progressbar Bar&lt;br /&gt;
        decimalField (precision=2) ValueField&lt;br /&gt;
    }&lt;br /&gt;
    bind [ValueField].value --&amp;gt; [Bar].value&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a progress bar is created with the &amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt; keyword, displaying a value between 0 (0%) and 1 (100%), and the value is retrieved via databinding from a &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2857</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2857"/>
				<updated>2017-10-26T11:52:59Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* optionsgroup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [( [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a wide range of &amp;quot;simple&amp;quot; UI elements.  This section documents these elements along with their appropriate options.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A push button is generated with the &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; keyword. Buttons can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag and an alignment specification.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
button [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        button clickMe align top-right&lt;br /&gt;
        button (readonly) doNotClickMePlease&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two buttons with the lower one set to read-only (disabled).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A checkbox is generated with the checkbox keyword. Checkboxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
checkbox [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        checkbox clickMe&lt;br /&gt;
        checkbox (readonly) doNotClick&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two checkboxes, with the second one disabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An combo box is generated with the combo keyword. Combo boxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the type keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the options group, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions, and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
combo [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        combo Combo {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Combo].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, combo boxes are created with the &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt; keyword, shown as image icons with the given caption. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A datefield is generated with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword. Datefields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the following may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* date format - one of the following values can be used to define the date format for the field: &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;.&lt;br /&gt;
* date/time resolution - the smallest unit of time the datefield should consider. Can be set to &amp;lt;code&amp;gt;second&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minute&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt; (default).&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
datefield [( [&amp;lt;dateFormat&amp;gt;] [&amp;lt;dateResolution&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        datefield MyDate&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a date field is created with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword, the Vaadin UI provides a date picker along with the field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A decimal field contains floating point numbers and is generated with the &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt; keyword. Decimal fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following may be defined in parentheses between the keyword and the given name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
* &amp;lt;code&amp;gt;precision&amp;lt;/code&amp;gt; - this option controls the number of digits after the decimal point to be displayed (integer). Defaults to 2.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
decimalField [( [noGrouping] [noMarkNegative] [precision=&amp;lt;precision&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    form Person {&lt;br /&gt;
        decimalField (noGrouping precision=3) noGrp&lt;br /&gt;
        decimalField (precision=5) Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, decimal fields are created by the &amp;lt;code&amp;gt;decimaField&amp;lt;/code&amp;gt; keyword. Mechanisms for controlling the number grouping and for adding a CSS class for negative numbers are available. The desired precision can be set optionally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A label is generated with the &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; keyword. Labels can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
label [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] )] {&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        label MyLabel&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will show a label, the most basic UI element.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A list is generated with the &amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt; keyword. Lists can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a list may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specfied.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
listSelect [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    form ConvertibleForm_left {&lt;br /&gt;
        listSelect someType {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.SomeType&lt;br /&gt;
        }&lt;br /&gt;
        bind convertible.someType &amp;lt;--&amp;gt; [this.someType].selection&lt;br /&gt;
    } align top-left&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, options groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A numeric field contains integers and is generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Numeric fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following&lt;br /&gt;
may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
numericField [( [noGrouping] [noMarkNegative] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Main {&lt;br /&gt;
    form person {&lt;br /&gt;
        numericField (noGrouping) noGrp&lt;br /&gt;
        numericField Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, numeric fields are generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Among other features, there are options to control the number grouping and a CSS class for negative numbers.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An optionsgroup is generated with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. Optionsgroups can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the captionField keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imagefield&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and readonly may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
    optionsgroup [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
        [type &amp;lt;type&amp;gt;]&lt;br /&gt;
        [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
        [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
        [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
        [useBeanService]&lt;br /&gt;
        [readonly]&lt;br /&gt;
        [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
        [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
        [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        optionsgroup Buttons {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Buttons].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, option groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2842</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2842"/>
				<updated>2017-10-26T09:28:33Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* numericField */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [( [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a wide range of &amp;quot;simple&amp;quot; UI elements.  This section documents these elements along with their appropriate options.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A push button is generated with the &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; keyword. Buttons can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag and an alignment specification.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
button [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        button clickMe align top-right&lt;br /&gt;
        button (readonly) doNotClickMePlease&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two buttons with the lower one set to read-only (disabled).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A checkbox is generated with the checkbox keyword. Checkboxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
checkbox [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        checkbox clickMe&lt;br /&gt;
        checkbox (readonly) doNotClick&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two checkboxes, with the second one disabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An combo box is generated with the combo keyword. Combo boxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the type keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the options group, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions, and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
combo [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        combo Combo {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Combo].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, combo boxes are created with the &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt; keyword, shown as image icons with the given caption. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A datefield is generated with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword. Datefields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the following may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* date format - one of the following values can be used to define the date format for the field: &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;.&lt;br /&gt;
* date/time resolution - the smallest unit of time the datefield should consider. Can be set to &amp;lt;code&amp;gt;second&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minute&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt; (default).&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
datefield [( [&amp;lt;dateFormat&amp;gt;] [&amp;lt;dateResolution&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        datefield MyDate&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a date field is created with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword, the Vaadin UI provides a date picker along with the field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A decimal field contains floating point numbers and is generated with the &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt; keyword. Decimal fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following may be defined in parentheses between the keyword and the given name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
* &amp;lt;code&amp;gt;precision&amp;lt;/code&amp;gt; - this option controls the number of digits after the decimal point to be displayed (integer). Defaults to 2.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
decimalField [( [noGrouping] [noMarkNegative] [precision=&amp;lt;precision&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    form Person {&lt;br /&gt;
        decimalField (noGrouping precision=3) noGrp&lt;br /&gt;
        decimalField (precision=5) Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, decimal fields are created by the &amp;lt;code&amp;gt;decimaField&amp;lt;/code&amp;gt; keyword. Mechanisms for controlling the number grouping and for adding a CSS class for negative numbers are available. The desired precision can be set optionally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A label is generated with the &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; keyword. Labels can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
label [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] )] {&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        label MyLabel&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will show a label, the most basic UI element.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A list is generated with the &amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt; keyword. Lists can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a list may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specfied.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
listSelect [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    form ConvertibleForm_left {&lt;br /&gt;
        listSelect someType {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.SomeType&lt;br /&gt;
        }&lt;br /&gt;
        bind convertible.someType &amp;lt;--&amp;gt; [this.someType].selection&lt;br /&gt;
    } align top-left&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, options groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A numeric field contains integers and is generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Numeric fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following&lt;br /&gt;
may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
numericField [( [noGrouping] [noMarkNegative] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Main {&lt;br /&gt;
    form person {&lt;br /&gt;
        numericField (noGrouping) noGrp&lt;br /&gt;
        numericField Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, numeric fields are generated with the &amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt; keyword. Among other features, there are options to control the number grouping and a CSS class for negative numbers.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2841</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2841"/>
				<updated>2017-10-25T16:30:06Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* listSelect */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [( [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a wide range of &amp;quot;simple&amp;quot; UI elements.  This section documents these elements along with their appropriate options.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A push button is generated with the &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; keyword. Buttons can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag and an alignment specification.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
button [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        button clickMe align top-right&lt;br /&gt;
        button (readonly) doNotClickMePlease&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two buttons with the lower one set to read-only (disabled).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A checkbox is generated with the checkbox keyword. Checkboxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
checkbox [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        checkbox clickMe&lt;br /&gt;
        checkbox (readonly) doNotClick&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two checkboxes, with the second one disabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An combo box is generated with the combo keyword. Combo boxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the type keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the options group, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions, and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
combo [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        combo Combo {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Combo].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, combo boxes are created with the &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt; keyword, shown as image icons with the given caption. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A datefield is generated with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword. Datefields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the following may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* date format - one of the following values can be used to define the date format for the field: &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;.&lt;br /&gt;
* date/time resolution - the smallest unit of time the datefield should consider. Can be set to &amp;lt;code&amp;gt;second&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minute&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt; (default).&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
datefield [( [&amp;lt;dateFormat&amp;gt;] [&amp;lt;dateResolution&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        datefield MyDate&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a date field is created with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword, the Vaadin UI provides a date picker along with the field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A decimal field contains floating point numbers and is generated with the &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt; keyword. Decimal fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following may be defined in parentheses between the keyword and the given name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
* &amp;lt;code&amp;gt;precision&amp;lt;/code&amp;gt; - this option controls the number of digits after the decimal point to be displayed (integer). Defaults to 2.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
decimalField [( [noGrouping] [noMarkNegative] [precision=&amp;lt;precision&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    form Person {&lt;br /&gt;
        decimalField (noGrouping precision=3) noGrp&lt;br /&gt;
        decimalField (precision=5) Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, decimal fields are created by the &amp;lt;code&amp;gt;decimaField&amp;lt;/code&amp;gt; keyword. Mechanisms for controlling the number grouping and for adding a CSS class for negative numbers are available. The desired precision can be set optionally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A label is generated with the &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; keyword. Labels can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
label [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] )] {&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        label MyLabel&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will show a label, the most basic UI element.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A list is generated with the &amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt; keyword. Lists can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a list may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specfied.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
listSelect [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    form ConvertibleForm_left {&lt;br /&gt;
        listSelect someType {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.SomeType&lt;br /&gt;
        }&lt;br /&gt;
        bind convertible.someType &amp;lt;--&amp;gt; [this.someType].selection&lt;br /&gt;
    } align top-left&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, options groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2840</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2840"/>
				<updated>2017-10-25T16:29:26Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* listSelect */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [( [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a wide range of &amp;quot;simple&amp;quot; UI elements.  This section documents these elements along with their appropriate options.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A push button is generated with the &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; keyword. Buttons can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag and an alignment specification.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
button [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        button clickMe align top-right&lt;br /&gt;
        button (readonly) doNotClickMePlease&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two buttons with the lower one set to read-only (disabled).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A checkbox is generated with the checkbox keyword. Checkboxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
checkbox [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        checkbox clickMe&lt;br /&gt;
        checkbox (readonly) doNotClick&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two checkboxes, with the second one disabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An combo box is generated with the combo keyword. Combo boxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the type keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the options group, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions, and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
combo [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        combo Combo {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Combo].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, combo boxes are created with the &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt; keyword, shown as image icons with the given caption. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A datefield is generated with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword. Datefields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the following may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* date format - one of the following values can be used to define the date format for the field: &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;.&lt;br /&gt;
* date/time resolution - the smallest unit of time the datefield should consider. Can be set to &amp;lt;code&amp;gt;second&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minute&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt; (default).&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
datefield [( [&amp;lt;dateFormat&amp;gt;] [&amp;lt;dateResolution&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        datefield MyDate&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a date field is created with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword, the Vaadin UI provides a date picker along with the field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A decimal field contains floating point numbers and is generated with the &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt; keyword. Decimal fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following may be defined in parentheses between the keyword and the given name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
* &amp;lt;code&amp;gt;precision&amp;lt;/code&amp;gt; - this option controls the number of digits after the decimal point to be displayed (integer). Defaults to 2.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
decimalField [( [noGrouping] [noMarkNegative] [precision=&amp;lt;precision&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    form Person {&lt;br /&gt;
        decimalField (noGrouping precision=3) noGrp&lt;br /&gt;
        decimalField (precision=5) Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, decimal fields are created by the &amp;lt;code&amp;gt;decimaField&amp;lt;/code&amp;gt; keyword. Mechanisms for controlling the number grouping and for adding a CSS class for negative numbers are available. The desired precision can be set optionally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A label is generated with the &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; keyword. Labels can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
label [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] )] {&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        label MyLabel&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will show a label, the most basic UI element.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A list is generated with the &amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt; keyword. Lists can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, a list may be given a datatype (e.g. a DTO) that can be set with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keyword. The selection type (&amp;lt;code&amp;gt;single&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;multi&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;none&amp;lt;/code&amp;gt;) can optionally be controlled with the &amp;lt;code&amp;gt;selectionType&amp;lt;/code&amp;gt; keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the optionsgroup, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specfied.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
listSelect [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [selectionType &amp;lt;selectionType&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    form ConvertibleForm_left {&lt;br /&gt;
        listSelect someType {&lt;br /&gt;
            type net.osbee.sample.pos.dtos.general.SomeType&lt;br /&gt;
        }&lt;br /&gt;
        bind convertible.someType &amp;lt;--&amp;gt; [this.someType].selection&lt;br /&gt;
    } align top-left&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, options groups are created with the &amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt; keyword. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2839</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2839"/>
				<updated>2017-10-25T14:55:20Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* label */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [( [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a wide range of &amp;quot;simple&amp;quot; UI elements.  This section documents these elements along with their appropriate options.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A push button is generated with the &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; keyword. Buttons can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag and an alignment specification.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
button [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        button clickMe align top-right&lt;br /&gt;
        button (readonly) doNotClickMePlease&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two buttons with the lower one set to read-only (disabled).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A checkbox is generated with the checkbox keyword. Checkboxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
checkbox [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        checkbox clickMe&lt;br /&gt;
        checkbox (readonly) doNotClick&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two checkboxes, with the second one disabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An combo box is generated with the combo keyword. Combo boxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the type keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the options group, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions, and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
combo [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        combo Combo {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Combo].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, combo boxes are created with the &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt; keyword, shown as image icons with the given caption. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A datefield is generated with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword. Datefields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the following may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* date format - one of the following values can be used to define the date format for the field: &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;.&lt;br /&gt;
* date/time resolution - the smallest unit of time the datefield should consider. Can be set to &amp;lt;code&amp;gt;second&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minute&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt; (default).&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
datefield [( [&amp;lt;dateFormat&amp;gt;] [&amp;lt;dateResolution&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        datefield MyDate&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a date field is created with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword, the Vaadin UI provides a date picker along with the field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A decimal field contains floating point numbers and is generated with the &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt; keyword. Decimal fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following may be defined in parentheses between the keyword and the given name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
* &amp;lt;code&amp;gt;precision&amp;lt;/code&amp;gt; - this option controls the number of digits after the decimal point to be displayed (integer). Defaults to 2.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
decimalField [( [noGrouping] [noMarkNegative] [precision=&amp;lt;precision&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    form Person {&lt;br /&gt;
        decimalField (noGrouping precision=3) noGrp&lt;br /&gt;
        decimalField (precision=5) Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, decimal fields are created by the &amp;lt;code&amp;gt;decimaField&amp;lt;/code&amp;gt; keyword. Mechanisms for controlling the number grouping and for adding a CSS class for negative numbers are available. The desired precision can be set optionally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A label is generated with the &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; keyword. Labels can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
label [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] )] {&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        label MyLabel&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will show a label, the most basic UI element.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2832</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2832"/>
				<updated>2017-10-24T16:05:19Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [( [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a wide range of &amp;quot;simple&amp;quot; UI elements.  This section documents these elements along with their appropriate options.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A push button is generated with the &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; keyword. Buttons can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag and an alignment specification.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
button [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        button clickMe align top-right&lt;br /&gt;
        button (readonly) doNotClickMePlease&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two buttons with the lower one set to read-only (disabled).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A checkbox is generated with the checkbox keyword. Checkboxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
checkbox [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        checkbox clickMe&lt;br /&gt;
        checkbox (readonly) doNotClick&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two checkboxes, with the second one disabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An combo box is generated with the combo keyword. Combo boxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the type keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the options group, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions, and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
combo [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        combo Combo {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Combo].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, combo boxes are created with the &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt; keyword, shown as image icons with the given caption. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A datefield is generated with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword. Datefields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the following may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* date format - one of the following values can be used to define the date format for the field: &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;.&lt;br /&gt;
* date/time resolution - the smallest unit of time the datefield should consider. Can be set to &amp;lt;code&amp;gt;second&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minute&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt; (default).&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
datefield [( [&amp;lt;dateFormat&amp;gt;] [&amp;lt;dateResolution&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [&amp;lt;visibility directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        datefield MyDate&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a date field is created with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword, the Vaadin UI provides a date picker along with the field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A decimal field contains floating point numbers and is generated with the &amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt; keyword. Decimal fields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. Furthermore, the following may be defined in parentheses between the keyword and the given name:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;noGrouping&amp;lt;/code&amp;gt; - if this option is given, then the number in the field will not be grouped according to the current locale.&lt;br /&gt;
* &amp;lt;code&amp;gt;noMarkNegative&amp;lt;/code&amp;gt; - by default, the CSS class &amp;quot;&amp;lt;code&amp;gt;lun-negative-value&amp;lt;/code&amp;gt;&amp;quot; is added to the field if the value is negative. This can be disabled with this setting.&lt;br /&gt;
* &amp;lt;code&amp;gt;precision&amp;lt;/code&amp;gt; - this option controls the number of digits after the decimal point to be displayed (integer). Defaults to 2.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
decimalField [( [noGrouping] [noMarkNegative] [precision=&amp;lt;precision&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    form Person {&lt;br /&gt;
        decimalField (noGrouping precision=3) noGrp&lt;br /&gt;
        decimalField (precision=5) Grp&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, decimal fields are created by the &amp;lt;code&amp;gt;decimaField&amp;lt;/code&amp;gt; keyword. Mechanisms for controlling the number grouping and for adding a CSS class for negative numbers are available. The desired precision can be set optionally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2792</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2792"/>
				<updated>2017-10-23T16:32:15Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [( [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a wide range of &amp;quot;simple&amp;quot; UI elements.  This section documents these elements along with their appropriate options.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A push button is generated with the &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; keyword. Buttons can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag and an alignment specification.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
button [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        button clickMe align top-right&lt;br /&gt;
        button (readonly) doNotClickMePlease&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two buttons with the lower one set to read-only (disabled).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A checkbox is generated with the checkbox keyword. Checkboxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
checkbox [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        checkbox clickMe&lt;br /&gt;
        checkbox (readonly) doNotClick&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two checkboxes, with the second one disabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
An combo box is generated with the combo keyword. Combo boxes can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and a string with CSS styles.&lt;br /&gt;
&lt;br /&gt;
Within curly braces, an optionsgroup may be given a datatype (e.g. a DTO) that can be set with the type keyword. If a specific caption to be displayed is stored in the datatype, it can be addressed with the &amp;lt;code&amp;gt;captionField&amp;lt;/code&amp;gt; keyword. If images should be displayed in the options group, the image source path within the datatype can be set with the &amp;lt;code&amp;gt;imageField&amp;lt;/code&amp;gt; keyword. Furthermore, the flags &amp;lt;code&amp;gt;useBeanService&amp;lt;/code&amp;gt; (to look for registered OSGi services from where data can be retrieved) and &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; may be set. Validator assignments, databinding instructions, and visibility processor directives may be defined.&lt;br /&gt;
&lt;br /&gt;
After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
combo [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [captionFiend &amp;lt;captionField&amp;gt;]&lt;br /&gt;
    [imageField &amp;lt;imageField&amp;gt;]&lt;br /&gt;
    [useBeanService]&lt;br /&gt;
    [readonly]&lt;br /&gt;
    [&amp;lt;validator assignments&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Sample {&lt;br /&gt;
    datasource ds : net.osbee.sample.dtos.onetype&lt;br /&gt;
    verticalLayout Demo {&lt;br /&gt;
        combo Combo {&lt;br /&gt;
            type net.osbee.sample.dtos.othertype&lt;br /&gt;
            captionField name&lt;br /&gt;
            imageField imagePath&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    bind list ds.others --&amp;gt; [this.Demo.Combo].collection&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, combo boxes are created with the &amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt; keyword, shown as image icons with the given caption. The values displayed are retrieved via databinding.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A datefield is generated with the &amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt; keyword. Datefields can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, and a readonly flag.&lt;br /&gt;
&lt;br /&gt;
Furthermore, the following may be defined in parentheses between the keyword and the name:&lt;br /&gt;
&lt;br /&gt;
* date format - one of the following values can be used to define the date format for the field: &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;.&lt;br /&gt;
* date/time resolution - the smallest unit of time the datefield should consider. Can be set to &amp;lt;code&amp;gt;second&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minute&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;undefined&amp;lt;/code&amp;gt; (default).&lt;br /&gt;
&lt;br /&gt;
Validator assignments, databinding instructions and visibility processor directives may be defined in braces. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2684</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2684"/>
				<updated>2017-10-19T15:58:11Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [( [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;layoutname&amp;gt;] {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
The UI DSL supports a wide range of &amp;quot;simple&amp;quot; UI elements.  This section documents these elements along with their appropriate options.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A push button is generated with the &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; keyword. Buttons can receive a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles, a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag and an alignment specification.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
button [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] )] [&amp;lt;name&amp;gt;] [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        button clickMe align top-right&lt;br /&gt;
        button (readonly) doNotClickMePlease&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will create two buttons with the lower one set to read-only (disabled).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2683</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2683"/>
				<updated>2017-10-19T15:46:41Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* searchdialog */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
keyword and can optionally be given a name, an i18n key, a string with&lt;br /&gt;
CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged&lt;br /&gt;
above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined&lt;br /&gt;
separately for each layout. After the closing braces, an alignment may be&lt;br /&gt;
specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an i18n key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an i18n key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [name] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [( [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] )] [name] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2570</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2570"/>
				<updated>2017-10-17T14:58:46Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* RegexValidator */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
keyword and can optionally be given a name, an i18n key, a string with&lt;br /&gt;
CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged&lt;br /&gt;
above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined&lt;br /&gt;
separately for each layout. After the closing braces, an alignment may be&lt;br /&gt;
specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an i18n key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an i18n key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [name] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [name] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
&lt;br /&gt;
===Exposed Actions===&lt;br /&gt;
&lt;br /&gt;
===Visibility Processing===&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2569</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2569"/>
				<updated>2017-10-17T14:56:16Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* Validators */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
keyword and can optionally be given a name, an i18n key, a string with&lt;br /&gt;
CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged&lt;br /&gt;
above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined&lt;br /&gt;
separately for each layout. After the closing braces, an alignment may be&lt;br /&gt;
specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an i18n key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an i18n key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [name] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [name] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2568</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2568"/>
				<updated>2017-10-17T14:55:51Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* Mobile UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
keyword and can optionally be given a name, an i18n key, a string with&lt;br /&gt;
CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged&lt;br /&gt;
above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined&lt;br /&gt;
separately for each layout. After the closing braces, an alignment may be&lt;br /&gt;
specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an i18n key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an i18n key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [name] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [name] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Alignment===&lt;br /&gt;
&lt;br /&gt;
===i18n===&lt;br /&gt;
&lt;br /&gt;
===Datasources===&lt;br /&gt;
&lt;br /&gt;
===Databinding===&lt;br /&gt;
&lt;br /&gt;
===Shared State Groups===&lt;br /&gt;
&lt;br /&gt;
===Validators===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2567</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2567"/>
				<updated>2017-10-17T14:51:28Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* Dialogs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
keyword and can optionally be given a name, an i18n key, a string with&lt;br /&gt;
CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged&lt;br /&gt;
above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined&lt;br /&gt;
separately for each layout. After the closing braces, an alignment may be&lt;br /&gt;
specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an i18n key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with commands, see section &amp;quot;Commands&amp;quot; below for commands that can be used.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an i18n key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dialog [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [name] {&lt;br /&gt;
    [type &amp;lt;type&amp;gt;]&lt;br /&gt;
    [&amp;lt;UI elements&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A search dialog is similar to a regular dialog. It is created with the &amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt; keyword. The difference is that in a search dialog, search fields may be specified. The search dialog provides wildcard support for the search fields, see section &amp;quot;searching&amp;quot; below for details.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
searchdialog [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [name] {&lt;br /&gt;
    [type &amp;lt;type]&lt;br /&gt;
    [search { &amp;lt;searchfields&amp;gt; }]&lt;br /&gt;
    [content { &amp;lt;UI elements&amp;gt; }]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Validators===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2566</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2566"/>
				<updated>2017-10-16T09:39:51Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* Dialogs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
keyword and can optionally be given a name, an i18n key, a string with&lt;br /&gt;
CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged&lt;br /&gt;
above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined&lt;br /&gt;
separately for each layout. After the closing braces, an alignment may be&lt;br /&gt;
specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an i18n key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new &amp;quot;views&amp;quot; that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with a command.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an i18n key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Validators===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2565</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2565"/>
				<updated>2017-10-13T14:40:54Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* dialog */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
keyword and can optionally be given a name, an i18n key, a string with&lt;br /&gt;
CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged&lt;br /&gt;
above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined&lt;br /&gt;
separately for each layout. After the closing braces, an alignment may be&lt;br /&gt;
specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an i18n key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
Dialogs are a special case of layouts: They open in new �views� that are laid over the ordinary UI; much like pop-up windows. Dialogs are a dynamic feature of the UI and are opened with a command.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A dialog is created by using the &amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt; keyword (optionally followed by an i18n key and/or a string with CSS styles) and can be given a name. A dialog may be given a type, and it can contain UI elements.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Validators===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2563</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2563"/>
				<updated>2017-10-12T16:01:45Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* Tabs and Tabsheets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
keyword and can optionally be given a name, an i18n key, a string with&lt;br /&gt;
CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged&lt;br /&gt;
above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined&lt;br /&gt;
separately for each layout. After the closing braces, an alignment may be&lt;br /&gt;
specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an i18n key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tabsheet is created by using the &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt; keyword (optionally followed by an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key and/or a string with CSS styles) and can be given a name. The tabs contained in the tabsheet are described within the braces following the tabsheet statement: Each tab is introduced with the tab keyword followed by a name and the tab contents: either a single UI element or a layout with several UI elements.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tabsheet [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [&amp;lt;name&amp;gt;] {&lt;br /&gt;
    [tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;]&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A tab may carry a single UI element, a layout or a tabsheet. Tabs must reside in tabsheets. After the tab keyword, a tab may be given a name, followed directly by the tab content.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
tab &amp;lt;name&amp;gt; &amp;lt;tabContent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Sample''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    tab one form CurrentLocation {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        numericField Number&lt;br /&gt;
    }&lt;br /&gt;
    tab two textarea Overview&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a tabsheet holds tabs that can contain either single UI elements or layouts.&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Validators===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2562</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2562"/>
				<updated>2017-10-10T11:59:49Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* =Dialogs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
keyword and can optionally be given a name, an i18n key, a string with&lt;br /&gt;
CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged&lt;br /&gt;
above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined&lt;br /&gt;
separately for each layout. After the closing braces, an alignment may be&lt;br /&gt;
specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an i18n key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
====Dialogs====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Validators===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2561</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2561"/>
				<updated>2017-10-10T11:59:37Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* Tabs and Tabsheets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
keyword and can optionally be given a name, an i18n key, a string with&lt;br /&gt;
CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged&lt;br /&gt;
above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined&lt;br /&gt;
separately for each layout. After the closing braces, an alignment may be&lt;br /&gt;
specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an i18n key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;tab&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
====Dialogs===&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;dialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchdialog&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
====Simple UI Elements====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;checkbox&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;combo&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;datefield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;decimalField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;listSelect&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;numericField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;optionsgroup&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;progressbar&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;referenceField&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;searchfield&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;searchPanel&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textarea&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;textfield&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
===Mobile UI===&lt;br /&gt;
&lt;br /&gt;
===Validators===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=File:Uidsl-5.png&amp;diff=2560</id>
		<title>File:Uidsl-5.png</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=File:Uidsl-5.png&amp;diff=2560"/>
				<updated>2017-10-10T11:52:06Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2559</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2559"/>
				<updated>2017-10-10T11:51:47Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* Tabs and tabsheets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
keyword and can optionally be given a name, an i18n key, a string with&lt;br /&gt;
CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged&lt;br /&gt;
above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined&lt;br /&gt;
separately for each layout. After the closing braces, an alignment may be&lt;br /&gt;
specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an i18n key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and Tabsheets====&lt;br /&gt;
&lt;br /&gt;
Tabs are similar to layouts insofar as they can contain other layouts. Tabs themselves have to be contained inside a &amp;lt;code&amp;gt;tabsheet&amp;lt;/code&amp;gt;, however. The tabsheet in its turn can reside inside a layout or be directly attached to a view. Similarly to layouts, tabsheets can be nested (a tab can contain an &amp;quot;inner&amp;quot; tabsheet). Below shows an illustration of these containment possibilities:&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-5.png|center|frame|''This graph illustrates how the various elements of the UI DSL can be contained in each other.'']]&lt;br /&gt;
&lt;br /&gt;
===Validators===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2558</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2558"/>
				<updated>2017-10-10T11:47:37Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* form */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
keyword and can optionally be given a name, an i18n key, a string with&lt;br /&gt;
CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged&lt;br /&gt;
above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined&lt;br /&gt;
separately for each layout. After the closing braces, an alignment may be&lt;br /&gt;
specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an i18n key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
====Tabs and tabsheets====&lt;br /&gt;
&lt;br /&gt;
===Validators===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2557</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2557"/>
				<updated>2017-10-10T10:01:01Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* verticalLayout */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
keyword and can optionally be given a name, an i18n key, a string with&lt;br /&gt;
CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged&lt;br /&gt;
above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined&lt;br /&gt;
separately for each layout. After the closing braces, an alignment may be&lt;br /&gt;
specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    verticalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an i18n key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
===Validators===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2556</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2556"/>
				<updated>2017-10-10T10:00:28Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* gridlayout */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the '''desired''' validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model definitions: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI. Both views are generated from the current &amp;lt;code&amp;gt;.ui&amp;lt;/code&amp;gt; model file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
keyword and can optionally be given a name, an i18n key, a string with&lt;br /&gt;
CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged&lt;br /&gt;
above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined&lt;br /&gt;
separately for each layout. After the closing braces, an alignment may be&lt;br /&gt;
specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an i18n key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    gridlayout (columns=2) {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, a gridlayout arranges its elements in rows and columns. The rows are filled from letf to right, then the columns from top to bottom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A form layout can be generated with the &amp;lt;code&amp;gt;form&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a form layout, elements are arranged in a column. Element labels are displayed on the left side of the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Note''': A form layout disables alignment specifications for the elements contained in it.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
form [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ideview Target {&lt;br /&gt;
    from AdressForm {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the form layout will lists the contained elements below each other, and set the labels to the left of the elements.&lt;br /&gt;
&lt;br /&gt;
===Validators===&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;BeanValidationValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;Expression&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MaxLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;MinLengthValidator&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;RegexValidator&amp;lt;/code&amp;gt;====&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2548</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2548"/>
				<updated>2017-10-06T09:42:28Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* gridlayout */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the desired validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The `UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI generated from the current &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file, and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI from the current &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
keyword and can optionally be given a name, an i18n key, a string with&lt;br /&gt;
CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged&lt;br /&gt;
above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined&lt;br /&gt;
separately for each layout. After the closing braces, an alignment may be&lt;br /&gt;
specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an i18n key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2547</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2547"/>
				<updated>2017-10-06T09:42:18Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* verticalLayout */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the desired validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The `UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI generated from the current &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file, and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI from the current &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
keyword and can optionally be given a name, an i18n key, a string with&lt;br /&gt;
CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged&lt;br /&gt;
above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined&lt;br /&gt;
separately for each layout. After the closing braces, an alignment may be&lt;br /&gt;
specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an i18n key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} align &amp;lt;alignment&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2546</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2546"/>
				<updated>2017-10-06T09:41:42Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* verticalLayout */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the desired validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The `UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI generated from the current &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file, and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI from the current &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
keyword and can optionally be given a name, an i18n key, a string with&lt;br /&gt;
CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged&lt;br /&gt;
above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined&lt;br /&gt;
separately for each layout. After the closing braces, an alignment may be&lt;br /&gt;
specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} align &amp;lt;alignment&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A gridlayout can be generated with the &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an i18n key, a string with CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a &amp;lt;code&amp;gt;gridlayout&amp;lt;/code&amp;gt;, elements are arranged in columns, the rows being filled from left to right. Element labels are displayed above the element. In parentheses after the keyword, the desired number of columns may be specified (default is 2), and an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag may be given.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gridlayout [columns=&amp;lt;columnNumber&amp;gt;] [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] &amp;lt;layoutname&amp;gt; {&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} align &amp;lt;alignment&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2545</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2545"/>
				<updated>2017-10-05T07:52:41Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* verticalLayout */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the desired validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The `UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI generated from the current &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file, and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI from the current &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
keyword and can optionally be given a name, an i18n key, a string with&lt;br /&gt;
CSS styles and a &amp;lt;code&amp;gt;readonly&amp;lt;/code&amp;gt; flag. In a vertical layout, elements are arranged&lt;br /&gt;
above each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Databinding instructions and visibility processor directives may be defined&lt;br /&gt;
separately for each layout. After the closing braces, an alignment may be&lt;br /&gt;
specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
verticalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Address {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield Street&lt;br /&gt;
        decimalField Number&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields stacking above each other.&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2544</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2544"/>
				<updated>2017-10-05T07:52:31Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* horizontalLayout */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the desired validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The `UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI generated from the current &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file, and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI from the current &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview Location {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
keyword and can optionally be given a name, an i18n key, a string with&lt;br /&gt;
CSS styles and a readonly �ag. In a vertical layout, elements are arranged&lt;br /&gt;
above each other with labels above the element.&lt;br /&gt;
Databinding instructions and visibility processor directives may be de�ned&lt;br /&gt;
separately for each layout. After the closing braces, an alignment may be&lt;br /&gt;
speci�ed.&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2542</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2542"/>
				<updated>2017-10-04T16:09:22Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* horizontalLayout */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the desired validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The `UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI generated from the current &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file, and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI from the current &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
horizontalLayout [i18n &amp;lt;i18nKey&amp;gt;] [styles &amp;lt;stylesString&amp;gt;] [readonly] layoutname {&lt;br /&gt;
    [autowire source &amp;lt;autowireSource&amp;gt;]&lt;br /&gt;
    &amp;lt;UI elements&amp;gt;&lt;br /&gt;
    [bind &amp;lt;binding&amp;gt;]&lt;br /&gt;
    [visibility &amp;lt;directive&amp;gt;]&lt;br /&gt;
} [align &amp;lt;alignment&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package net.osbee.sample.pos.uimodels&lt;br /&gt;
&lt;br /&gt;
ideview main {&lt;br /&gt;
    horizontalLayout person {&lt;br /&gt;
        textfield Name&lt;br /&gt;
        textfield City&lt;br /&gt;
        textfield State&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will arrange three text fields next to each other.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A vertical layout can be generated with the &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt;&lt;br /&gt;
keyword and can optionally be given a name, an i18n key, a string with&lt;br /&gt;
CSS styles and a readonly �ag. In a vertical layout, elements are arranged&lt;br /&gt;
above each other with labels above the element.&lt;br /&gt;
Databinding instructions and visibility processor directives may be de�ned&lt;br /&gt;
separately for each layout. After the closing braces, an alignment may be&lt;br /&gt;
speci�ed.&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2541</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2541"/>
				<updated>2017-10-04T09:33:18Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* horizontalLayout */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the desired validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The `UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI generated from the current &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file, and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI from the current &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
'''Syntax''':&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2540</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2540"/>
				<updated>2017-10-04T09:33:04Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* mobile */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the desired validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The `UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI generated from the current &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file, and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI from the current &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;br /&gt;
&lt;br /&gt;
===UI Elements===&lt;br /&gt;
&lt;br /&gt;
The following sections describe the keywords that define basic UI elements. Most of them can be used in both &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; contexts.&lt;br /&gt;
&lt;br /&gt;
====Layouts====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
A horizontal layout can be generated with the &amp;lt;code&amp;gt;horizontalLayout&amp;lt;/code&amp;gt; keyword and can optionally be given a name, an &amp;lt;code&amp;gt;i18n&amp;lt;/code&amp;gt; key, a string with CSS styles and a readonly flag. In a horizontal layout, elements are arranged next to each other with labels above the element.&lt;br /&gt;
&lt;br /&gt;
Autowiring information, databinding instructions and visibility processor directives may be defined separately for each layout. After the closing braces, an alignment may be specified.&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=File:Uidsl_03.png&amp;diff=2539</id>
		<title>File:Uidsl 03.png</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=File:Uidsl_03.png&amp;diff=2539"/>
				<updated>2017-10-04T08:17:51Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2538</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2538"/>
				<updated>2017-10-04T08:17:27Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* ideview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the desired validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The `UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI generated from the current &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file, and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI from the current &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a view optimized for mobile devices such as smartphones or tablets. This &amp;quot;mobile&amp;quot; view serves as topmost UI element and can contain further UI elements. In addition to the elements supported by &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;, mobile views also control transitions between pages.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl_03.png|center|frame|''Figure 3: Example - A &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file defines an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; inside a package. The &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; contains &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; definitions, a &amp;lt;code&amp;gt;verticalLayout&amp;lt;/code&amp;gt; with the visible UI elements and &amp;lt;code&amp;gt;bind&amp;lt;/code&amp;gt; databinding directives.'']]&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	<entry>
		<id>https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2516</id>
		<title>UI DSL</title>
		<link rel="alternate" type="text/html" href="https://download.osbee.org/documentation/index.php?title=UI_DSL&amp;diff=2516"/>
				<updated>2017-09-29T16:10:12Z</updated>
		
		<summary type="html">&lt;p&gt;Wu: /* Views */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
The UI DSL facilitates the creation of model-based user interfaces (UIs) and their integration into complex applications. It is not intended for styling and design specifications.&lt;br /&gt;
&lt;br /&gt;
Using UI DSL, layouts and fields can easily be defined along with the appropriate validation and binding mechanisms. The underlying ECView model uses Eclipse databinding to create an efficient databinding between UI elements and the Java objects they represent. The UI model is kept independent of rendering implementations so that it can be easily re-used.&lt;br /&gt;
&lt;br /&gt;
By referencing DTO models (as defined by the [[DTO DSL]]) in the UI DSL, UI model and internal application logic can be tightly interwoven. The ECView UI model is extensible and allows for a straightforward implementation of new UI elements.&lt;br /&gt;
&lt;br /&gt;
The UI DSL is used to define UI models along with the desired validators and databindings. Valid UI DSL files are compiled to ECView model definitions (Java classes) that are interpreted by the UI renderer in real time. Thus, the UI DSL acts as a simplified frontend for the ECView model.&lt;br /&gt;
&lt;br /&gt;
In the reference implementation, Vaadin has been chosen as the UI framework that is used to render the UI model. However, since the model-view-controller distinction has been observed, it is possible to change the rendering service without having to change the underlying UI model. For example, JavaFX might be used to render the exact same UI model as Vaadin.&lt;br /&gt;
&lt;br /&gt;
ECView is a UI model based on the Eclipse Modeling Framework (EMF). It defines various UI elements and their properties and possible relations. UI elements are thus represented as EObjects and can be manipulated accordingly. Furthermore, databinding can be done efficiently by using the Eclipse databinding mechanism. ECView attaches so-called editparts to its model elements. Acting as controllers, these editparts tie the application's model and its visual representation together. Editparts are responsible for making changes to the model. ECView provides support for various validation mechanisms (min-length, max-length, regex ...). The `UI DSL can make use of such validations easily and allows the definition of additional custom validators using Xexpressions. Application logic can interface with the UI model using the editparts of the respective model elements (reading values, changing visibility etc.). Furthermore, the rendered UI may be addressed by application logic directly, if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-1.png|center|frame|''Figure 1: Architecture - the UI DSL helps to define an ECView UI model that is propagated to the rendering layer (Vaadin) by editparts.'']]&lt;br /&gt;
&lt;br /&gt;
==UI Model Files==&lt;br /&gt;
&lt;br /&gt;
UIs are defined in text files with the file extension &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt;. These UI model files carry the information necessary to render a user interface and are made up of the following sections:&lt;br /&gt;
&lt;br /&gt;
*Package declaration: The UI model file must have a unique fully qualified name that can be specified with the package keyword at the beginning of the file.&lt;br /&gt;
*Import section: UI model files can address definitions from other models (e.g. datasource or validator specifications). The model files that contain these definitions can be specified with the import keyword followed by the fully qualified name of the file and the &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; wildcard.&lt;br /&gt;
*Validator definitions: The UI DSL supports the usage of validators that can be attached to UI elements directly in the UI model file. If validators are to be used for several UI elements, they may be defined once in this section and given an alias that can then be used to attach them to other UI elements. A validator can be defined for later use by the &amp;lt;code&amp;gt;validatorAlias&amp;lt;/code&amp;gt; keyword.&lt;br /&gt;
*The UI model: The UI is described as a tree-like containment structure, starting with the root element. This can either be an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; (for a desktop view) or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; (for a view optimized for smartphones).&lt;br /&gt;
&lt;br /&gt;
There are two Eclipse views that can be used for UI preview: A &amp;quot;Vaadin IDE Preview&amp;quot; view that displays a &amp;quot;desktop&amp;quot; UI generated from the current &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file, and a &amp;quot;Vaadin Mobile Preview&amp;quot; view that renders a mobile UI from the current &amp;lt;code&amp;gt;.uimodel&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
[[File:uidsl-2.png|center|frame|''Figure 2: UI model file - After the package name specification and an import declaration, a view is described. This file is automatically translated to an ECView model that is rendered by the Vaadin UI.'']]&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&lt;br /&gt;
The UI model DSL uses keywords to define UI elements. The UI elements represent a containment tree starting with either an &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view as topmost element. In order to reflect the containment structure, keywords for UI elements may be followed by braces that surround the keywords for contained elements.&lt;br /&gt;
&lt;br /&gt;
===Package Definition===&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;package&amp;lt;/code&amp;gt; keyword, the user defines the UI package that contains views.&lt;br /&gt;
&lt;br /&gt;
► '''Example''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package &amp;lt;UImodel name&amp;gt;  {&lt;br /&gt;
    &amp;lt;views&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Views===&lt;br /&gt;
&lt;br /&gt;
A view is the topmost UI element and can contain further UI elements. Currently two type of views are supported: &amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt; for desktop, and &amp;lt;code&amp;gt;mobile&amp;lt;/code&amp;gt; view for mobile devices.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;code&amp;gt;ideview&amp;lt;/code&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
This keyword defines a desktop view. It is used as a root element for rendering the UI. An ideview may be given a name; it can contain the following elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;sharedStateGroup&amp;lt;/code&amp;gt; definition (optional): Views may belong to one shared state group if an &amp;lt;code&amp;gt;ISharedStateContext&amp;lt;/code&amp;gt; is provided by the &amp;lt;code&amp;gt;ViewContext&amp;lt;/code&amp;gt;. Shared state groups are used by &amp;lt;code&amp;gt;IBeanSearchService&amp;lt;/code&amp;gt; to provide and handle a consistent set of data shared across multiple views. This comes with a shared &amp;quot;dirty&amp;quot; state for changed data that have not yet been written to the database. Shared state groups are identified by a String.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; definition (optional): Views may be assigned to categories that are handled by external frameworks. This setting has no effect within the UI DSL, but can be used to pass information to an external framework.&lt;br /&gt;
* &amp;lt;code&amp;gt;exposedActions&amp;lt;/code&amp;gt; (optional): actions that are defined within the view, but can be executed from without (e.g. load, save, delete etc.).&lt;br /&gt;
* &amp;lt;code&amp;gt;datasource&amp;lt;/code&amp;gt; and data alias definitions (optional).&lt;br /&gt;
* UI elements: These elements make up the visible content of the view. They may be hierarchically nested.&lt;br /&gt;
* &amp;quot;global&amp;quot; validation assignments (optional).&lt;br /&gt;
* &amp;lt;code&amp;gt;databinding&amp;lt;/code&amp;gt; assignments (optional).&lt;br /&gt;
* visibility processor directives (optional).&lt;/div&gt;</summary>
		<author><name>Wu</name></author>	</entry>

	</feed>