Chapter III. SJS Front reference

Table of Contents

III.1. Reference for SJS Front
III.1.1. Root
III.1.2. Common
III.1.3. View
III.1.4. Tree
III.1.5. Composite view
III.1.6. Action
III.1.7. View
III.1.8. workspace
III.1.9. Module
III.1.10. Controller
III.1.11. Message
III.1.12. Suppoprort
III.1.13. Support
III.1.14. Generic

III.1. Reference for SJS Front

III.1.1. Root

III.1.1.1. Front

  • allowed next element : polarChart, cartesianChart, mobilePolarChart, mobileCartesianChart, form, mobileForm, mapView, mobileMapView, table, listView, mobileListView, propertyView, stringPropertyView, referencePropertyView, enumerationPropertyView, image, html, actionView, treeNode, tree, mobileTree, tabs, mobileTabs, split, border, mobileBorder, grid, evenGrid, entityCardView, basicCardView, actionMap, action, mobileNavPage, mobileCardPage, mobileCompositePage, workspace, module, collectionModule, filterModule, beanModule, nodeModule, controller, messageSource, external, template, paramSet, bean, list, set, map

This root descriptor is used in the file application.groovy generated during the initialization of the project by Jspresso. There is generally no need to change it.

Table III.1. Front properties

PropertyDescription
This class does not have any specific named property.

III.1.2. Common

III.1.2.1. Security

This descriptor is an internal s SJS descriptor which is never used by the application.It is used by SJS to factorize Security properties.

Table III.2. Security properties

PropertyDescription

permId

String

Sets the permanent identifier to this application element. Permanent identifiers are used by different framework parts, like dynamic security or record/replay controllers to uniquely identify an application element. Permanent identifiers are generated by the SJS build based on the element id but must be explicitely set if Spring XML is used.

grantedRoles

ListOfString

Assigns the roles that are authorized to use this view. Whenever the user is not granted sufficient privileges, the view is replaced by an empty section at runtime. It supports "!" prefix to negate the role(s). Setting the collection of granted roles to null (default value) disables role based authorization on the view level. The framework then checks for the model roles authorizations and will apply the same restrictions. If both view and model granted roles collections are null, then access is granted to anyone.

booleanWritabilityGates

ListOfString

Assigns a collection of gates to determine view writability. A view will be considered writable (updatable) if and only if all boolean gates are open.

form 'form1', booleanWritabilityGates: ['prop1', '!prop2']

  • The first 'prop1' gate is open if the prop1 property is true on the underlying model

  • The second '!prop2' gate is open if prop2 property is false on the underlying model

This mecanism is mainly used for dynamic UI authorization based on model state, e.g. a validated invoice should not be editable anymore. View assigned gates will be cloned for each view instance created and backed by this descriptor. So basically, each view instance will have its own, unshared collection of writability gates. By default, view descriptors are not assigned any gates collection, i.e. there is no writability restriction. Note however that view actual writability is the combination of view and model writability.

rolesWritabilityGates

ListOfString

Assigns a collection of gates to determine view writability. A view will be considered writable (updatable) if and only if the user role matches at least one of the role.

form 'form2', rolesWritabilityGates: ['role1', '!role2']

  • The first gate 'role1' is open if the connected user has the role1

  • The second gate '!role2' is open if the connected user does not have the role2

The mecanism is different from booleanWritabilityGates since only one role condition has to be matched to open the gate. In the example, if the user has role1 OR does not have role2, then the access is granted.

enumWritabilityGates

MapOfListOfString

Assigns a collection of gates to determine view writability. A view will be considered writable (updatable) if and only if all enum gates are open.

form 'form1', enumWritabilityGates: ['prop1':['VAL1','VAL2'], '!prop2':['VAL3']]

  • The first 'prop1' gate is open if 'prop1' property value is either 'VAL1' or 'VAL2' on the underlying model

  • The second '!prop2' gate is open if 'prop2' propety value is not 'VAL3' on the underlying model

This mecanism is mainly used for dynamic UI authorization based on model state, e.g. a validated invoice should not be editable anymore. View assigned gates will be cloned for each view instance created and backed by this descriptor. So basically, each view instance will have its own, unshared collection of writability gates. By default, view descriptors are not assigned any gates collection, i.e. there is no writability restriction. Note however that view actual writability is the combination of view and model writability.

regexWritabilityGates

MapOfString

Assigns a collection of gates to determine view writability. A view will be considered writable (updatable) if and only if all regex gates are open.

form 'form1', regexWritabilityGates: ['prop1':'[A-Z]*', '!prop2':'[a-z]*']

  • The first 'prop1' gate is open if the prop1 property matches [A-Z]* on the underlying model

  • The second '!prop2' gate is open if prop2 property does not match [a-z]* regex on the underlying model

This mecanism is mainly used for dynamic UI authorization based on model state, e.g. a validated invoice should not be editable anymore. View assigned gates will be cloned for each view instance created and backed by this descriptor. So basically, each view instance will have its own, unshared collection of writability gates. By default, view descriptors are not assigned any gates collection, i.e. there is no writability restriction. Note however that view actual writability is the combination of view and model writability.


III.1.2.2. common

  • extend : Security

  • Inherited properties : permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

This descriptor is an internal s SJS descriptor which is never used by the application.It s used by SJS to factorize commons properties for desktop views.

Table III.3. common properties

PropertyDescription

model

RefDomain

modelDescriptor

Assigns the model descriptor backing the view. The model descriptor serves several purposes :

  • configuration of the view content. For instance whenever a form is assigned a component model descriptor, it will install 1 field per component rendering properties, unless otherwise specified in the view descriptor itself.

  • configuration of the binding layer. There is no need for the developer to configure anything for the binding to occur between the view and the model. Based on their model descriptor, Jspresso will setup all the necessary plumbing to efficiently synchronize model properties with their view couterpart bi-directionally. This synchronization occurs implicitely using the observer pattern and one of the Jspresso key contract is to guarantee this synchronization seamlessly.

Although it is the developer responsibility to make sure the correct model descriptor is assigned to the view, there are cases where the framework will infer it. For instance, a composite view will by default transmit its model descriptor to its children that do not have their model descriptor explicitely set. This allows for setting the model descriptor only on the composite view and keep default null value on the children as an implicite model inheritance enablement. Most of the time it is not necessary to explicitly use the property model. By convention, with SJS, the name of the componant is prefixed by the name of the model. In the following example SJS automatically determines that the form uses the entity "Company"

form 'Company.pane', ...

validationModel

RefDomain

This property is SJS specific. It allows to enforce SJS controls without actually assigning a model to the generated view. This is especially useful when overriding the default result table view on collection modules where the table model is determined at runtime.

icon

String

iconImageURL

Sets the icon image URL of this descriptor. Supported URL protocols include :

  • all JVM supported protocols

  • the jar:/ pseudo URL protocol

  • the classpath:/ pseudo URL protocol

iconWidth

Integer

iconPreferredWidth

Allows to define a custom width for the icon. In that case, the default dimension computed by the view factory is ignored.

iconHeight

Integer

iconPreferredHeight

Allows to define a custom height for the icon. In that case, the default dimension computed by the view factory is ignored.

styleName

String

Assigns the style name to use for this view. The way it is actually leveraged depends on the UI channel. It will generally be mapped to some sort of CSS style name. Default value is null, meaning that a default style is used.

name

String

Sets the name of this descriptor. Name is used in conjunction with the Jspresso i18n layer so that the name property set here is actually an i18n key used for translation.

description

String

Sets the description of this descriptor. Most of the descriptor descriptions are used in conjunction with the Jspresso i18n layer so that the description property set here is actually an i18n key used for translation. Description is mainly used for UI (in tooltips for instance) but may also be used for project technical documentation, contextual help, ...

i18nNameKey

String

Sets i18n key used for translation if it is different from the description

actionMap

RefActionMap

Assigns the view action map on top of the view. An action map is generally represented as a toolbar attached to the view. The toolbar follows the structure of the action map :

  • each action list is contained in its own toolbar section which is visually separated from the other sections. This allows for visually grouping related actions as they are grouped in the action lists.

  • each action contained in an action list is represented by a toolbar button using the action image as icon and translated action description as tooltip.

Depending on the UI channel, the view action map may also be replicated in a component contextual menu. In that case, the translated action name is used to label each menu item. The same grouping rules apply for the contextual menu than for the toolbar.

secondaryActionMap

RefActionMap

Assigns the view a secondary action map at the bottom of the view

readOnly

Boolean

Allows to set a view read-only, i.e. none of the view part will allow for updating the underlying model. This is mainly a shortcut to assigning an "always closed" writability gate. One difference though is that , since the framework knows that the view will never be updatable, it may take specific decisions to render properties in a slightly different way, e.g. instead of using a disabled textfied, use a label. Default value is false, i.e. view is updatable.

background

String

Sets the background color of the UI component. The color must be defined using its string hexadecimal representation (0xrgba encoded) Default value is null, meaning use UI default.

foreground

String

Sets the foreground color of the UI component. The color must be defined using its string hexadecimal representation (0xrgba encoded) Default value is null, meaning use UI default.

font

String

Allows to customize the font used by the UI component. The font must be string encoded using the pattern "[name];[style];[size]" :

  • [name] is the name of the font, e.g. arial.

  • [style] is PLAIN, BOLD, ITALIC or a union of BOLD and ITALIC combined with the "**" character, e.g. BOLD**ITALIC.

  • [size] is the size of the font, e.g. 10.

Any of the above pattern section can be left empty, thus falling back to the component default. Default value is null, meaning use default component font.

borderType

String

Sets the border type of the view. This is either a value of the EBorderType enum or its equivalent string representation :

  • NONE for no border

  • SIMPLE for a line border

  • TITLED for a titled border. The view is then labeled with its translated name and and icon. Whenever the view name has not been explicitely set, the model name is used is used.

Default value is EBorderType.NONE, i.e. no border.

preferredWidth

Integer

Allows to set a preferred width (in pixels) for the created peer UI component. This will override default and give hints to the UI layouting system.

preferredHeight

Integer

Allows to set a preferred height (in pixels) for the created peer UI component. This will override default and give hints to the UI layouting system.

paramSets

ListOfString

paramSets makes it possible to use a list of paramSet. The properties declared in the paramSet come to be added to the properties of the current descriptor. The properties brought by the paramSet can be overridden by the current descriptor. If a property is overridden with the null value the property is ignored.


III.1.2.3. commonMobile

  • extend : Security

  • Inherited properties : permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

This descriptor is an internal s SJS descriptor which is never used by the application. It s used by SJS to factorize commons properties for mobile views.

Table III.4. commonMobile properties

PropertyDescription

model

RefDomain

modelDescriptor

Assigns the model descriptor backing the view. The model descriptor serves several purposes :

  • configuration of the view content. For instance whenever a form is assigned a component model descriptor, it will install 1 field per component rendering properties, unless otherwise specified in the view descriptor itself.

  • configuration of the binding layer. There is no need for the developer to configure anything for the binding to occur between the view and the model. Based on their model descriptor, Jspresso will setup all the necessary plumbing to efficiently synchronize model properties with their view couterpart bi-directionally. This synchronization occurs implicitely using the observer pattern and one of the Jspresso key contract is to guarantee this synchronization seamlessly.

Although it is the developer responsibility to make sure the correct model descriptor is assigned to the view, there are cases where the framework will infer it. For instance, a composite view will by default transmit its model descriptor to its children that do not have their model descriptor explicitely set. This allows for setting the model descriptor only on the composite view and keep default null value on the children as an implicite model inheritance enablement. Most of the time it is not necessary to explicitly use the property model. By convention, with SJS, the name of the componant is prefixed by the name of the model. In the following example SJS automatically determines that the form uses the entity "Company"

form 'Company.pane', ...

validationModel

RefDomain

This property is SJS specific. It allows to enforce SJS controls without actually assigning a model to the generated view. This is especially useful when overriding the default result table view on collection modules where the table model is determined at runtime.

icon

String

iconImageURL

Sets the icon image URL of this descriptor. Supported URL protocols include :

  • all JVM supported protocols

  • the jar:/ pseudo URL protocol

  • the classpath:/ pseudo URL protocol

styleName

String

Assigns the style name to use for this view. The way it is actually leveraged depends on the UI channel. It will generally be mapped to some sort of CSS style name. Default value is null, meaning that a default style is used.

name

String

Sets the name of this descriptor. Name is used in conjunction with the Jspresso i18n layer so that the name property set here is actually an i18n key used for translation.

description

String

Sets the description of this descriptor. Most of the descriptor descriptions are used in conjunction with the Jspresso i18n layer so that the description property set here is actually an i18n key used for translation. Description is mainly used for UI (in tooltips for instance) but may also be used for project technical documentation, contextual help, ...

i18nNameKey

String

Sets i18n key used for translation if it is different from the description

actionMap

RefActionMap

Assigns the view action map on top of the view. An action map is generally represented as a toolbar attached to the view. The toolbar follows the structure of the action map :

  • each action list is contained in its own toolbar section which is visually separated from the other sections. This allows for visually grouping related actions as they are grouped in the action lists.

  • each action contained in an action list is represented by a toolbar button using the action image as icon and translated action description as tooltip.

Depending on the UI channel, the view action map may also be replicated in a component contextual menu. In that case, the translated action name is used to label each menu item. The same grouping rules apply for the contextual menu than for the toolbar.

secondaryActionMap

RefActionMap

Assigns the view a secondary action map at the bottom of the view

readOnly

Boolean

Allows to set a view read-only, i.e. none of the view part will allow for updating the underlying model. This is mainly a shortcut to assigning an "always closed" writability gate. One difference though is that , since the framework knows that the view will never be updatable, it may take specific decisions to render properties in a slightly different way, e.g. instead of using a disabled textfied, use a label. Default value is false, i.e. view is updatable.

borderType

String

Sets the border type of the view. This is either a value of the EBorderType enum or its equivalent string representation :

  • NONE for no border

  • SIMPLE for a line border

  • TITLED for a titled border. The view is then labeled with its translated name and and icon. Whenever the view name has not been explicitely set, the model name is used is used.

Default value is EBorderType.NONE, i.e. no border.

paramSets

ListOfString

paramSets makes it possible to use a list of paramSet. The properties declared in the paramSet come to be added to the properties of the current descriptor. The properties brought by the paramSet can be overridden by the current descriptor. If a property is overridden with the null value the property is ignored.


III.1.2.4. mobileSection

Defines a page section that can be aggregated in a composite page.

Table III.5. mobileSection properties

PropertyDescription

position

String

Allows define where, if the layout allows it, to drop the page section in the composite page. Allowed values are LEFT, RIGHT, TOP or BOTTOM

clientTypes

ListOfString

forClientTypes

Gets the restricted list of client types that will display this property view. Defaults to null, which means no restriction. The provided list is not empty, then the actual session client type is matched against each of the restricted client type with either equal or substring or regexp semantic. Allowed values are DESKTOP_SWING, DESKTOP_FLEX, DESKTOP_HTML5, MOBILE_HTML5_TABLET, MOBILE_HTML5_PHONE or any substring or regex like DEFKTOP, MOBILE, HTML5, ...


III.1.2.5. mobilePageAware

  • extend : mobileSection

  • Inherited properties : position, clientTypes

This descriptor is an internal s SJS descriptor which is never used by the application. It s used by SJS to factorize commons properties for views that can react to common page interactions.

Table III.6. mobilePageAware properties

PropertyDescription

mainAction

RefAction

Installs the main action for the page. It is generally displayed in the page main toolbar, i.e. top right.

enterAction

RefAction

Configures an action to be trigerred when the user enters the page.

backAction

RefAction

Configures an action to be trigerred when the user leaves the page using the back button of the main toolbar.

pageEndAction

RefAction

Configures an action to be trigerred when the user scrolls to the end of the page.

swipeLeftAction

RefAction

Configures an action to be trigerred when the user swipes the page left.

swipeRightAction

RefAction

Configures an action to be trigerred when the user swipes the page right.


III.1.3. View

III.1.3.1. abstractChart

This descriptor is an internal s SJS descriptor which is never used by the application.It is used by SJS to factorize charts properties. Charts in Jspresso are very similar to table collection view in the way they are defined.

Table III.7. abstractChart properties

PropertyDescription

parent

RefView

Allows to use an other descriptor as a model and to override certain properties.

label

RefField

Configures the model property name to use as label field on the chart.

legend

Boolean

legendVisible

Configures the visibility of the legend block on the chart. Default value is true, which means that a legend block is created and visible.

rowAction

RefAction

Registers an action that is implicitely triggered everytime the user activates a series (e.g. double-clicked for current UI channels) on the chart view UI peer. The context of the action execution is the same as if the action was registered in the view action map.

itemSelectionAction

RefAction

Registers an action that is implicitely triggered everytime the user selects a series. The context of the action execution is the same as if the action was registered in the view action map.

autoSelectFirstRow

Boolean

Configures the default selection that gets applied when the content of the collection view changes. Whenever set to true, the 1st row will be automatically selected, whereas nothing happens whe set to false. The default value depends on the selection mode of the collection view. When a cumulative selection mode is used, autoSelectFirstRow defaults to false. It defaults to true otherwise.


abstractPolarChart

Defines at pie chart.

Table III.8. abstractPolarChart properties

PropertyDescription

pieSeries

RefField

Configures the unique series to use for the pie chart.


abstractCartesianChart

Defines a 2+ dimensional chart.

Table III.9. abstractCartesianChart properties

PropertyDescription

lineSeries

ListOfField

Defines a list of properties to use as line series.

columnSeries

ListOfField

Defines a list of properties to use as column series.

barSeries

ListOfField

Defines a list of properties to use as bar series.

plotSeries

ListOfField

Defines a list of properties to use as plot series.

areaSeries

ListOfField

Defines a list of properties to use as area series.

orientation

String

Configures the orientation of the chart, i.e. wheteher the value axis is the horizontal or vertical one. This is either a value of the EOrientation enum or its equivalent string representation :

  • VERTICAL for a vertical value axis

  • HORIZONAL for an horizontal value axis

Default value is EOrientation.VERTICAL, i.e. the value axis is the vertical one.

axisMinValue

Integer

Configures the value axis minimum value that is displayed in the chart. If not set, which is the default, the chart adapts the axis minimum value depending on the data it has to display.

axisMaxValue

Integer

Configures the value axis maximum value that is displayed in the chart. If not set, which is the default, the chart adapts the axis maximum value depending on the data it has to display.

chartType

String

type

Configures the way the series are displayed in the chart. This is either a value of the EBarChartType enum or its equivalent string representation :

  • CLUSTERED the series are drawn side by side

  • OVERLAID the series are drawn on each other

  • STACKED the series are drawn additively

  • STACKED_PERCENT the series are drawn additively based on their percentage of the total value of all series

Default value is EBarChartType.CLUSTERED, i.e. the series are drawn side by side.


chart
  • extend : common, abstractChart

  • Inherited properties : model, validationModel, icon, iconWidth, iconHeight, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates, parent, label, legend, rowAction, itemSelectionAction, autoSelectFirstRow

descriptor for charts

Table III.10. chart properties

PropertyDescription
This class does not have any specific named property.

polarChart
  • extend : chart, abstractPolarChart

  • Inherited properties : model, validationModel, icon, iconWidth, iconHeight, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates, parent, label, legend, rowAction, itemSelectionAction, autoSelectFirstRow, pieSeries

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center

  • allowed next element : pieSeries, actionMap, secondaryActionMap

  • Jspresso : PieChartDescriptor

descriptor for pie charts

Table III.11. polarChart properties

PropertyDescription
This class does not have any specific named property.

cartesianChart
  • extend : chart, abstractCartesianChart

  • Inherited properties : model, validationModel, icon, iconWidth, iconHeight, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates, parent, label, legend, rowAction, itemSelectionAction, autoSelectFirstRow, lineSeries, columnSeries, barSeries, plotSeries, areaSeries, orientation, axisMinValue, axisMaxValue, chartType

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center

  • allowed next element : lineSeries, barSeries, plotSeries, areaSeries, actionMap, secondaryActionMap

  • Jspresso : BarChartDescriptor

descriptor for cartesian charts

Table III.12. cartesianChart properties

PropertyDescription
This class does not have any specific named property.

mobileChart
  • extend : commonMobile, mobileSection, abstractChart

  • Inherited properties : model, validationModel, icon, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, borderType, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates, position, clientTypes, parent, label, legend, rowAction, itemSelectionAction, autoSelectFirstRow

descriptor for charts

Table III.13. mobileChart properties

PropertyDescription
This class does not have any specific named property.

mobilePolarChart
  • extend : mobileChart, abstractPolarChart

  • Inherited properties : model, validationModel, icon, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, borderType, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates, position, clientTypes, parent, label, legend, rowAction, itemSelectionAction, autoSelectFirstRow, pieSeries

  • allowed previous element : Front, sections, headerSections, east, west, south, north, center

  • allowed next element : pieSeries, actionMap, secondaryActionMap

  • Jspresso : MobilePieChartDescriptor

descriptor for pie charts

Table III.14. mobilePolarChart properties

PropertyDescription
This class does not have any specific named property.

mobileCartesianChart
  • extend : mobileChart, abstractCartesianChart

  • Inherited properties : model, validationModel, icon, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, borderType, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates, position, clientTypes, parent, label, legend, rowAction, itemSelectionAction, autoSelectFirstRow, lineSeries, columnSeries, barSeries, plotSeries, areaSeries, orientation, axisMinValue, axisMaxValue, chartType

  • allowed previous element : Front, sections, headerSections, east, west, south, north, center

  • allowed next element : lineSeries, barSeries, plotSeries, areaSeries, actionMap, secondaryActionMap

  • Jspresso : MobileBarChartDescriptor

descriptor for cartesian charts

Table III.15. mobileCartesianChart properties

PropertyDescription
This class does not have any specific named property.

commonCartesianSeries

This descriptor is an internal s SJS descriptor which is never used by the application.It is used by SJS to factorize chart series properties. Charts series in Jspresso are very similar to property views in the way they are defined.

Table III.16. commonCartesianSeries properties

PropertyDescription

valueField

RefField

Configures the model property name to be used as series value. It must obviously be a numeric property.

i18nNameKey

String

Sets i18n key used for translation if it is different from the description

background

String

Sets the background color (except for the pie series which actually needs a list of colors) of the series. Each color must be defined using its string hexadecimal representation (0xrgba encoded) Default value is null, meaning use UI default.

foreground

String

Sets the foreground color of the series. Each color must be defined using its string hexadecimal representation (0xrgba encoded) Default value is null, meaning use UI default.

labelBackground

String

Defines the background color of the series label. The color must be defined using its string hexadecimal representation (0xrgba encoded). Default value is null, meaning use UI default.

labelFont

String

Defines the background font of the series label. The font must be string encoded using the pattern "[name];[style];[size]" :

  • [name] is the name of the font, e.g. arial.

  • [style] is PLAIN, BOLD, ITALIC or a union of BOLD and ITALIC combined with the "**" character, e.g. BOLD**ITALIC.

  • [size] is the size of the font, e.g. 10.

Any of the above pattern section can be left empty, thus falling back to the component default. Default value is null, meaning use default series font.

labelForeground

String

Defines the foreground color of the series label. The color must be defined using its string hexadecimal representation (0xrgba encoded). Default value is null, meaning use UI default.

action

RefAction

Configures an action to be triggered when the user clicks on a series item. It is the equivalent of actions defined on table columns.


lineSeries
  • extend : commonCartesianSeries

  • Inherited properties : valueField, i18nNameKey, background, foreground, labelBackground, labelFont, labelForeground, action

  • allowed previous element : cartesianChart, mobileCartesianChart

  • Jspresso : LineSeriesDescriptor

Defines a line series.

Table III.17. lineSeries properties

PropertyDescription
This class does not have any specific named property.

barSeries
  • extend : commonCartesianSeries

  • Inherited properties : valueField, i18nNameKey, background, foreground, labelBackground, labelFont, labelForeground, action

  • allowed previous element : cartesianChart, mobileCartesianChart

  • Jspresso : BarSeriesDescriptor

Defines a bar series.

Table III.18. barSeries properties

PropertyDescription
This class does not have any specific named property.

plotSeries
  • extend : commonCartesianSeries

  • Inherited properties : valueField, i18nNameKey, background, foreground, labelBackground, labelFont, labelForeground, action

  • allowed previous element : cartesianChart, mobileCartesianChart

  • Jspresso : PlotSeriesDescriptor

Defines a plot series.

Table III.19. plotSeries properties

PropertyDescription
This class does not have any specific named property.

areaSeries
  • extend : commonCartesianSeries

  • Inherited properties : valueField, i18nNameKey, background, foreground, labelBackground, labelFont, labelForeground, action

  • allowed previous element : cartesianChart, mobileCartesianChart

  • Jspresso : AreaSeriesDescriptor

Defines a area series.

Table III.20. areaSeries properties

PropertyDescription
This class does not have any specific named property.

pieSeries
  • allowed previous element : polarChart, mobilePolarChart

  • Jspresso : PieSeriesDescriptor

Declares a series to be used for pie charts.

Table III.21. pieSeries properties

PropertyDescription

valueField

RefField

Configures the model property name to be used as series value. It must obviously be a numeric property.

i18nNameKey

String

Sets i18n key used for translation if it is different from the description

background

ListOfString

Sets the background colors (actually a list of colors) of the Series. Each color must be defined using its string hexadecimal representation (0xrgba encoded) Default value is null, meaning use UI default.

labelBackground

String

Defines the background color of the series label. The color must be defined using its string hexadecimal representation (0xrgba encoded). Default value is null, meaning use UI default.

labelFont

String

Defines the background font of the series label. The font must be string encoded using the pattern "[name];[style];[size]" :

  • [name] is the name of the font, e.g. arial.

  • [style] is PLAIN, BOLD, ITALIC or a union of BOLD and ITALIC combined with the "**" character, e.g. BOLD**ITALIC.

  • [size] is the size of the font, e.g. 10.

Any of the above pattern section can be left empty, thus falling back to the component default. Default value is null, meaning use default series font.

labelForeground

String

Defines the foreground color of the series label. The color must be defined using its string hexadecimal representation (0xrgba encoded). Default value is null, meaning use UI default.

action

RefAction

Configures an action to be triggered when the user clicks on a pie sector. It is the equivalent of actions defined on table columns.


III.1.3.2. form

  • extend : common

  • Inherited properties : model, validationModel, icon, iconWidth, iconHeight, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center

  • allowed next element : fields, actionMap, secondaryActionMap

  • Jspresso : BasicComponentViewDescriptor

form descriptors are surely one of the most commonly used view descriptors in Jspresso. It allows to implement advanced form-like views to interact with a single component model. Component properties that are displayed in the view are organized in an invisible grid. Each field component is labelled with the property name it displays and labels can be configured to be displayed aside or above their peer field. Property fields can be configured to span multiple form columns. Component view offer various straightforward customizations, but the most advanced and prowerful one is definitely the propertyView property that allows to fine-tune each component UI field individually in a fields list.

Table III.22. form properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

labelsPosition

String

Instructs Jspresso where to place the fields label. This is either a value of the ELabelPosition enum or its equivalent string representation :

  • ABOVE for placing each field label above the property UI component

  • ASIDE for placing each field label aside the property UI component

  • NONE for completely disabling fields labelling on the view

Default value is ELabelPosition.ASIDE, i.e. fields label next to the property UI component.

labelsHorizontalPosition

String

When labels are positionned ASIDE, you can decide where to place them. This is either a value of the EHorizontalPosition enum or its equivalent string representation :

  • LEFT for placing each field label at the left of the property UI component

  • RIGHT for placing each field label at the right of the property UI component

Default value is ELabelPosition.LEFT, i.e. fields label at the left of the property UI component.

labelFont

String

Defines the font used for the labels of form. The font must be string encoded using the pattern "[name];[style];[size]" :

  • [name] is the name of the font, e.g. arial.

  • [style] is PLAIN, BOLD, ITALIC or a union of BOLD and ITALIC combined with the "**" character, e.g. BOLD**ITALIC.

  • [size] is the size of the font, e.g. 10.

Any of the above pattern section can be left empty, thus falling back to the component default. Whenever this property is set, it can be overridden on a field basis using a nested property view definition. Default value is null, meaning use default series font.

valueFont

String

Defines the font used for the values of the form. The font must be string encoded using the pattern "[name];[style];[size]" :

  • [name] is the name of the font, e.g. arial.

  • [style] is PLAIN, BOLD, ITALIC or a union of BOLD and ITALIC combined with the "**" character, e.g. BOLD**ITALIC.

  • [size] is the size of the font, e.g. 10.

Any of the above pattern section can be left empty, thus falling back to the component default. Whenever this property is set, it can be overridden on a field basis using a nested property view definition. Default value is null, meaning use default series font.

columnCount

Integer

Configures the number of columns on this component view. Property fields that are to be displayed in the view are spread across columns and rows following their defined order. Whenever a row does not contain enough empty cells to recieve the next field (either because the last column has been reached or the next field has been configured to span multiple columns and there is not enough cells left in the current row to satisfty the span), a new row is created and the next field is added to the first column on the new row. Note that column count and span are defined in fields coordinates (the field including the property UI component + its label). The underlying grid is actually finer since it has to cope with the labels; but this is internal implementation details and Jspresso takes care of it, without the developer having to cope with labels placements. Default value is 1, meaning that all rendered fields will be stacked in a single column.

fields

ListOfField

renderedProperties

Determines which of the referenced component fields should be displayed The property must be configured with a List of fields to display A null value (default), means that all non-scalar properties will be rendered using default rendered properties as specified in their referenced model descriptor.

widths

Map

propertyWidths

This property allows to simply define property spans in the underlying grid without having to extensively define the propertyViewDescriptors property. It must be configued with a Map containing only the properties that need to span more than 1 column. The other properties will follow the default span of 1. The Map is :

  • keyed by the name of the property

  • valued by the number of columns of the property span

Default value is null, meaning all property fields have a span of 1.

verticallyScrollable

Boolean

Tells wether vertical scrollbar should be installed in case there is not enough room.

widthResizeable

Boolean

Tells wether horizontal space is filled when available.


mobileForm
  • extend : commonMobile, mobileSection

  • Inherited properties : model, validationModel, icon, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, borderType, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates, position, clientTypes

  • allowed previous element : Front, sections, headerSections, east, west, south, north, center

  • allowed next element : fields, actionMap, secondaryActionMap

  • Jspresso : MobileComponentViewDescriptor

form descriptors are surely one of the most commonly used view descriptors in Jspresso. It allows to implement advanced form-like views to interact with a single component model. Component properties that are displayed in the view are organized in an invisible grid. Each field component is labelled with the property name it displays and labels can be configured to be displayed aside or above their peer field. Property fields can be configured to span multiple form columns. Component view offer various straightforward customizations, but the most advanced and prowerful one is definitely the propertyView property that allows to fine-tune each component UI field individually in a fields list.

Table III.23. mobileForm properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

labelsPosition

String

Instructs Jspresso where to place the fields label. This is either a value of the ELabelPosition enum or its equivalent string representation :

  • ABOVE for placing each field label above the property UI component

  • ASIDE for placing each field label aside the property UI component

  • NONE for completely disabling fields labelling on the view

Default value is ELabelPosition.ASIDE, i.e. fields label next to the property UI component.

fields

ListOfField

Determines which of the referenced component fields should be displayed The property must be configured with a List of fields to display A null value (default), means that all non-scalar properties will be rendered using default rendered properties as specified in their referenced model descriptor.

excludedReading

ListOfField

excludedReadingProperties

Allows to exclude a list of properties from the read-only form.

excludedWriting

ListOfField

ecludedWritingProperties

Allows to exclude a list of properties from the editor form.


III.1.3.3. mapView

  • extend : common

  • Inherited properties : model, validationModel, icon, iconWidth, iconHeight, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center

  • allowed next element : actionMap, secondaryActionMap

  • Jspresso : BasicMapViewDescriptor

A map is a view that displays a map and allows to bind to longitude and latitude coordinates taken from its model.

Table III.24. mapView properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

longitude

RefField

longitudeProperty

the model property name that returns the longitude coordinate of the marker to display on the map.

latitude

RefField

latitudeProperty

the model property name that returns the latitude coordinate of the marker to display on the map.


mobileMapView
  • extend : commonMobile, mobileSection

  • Inherited properties : model, validationModel, icon, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, borderType, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates, position, clientTypes

  • allowed previous element : Front, sections, headerSections, east, west, south, north, center

  • allowed next element : actionMap, secondaryActionMap

  • Jspresso : MobileMapViewDescriptor

A mobile map is a mobile page that displays a map and allows to bind to longitude and latitude coordinates taken from its model.

Table III.25. mobileMapView properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

longitude

RefField

longitudeProperty

the model property name that returns the longitude coordinate of the marker to display on the map.

latitude

RefField

latitudeProperty

the model property name that returns the latitude coordinate of the marker to display on the map.


III.1.3.4. fields

  • allowed previous element : form, mobileForm

  • allowed next element : propertyView, stringPropertyView, referencePropertyView, enumerationPropertyView, image, html

Open a list of propertyView to individually fine-tunes each field in a form

Table III.26. fields properties

PropertyDescription
This class does not have any specific named property.

III.1.3.5. table

  • extend : common

  • Inherited properties : model, validationModel, icon, iconWidth, iconHeight, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center

  • allowed next element : columns, actionMap, secondaryActionMap, rowAction, itemSelectionAction, sortingAction

  • Jspresso : BasicTableViewDescriptor

This descriptor is used to implement a table view. This is certainly the most commonly used collection descriptor in Jspresso. A table view displays a collection of components (one row per component in the collection) detailed by a set of properties (one column per displayed component property). The table view will automatically adapt its columuns depending on the underlying property descriptors, e.g. :

  • columns for read-only properties won't be editable

  • columns that are assigned writability gates will compute the editability of their cells based on each cell's gates

  • columns will adapt their renderer/editor based on the underlying property type, e.g. a calendar component will be used for dates

  • column titles will be filled with property names translations based on the user locale

  • mandatory properties will be visually indicated

  • ...

A table view provides sensible defaults regarding its configuration, but it can be refined using either the simple rendered property or the more advanced yet lot more powerful columns declaration that opens a list of propertyView to individually fine-tunes each column

Table III.27. table properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

columns

ListOfField

renderedProperties

Determines which of the referenced component properties should be displayed as columns of the table The property must be configured with a List of columns to display A null value (default), means that all non-scalar properties will be rendered using default rendered properties as specified in their referenced model descriptor.

horizontallyScrollable

Boolean

This property allows to define the table horizontal scrolling behaviour. Whenever it is set to false, the corresponding table UI component will adapt its columns to fit the available horizontal space. Default value is true, i.e. table columns will have their default size and tha table will scroll horizontally as needed

sortable

Boolean

This property allows to define the table sorting behaviour. Whenever it is set to false, the corresponding table UI component will not allow manual sorting of its rows. Default value is true, i.e. table allows for its rows to be sorted

columnReordering

Boolean

columnReorderingAllowed

Configures if the table columns can be re-ordered by the user.

selectionMode

String

Sets the selection mode of the collection view.

  • MULTIPLE_INTERVAL_SELECTION for allowing any type of selection

  • MULTIPLE_INTERVAL_CUMULATIVE_SELECTION for allowing any type of selection with toggle behaviour

  • SINGLE_INTERVAL_SELECTION for allowing only contiguous interval selection

  • SINGLE_INTERVAL_CUMULATIVE_SELECTION for allowing only contiguous interval selection with toggle behaviour

  • SINGLE_SELECTION for allowing only a single item selection

Default value MULTIPLE_INTERVAL_SELECTION, i.e. any type of selection allowed.

rowAction

RefAction

Registers an action that is implicitely triggered everytime a row is activated (e.g. double-clicked for current UI channels) on the collection view UI peer. The context of the action execution is the same as if the action was registered in the view action map.

itemSelectionAction

RefAction

Registers an action that is implicitely triggered everytime the selection changes on the collection view UI peer. The context of the action execution is the same as if the action was registered in the view action map.

autoSelectFirstRow

Boolean

Configures the default selection that gets applied when the content of the collection view changes. Whenever set to true, the 1st row will be automatically selected, whereas nothing happens whe set to false. The default value depends on the selection mode of the collection view. When a cumulative selection mode is used, autoSelectFirstRow defaults to false. It defaults to true otherwise.

sortingAction

RefAction

Configures the action to be activated when a sort is triggered by the user. It should be used with caution and rarely be overriden from the default.

paginationView

RefView

paginationViewDescriptor

Configures a view that will control the pagination (if any) on this collection view. When contructed, the collection view will be decorated with the pagination view. The pagination view will be bound to the same model as the one providing the collection of the collection view.

selectionModel

RefDomain

selectionModelDescriptor

Bi-directionally binds the collection view selection to a model collection. Selected items in the view are kept in sync with the bound model collection.


III.1.3.6. listView

  • extend : common

  • Inherited properties : model, validationModel, icon, iconWidth, iconHeight, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center

  • allowed next element : actionMap, secondaryActionMap, rowAction, itemSelectionAction

  • Jspresso : BasicListViewDescriptor

This type of descriptor is used to implement a list view. A list view is a single column, uneditable collection view used to display a collection of components. Each item is displayed using a string representation that can be customized using the renderedProperty property. List views are rarely used since one might prefer its much more advanced cousin, i.e. the table view. Despite its low usage as an individual UI component, the list view is also used by Jspresso to describe tree parts. A collection of sibling tree nodes can actually be considered as being a list view and can be described as such. In the latter case, the renderedProperty property will be used to label the tree nodes.

Table III.28. listView properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

iconProvider

RefBean

iconImageURLProvider

The icon image URL provider is the delegate responsible for inferring a tree node icon based on its underlying model. By default (i.e. when iconImageURLProvider is null), Jspresso will use the underlying component descriptor icon, if any. Using a custom icon image URL provider allows to implement finer rules like using different icons based on the underlying object state. There is a single method to implement to achieve this : String getIconImageURLForObject(Object userObject);

rendered

RefField

renderedProperty

Configures the model property to be rendered in the list. Whenever this property is left to null (default value), the toStringProperty of the element component descriptor is used.

selectionMode

String

Sets the selection mode of the collection view.

  • MULTIPLE_INTERVAL_SELECTION for allowing any type of selection

  • MULTIPLE_INTERVAL_CUMULATIVE_SELECTION for allowing any type of selection with toggle behaviour

  • SINGLE_INTERVAL_SELECTION for allowing only contiguous interval selection

  • SINGLE_INTERVAL_CUMULATIVE_SELECTION for allowing only contiguous interval selection with toggle behaviour

  • SINGLE_SELECTION for allowing only a single item selection

Default value MULTIPLE_INTERVAL_SELECTION, i.e. any type of selection allowed.

rowAction

RefAction

Registers an action that is implicitely triggered everytime a row is activated (e.g. double-clicked for current UI channels) on the collection view UI peer. The context of the action execution is the same as if the action was registered in the view action map.

itemSelectionAction

RefAction

Registers an action that is implicitely triggered everytime the selection changes on the collection view UI peer. The context of the action execution is the same as if the action was registered in the view action map.

autoSelectFirstRow

Boolean

Configures the default selection that gets applied when the content of the collection view changes. Whenever set to true, the 1st row will be automatically selected, whereas nothing happens whe set to false. The default value depends on the selection mode of the collection view. When a cumulative selection mode is used, autoSelectFirstRow defaults to false. It defaults to true otherwise.

paginationView

RefView

paginationViewDescriptor

Configures a view that will control the pagination (if any) on this collection view. When contructed, the collection view will be decorated with the pagination view. The pagination view will be bound to the same model as the one providing the collection of the collection view.

selectionModel

RefDomain

selectionModelDescriptor

Bi-directionally binds the collection view selection to a model collection. Selected items in the view are kept in sync with the bound model collection.

displayIcon

Boolean

Configures wether the list displays icons for its elements.


mobileListView
  • extend : commonMobile

  • Inherited properties : model, validationModel, icon, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, borderType, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • allowed previous element : Front, selection

  • allowed next element : actionMap, secondaryActionMap, itemSelectionAction

  • Jspresso : MobileListViewDescriptor

This type of descriptor is used to implement a list view. A list view is a single column, uneditable collection view used to display a collection of components. Each item is displayed using a string representation that can be customized using the renderedProperty property. List views are rarely used since one might prefer its much more advanced cousin, i.e. the table view. Despite its low usage as an individual UI component, the list view is also used by Jspresso to describe tree parts. A collection of sibling tree nodes can actually be considered as being a list view and can be described as such. In the latter case, the renderedProperty property will be used to label the tree nodes.

Table III.29. mobileListView properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

iconProvider

RefBean

iconImageURLProvider

The icon image URL provider is the delegate responsible for inferring a tree node icon based on its underlying model. By default (i.e. when iconImageURLProvider is null), Jspresso will use the underlying component descriptor icon, if any. Using a custom icon image URL provider allows to implement finer rules like using different icons based on the underlying object state. There is a single method to implement to achieve this : String getIconImageURLForObject(Object userObject);

rendered

RefField

renderedProperty

Configures the model property to be rendered in the list. Whenever this property is left to null (default value), the toStringProperty of the element component descriptor is used.

selectionMode

String

Sets the selection mode of the collection view.

  • MULTIPLE_INTERVAL_SELECTION for allowing any type of selection

  • MULTIPLE_INTERVAL_CUMULATIVE_SELECTION for allowing any type of selection with toggle behaviour

  • SINGLE_INTERVAL_SELECTION for allowing only contiguous interval selection

  • SINGLE_INTERVAL_CUMULATIVE_SELECTION for allowing only contiguous interval selection with toggle behaviour

  • SINGLE_SELECTION for allowing only a single item selection

Default value MULTIPLE_INTERVAL_SELECTION, i.e. any type of selection allowed.

rowAction

RefAction

Registers an action that is implicitely triggered everytime a row is activated (e.g. double-clicked for current UI channels) on the collection view UI peer. The context of the action execution is the same as if the action was registered in the view action map.

itemSelectionAction

RefAction

Registers an action that is implicitely triggered everytime the selection changes on the collection view UI peer. The context of the action execution is the same as if the action was registered in the view action map.

paginationView

RefView

paginationViewDescriptor

Configures a view that will control the pagination (if any) on this collection view. When contructed, the collection view will be decorated with the pagination view. The pagination view will be bound to the same model as the one providing the collection of the collection view.

selectionModel

RefDomain

selectionModelDescriptor

Bi-directionally binds the collection view selection to a model collection. Selected items in the view are kept in sync with the bound model collection.

showArrow

Boolean

Configures a boolean indicating if the mobile list view should display an arrow next to each item. Such an arrow indicates that the user can navigate to another page when clicking a list item.

displayIcon

Boolean

Configures wether the list displays icons for its elements.


III.1.3.7. columns

  • allowed previous element : table

  • allowed next element : propertyView, stringPropertyView, referencePropertyView, enumerationPropertyView, image, html

Open a list of propertyView to individually fine-tunes each column in a table

Table III.30. columns properties

PropertyDescription
This class does not have any specific named property.

III.1.3.8. propertyView

  • extend : common

  • Inherited properties : model, validationModel, icon, iconWidth, iconHeight, styleName, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center, cells, columns, fields

  • allowed next element : actionMap, secondaryActionMap

  • Jspresso : BasicPropertyViewDescriptor

This view descriptor serves 2 purposes :

  • configure complex, component based views : refine columns of table views and fields of form views.

  • display a single property as an autonomous view, i.e. not as a table column or a form field.

The second usage might be a little bit unusual, but here is a use-case scenario : display a text area which maps a text property that contains XML content. This text area must be displayed in a split pane and provide actions to interact directly with the FS (save content to a file, load content from a file, ...). In that case, defining a property view alone on the text property of the owning component might be a good solution.

Table III.31. propertyView properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

ref

RefView

Allows to reference an existing property view using its identifier.

name

RefField

Sets the name of this descriptor. Name is used in conjunction with the Jspresso i18n layer so that the name property set here is actually an i18n key used for translation.

width

Integer

When the property has to be displayed in a grid-like layout (e.g. in a component view), this property defines the umber of grid columns the corresponding UI component will span.

Default value is null, meaning use default span of 1

labelBackground

String

When the property has to be labelled (e.g. in a component view), this property defines the background color of the corresponding label. It might differ from the field component one. The color must be defined using its string hexadecimal representation (0xrgba encoded). Default value is null, meaning use UI default.

labelFont

String

When the property has to be labelled (e.g. in a component view), this property defines the font of the corresponding label. It might differ from the field component one. The font must be string encoded using the pattern "[name];[style];[size]" :

  • [name] is the name of the font, e.g. arial.

  • [style] is PLAIN, BOLD, ITALIC or a union of BOLD and ITALIC combined with the "**" character, e.g. BOLD**ITALIC.

  • [size] is the size of the font, e.g. 10.

Any of the above pattern section can be left empty, thus falling back to the component default. Default value is null, meaning use default component font.

labelForeground

String

When the property has to be labelled (e.g. in a component view), this property defines the foregroud color of the corresponding label. It might differ from the field component one. The color must be defined using its string hexadecimal representation (0xrgba encoded). Default value is null, meaning use UI default.

labelHorizontalPosition

String

When labels are positionned ASIDE in a form, you can decide where to place them relatively to their component. This is either a value of the EHorizontalPosition enum or its equivalent string representation :

  • LEFT for placing field label at the left of the property UI component

  • RIGHT for placing field label at the right of the property UI component

Default value is ELabelPosition.LEFT, i.e. field label at the left of the property UI component.

action

RefAction

Configures the action to be triggered when acting on this property. There are 2 cases :

  • If the property is read-only, then assigning an action turns the property into a clickable hyperlink.

  • If the property is read-write, the registered action will be trigerred when the user changes the value of the field. Note thet in that case, the action is executed after the model has been updated. However the old property value can be retrieved from the context action param.

renderedChildProperties

ListOfField

Whenever the property decriptor backing the view is not scalar, this property allows to override which of the referenced component fields should be displayed :

  • as columns when the rendered property is a collection property

  • as fields when the rendered property is a reference property

The property must be configured with a List containing the property names to render for the child element(s). A null value (default), means that the non-scalar property will be rendered using default rendered properties as specified in its referenced model descriptor. Please note that this is quite unusual to embed non-scalar properties directly in a property view. Although permitted, you won't have as much flexibility in the content layouting as you would have when using composite views; so the latter is by far recommended.

horizontalAlignment

String

This property allows to control the property alignment in views that support it. This is either a value of the EHorizontalAlignment enum or its equivalent string representation :

  • LEFT for left alignment

  • CENTER for center alignment

  • RIGHT for right alignment

Default value is null, meaning use property type default.

sortable

Boolean

Configure the sortability of a property view when used to defines a table column for instance. Whenever it is not explicitely set, it falls back to the model property sortability. If no model descriptor is set, defaults to true.

clientTypes

ListOfString

forClientTypes

Gets the restricted list of client types that will display this property view. Defaults to null, which means no restriction. The provided list is not empty, then the actual session client type is matched against each of the restricted client type with either equal or substring or regexp semantic. Allowed values are


III.1.3.9. stringPropertyView

  • extend : propertyView

  • Inherited properties : parent, ref, name, width, labelBackground, labelFont, labelForeground, labelHorizontalPosition, action, renderedChildProperties, horizontalAlignment, sortable, clientTypes, model, validationModel, icon, iconWidth, iconHeight, styleName, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center, cells, columns, fields

  • allowed next element : actionMap, secondaryActionMap

  • Jspresso : BasicStringPropertyViewDescriptor

This specialized property view descriptor is used in order to be able to declare an action to be triggered when a character is typed in the UI.

Table III.32. stringPropertyView properties

PropertyDescription

charAction

RefAction

characterAction

Allows to declare an action that will be triggered each time the text changes in the UI.


III.1.3.10. referencePropertyView

  • extend : stringPropertyView

  • Inherited properties : charAction, parent, ref, name, width, labelBackground, labelFont, labelForeground, labelHorizontalPosition, action, renderedChildProperties, horizontalAlignment, sortable, clientTypes, model, validationModel, icon, iconWidth, iconHeight, styleName, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center, cells, columns, fields

  • allowed next element : actionMap, secondaryActionMap

  • Jspresso : BasicReferencePropertyViewDescriptor

This specialized property view descriptor is used in order to be able to refine the "List of values" action that gets automatically installed by Jspresso when a reference property is displayed. You can then customize this action when defining the corresponding column in a table view or field in a component view.

Table III.33. referencePropertyView properties

PropertyDescription

lovAction

RefAction

Allows to override the default "List of values" action attached to this reference property view. A null value (default) keeps the standard action.


III.1.3.11. enumerationPropertyView

  • extend : propertyView

  • Inherited properties : parent, ref, name, width, labelBackground, labelFont, labelForeground, labelHorizontalPosition, action, renderedChildProperties, horizontalAlignment, sortable, clientTypes, model, validationModel, icon, iconWidth, iconHeight, styleName, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center, cells, columns, fields

  • allowed next element : actionMap, secondaryActionMap

  • Jspresso : BasicEnumerationPropertyViewDescriptor

This specialized property view descriptor is used in order to be able to refine the "values" that are taken from the model enumeration. You can configure a set of allowed values from which the user can choose when defining the corresponding column in a table view or field in a component view.

Table III.34. enumerationPropertyView properties

PropertyDescription

allowedValues

ListOfString

Configures an optional allowed set of values to restrict the model ones. Only values belonging to the allowed set should be actually made available as a choice.

forbiddenValues

ListOfString

Configures an optional forbidden set of values to restrict the model ones. Only values not belonging to the forbidden set should be actually made available as a choice.

radio

Boolean

Configures the rendering of the enumeration property as radio buttons if supported instead of combobox. Default value is false.

orientation

String

Configures wether radio values be rendered horizontally or vertically. HORIZONTAL if radio values should be rendered horizontally and VERTICAL otherwise. Default value is VERTICAL.

enumIconWidth

Integer

Configures the with of the icon. If not set, defaults to 16.

enumIconHeight

Integer

Configures the height of the icon. If not set, defaults to 16.


III.1.3.12. image

  • extend : propertyView

  • Inherited properties : parent, ref, name, width, labelBackground, labelFont, labelForeground, labelHorizontalPosition, action, renderedChildProperties, horizontalAlignment, sortable, clientTypes, model, validationModel, icon, iconWidth, iconHeight, styleName, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center, cells, columns, fields

  • allowed next element : actionMap, secondaryActionMap

  • Jspresso : BasicImageViewDescriptor

This type of view descriptor is used to display a binary property or a string property containing an URL as an image. By default, binary properties are rendered as button fields that allow to upload, download and query size of the binary content. This button field visually indicate whether the binary property is empty or not. Whenever you know that the underlying property is used to store image content, you can explicitely define an image view backed by the binary property descriptor and use it in your UI. Jspresso will then display the image whose content is stored in the binary property directly in the UI.

Table III.35. image properties

PropertyDescription

scrollable

Boolean

Configures the image view to be either croped or scrollable when the display area is too small to display it. A value of true (default) means that the image view will be made scrollable.

scaledWidth

Integer

Sets scaled width. This property, when set to a positive integer will force the image width to be resized to the target value. If only one of the 2 scaled dimensions is set, then the image is scaled by preserving its aspect ratio.

scaledHeight

Integer

Sets scaled height. This property, when set to a positive integer will force the image height to be resized to the target value. If only one of the 2 scaled dimensions is set, then the image is scaled by preserving its aspect ratio.

drawable

Boolean

Allows the user to draw on the image and save the result. This can be very useful to capture the user signature as a POD for instance.


III.1.3.13. html

  • extend : propertyView

  • Inherited properties : parent, ref, name, width, labelBackground, labelFont, labelForeground, labelHorizontalPosition, action, renderedChildProperties, horizontalAlignment, sortable, clientTypes, model, validationModel, icon, iconWidth, iconHeight, styleName, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center, cells, columns, fields

  • allowed next element : actionMap, secondaryActionMap

  • Jspresso : BasicHtmlViewDescriptor

This type of view descriptor is used to display an html property.

Table III.36. html properties

PropertyDescription

verticallyScrollable

Boolean

Configures the html view to be either croped or vertically scrollable when the display area is too small to display it. A value of true (default) means that the html view will be made scrollable vertically.

horizontallyScrollable

Boolean

Configures the html view to be either wrapped or horizontally scrollable when the display area is too small to display it. A value of true (default) means that the html view will be made scrollable horizontally.


III.1.3.14. actionView

  • extend : common

  • Inherited properties : model, validationModel, icon, iconWidth, iconHeight, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center

  • allowed next element : actionMap, secondaryActionMap, action, next, wrapped, rowAction, itemSelectionAction, sortingAction

  • Jspresso : BasicActionViewDescriptor

This type of view allows to make an action available as a view and thus participate in the UI composition as a visual component. An action view can then be embedded in surrounding a composite view. It litterally takes the action away from the toolbar/context menu it is located when registered in an action map and makes it a primary citizen of the UI.

Table III.37. actionView properties

PropertyDescription

action

RefAction

Assigns the action to display as a view. The action will typically be rendered as a button in the UI. whenever you want to size the icon used to display the action (and thus the button peer), you might use the preferredWidth / preferredHeight properties.

renderingOptions

String

Indicates how the actions should be rendered. This is either a value of the ERenderingOptions enum or its equivalent string representation :

  • LABEL_ICON for label and icon

  • LABEL for label only

  • ICON for icon only

Default value is null, i.e. determined from outside, e.g. the view factory.


III.1.4. Tree

III.1.4.1. treeNode

  • extend : common

  • Inherited properties : model, validationModel, icon, iconWidth, iconHeight, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • mandatory : nameElement

  • allowed previous element : Front

  • allowed next element : actionMap, secondaryActionMap

treeNode('Department-teams.treeNode',

        render: 'ouId', actionMap: 'masterDetail')

treeNode('Company-departments.treeNode',

        render: 'ouId', actionMap: 'masterDetail')

treeNode('Company-teams.treeNode',

        render: 'ouId', actionMap: 'masterDetail')

Table III.38. treeNode properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

rendered

RefField

renderedProperty

This property allows to define the model property used to label the node.


III.1.4.2. tree

  • extend : common

  • Inherited properties : model, validationModel, icon, iconWidth, iconHeight, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center

  • allowed next element : subTree, actionMap, secondaryActionMap, rowAction, itemSelectionAction

  • Jspresso : BasicTreeViewDescriptor

This descriptor is use to design a tree view. The way to define a tree view in Jspresso and SJS is a matter of assembling treeNode descriptors hierarchically. A treeNode descriptor is a group of sibling nodes that usually represent a component collection property. Each individual treeNode collection can be secured by using role-based authorization (i.e. grantedRoles) on its descriptor. There are no properties child or children with SJS. The way in which the hierarchy of the tree is built depends on the overlap of the subTree declarations.


tree('Company.tree', render: 'name', icon: 'structure-48x48.png'){

  subTree('Company-departments.treeNode')

    subTree('Department-teams.treeNode')

  }

}

This SJS declaration produces this type of tree


Company

    department 1

        team A

        team B

    department 2

        team C

        ...

    ...

But it is also possible to define a tree this way :


tree('Company.tree', render: 'name', icon: 'structure-48x48.png') {

  subTree('Company-departments.treeNode')

  subTree('Company-teams.treeNode')

}

which produces this type of tree


Company

    departments

        department 1

        department 2

        ...

    teams

        team 1

        team 2

        ...

In this second example you should notice intermediate collection property grouping nodes (departments and teams). They automatically appeared to clearly group the tree nodes belonging to the different collections.

Table III.39. tree properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

rendered

RefField

renderedProperty

This property allows to define the model property used to label the root node.

iconProvider

RefBean

iconImageURLProvider

The icon image URL provider is the delegate responsible for inferring a tree node icon based on its underlying model. By default (i.e. when iconImageURLProvider is null), Jspresso will use the underlying component descriptor icon, if any. Using a custom icon image URL provider allows to implement finer rules like using different icons based on the underlying object state. There is a single method to implement to achieve this : String getIconImageURLForObject(Object userObject);

expanded

Boolean

Setting this property to true configures the created tree to appear with its node expanded. A value of false (default) means that the tree nodes are initially collapsed.

itemSelectionAction

RefAction

This property alows to bind an action that gets triggered every time the selection changes on the tree view. The action context passed to the action when it is executed is the same as if it had been registered on the tree view.

rowAction

RefAction

Registers an action that is implicitely triggered everytime a row is activated (e.g. double-clicked for current UI channels) on the collection view UI peer. The context of the action execution is the same as if the action was registered in the view action map.

maxDepth

Integer

This property is used only when the tree (or sub-tree) is declared recursively, i.e. a tree level belongs to its own children hierarchy. Default value is 10, meaning that a maximum number of 10 levels can be nested.

displayIcon

Boolean

Configures wether the tree displays icons for its elements.


mobileTree
  • extend : commonMobile

  • Inherited properties : model, validationModel, icon, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, borderType, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • allowed previous element : Front, selection

  • allowed next element : subTree, actionMap, secondaryActionMap, itemSelectionAction

  • Jspresso : MobileTreeViewDescriptor

This descriptor is use to design a tree view. The way to define a tree view in Jspresso and SJS is a matter of assembling treeNode descriptors hierarchically. A treeNode descriptor is a group of sibling nodes that usually represent a component collection property. Each individual treeNode collection can be secured by using role-based authorization (i.e. grantedRoles) on its descriptor. There are no properties child or children with SJS. The way in which the hierarchy of the tree is built depends on the overlap of the subTree declarations.


tree('Company.tree', render: 'name', icon: 'structure-48x48.png'){

  subTree('Company-departments.treeNode')

    subTree('Department-teams.treeNode')

  }

}

This SJS declaration produces this type of tree


Company

    department 1

        team A

        team B

    department 2

        team C

        ...

    ...

But it is also possible to define a tree this way :


tree('Company.tree', render: 'name', icon: 'structure-48x48.png') {

  subTree('Company-departments.treeNode')

  subTree('Company-teams.treeNode')

}

which produces this type of tree


Company

    departments

        department 1

        department 2

        ...

    teams

        team 1

        team 2

        ...

In this second example you should notice intermediate collection property grouping nodes (departments and teams). They automatically appeared to clearly group the tree nodes belonging to the different collections.

Table III.40. mobileTree properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

rendered

RefField

renderedProperty

This property allows to define the model property used to label the root node.

iconProvider

RefBean

iconImageURLProvider

The icon image URL provider is the delegate responsible for inferring a tree node icon based on its underlying model. By default (i.e. when iconImageURLProvider is null), Jspresso will use the underlying component descriptor icon, if any. Using a custom icon image URL provider allows to implement finer rules like using different icons based on the underlying object state. There is a single method to implement to achieve this : String getIconImageURLForObject(Object userObject);

itemSelectionAction

RefAction

This property alows to bind an action that gets triggered every time the selection changes on the tree view. The action context passed to the action when it is executed is the same as if it had been registered on the tree view.

rowAction

RefAction

Registers an action that is implicitely triggered everytime a row is activated (e.g. double-clicked for current UI channels) on the collection view UI peer. The context of the action execution is the same as if the action was registered in the view action map.

maxDepth

Integer

This property is used only when the tree (or sub-tree) is declared recursively, i.e. a tree level belongs to its own children hierarchy. Default value is 10, meaning that a maximum number of 10 levels can be nested.

displayIcon

Boolean

Configures wether the tree displays icons for its elements.


subTree
  • extend : common

  • Inherited properties : model, validationModel, icon, iconWidth, iconHeight, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • allowed previous element : tree, mobileTree, subTree

  • allowed next element : subTree

  • Jspresso : BasicSimpleTreeLevelDescriptor

A SubTree is an instantiation of a TreeNode in a tree. In SJS a subTree has the same identifier as the treeNode it instantiates.

Table III.41. subTree properties

PropertyDescription

ref

Ref

Allows to reference an existing subtree using its identifier. It can be used everywhere a subtree can.

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.


III.1.5. Composite view

III.1.5.1. tabs

  • extend : common

  • Inherited properties : model, validationModel, icon, iconWidth, iconHeight, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center

  • allowed next element : views, actionMap, secondaryActionMap

  • Jspresso : BasicTabViewDescriptor

This composite view arranges its children in tabs. Each tab potentially displays a label (that is translated based on the name of the view in the tab), an icon (based on the icon of the view in the tab) and a tooltip (based on the description of the view in the tab). Default cascading order follows the order of nested view registrations in the container.

Table III.42. tabs properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

views

ListOfView

Registers the list of views to be displayed as tabs. The tabs order follows the children views order of this list.

cascadingModels

Boolean

Enables the model "cascading" behaviour. This allows for instance to link 2 nested tables where the 2nd table model is the selected row of the first table (or null if selection is empty). Using cascadingModel=true is only necessary when tracking view selection on the master nested view. You don't need it if, for instance, the master nested view is a single model view like a omponent view. In the latter case, you can bind a table detail view just by adding it to the same composite without having to set cascadingModel=true. Default value is false, i.e. al nested views share the same model than the outer composite unless explicitely specified differently.

renderingOptions

String

Indicates how the actions should be rendered. This is either a value of the ERenderingOptions enum or its equivalent string representation :

  • LABEL_ICON for label and icon

  • LABEL for label only

  • ICON for icon only

Default value is null, i.e. determined from outside, e.g. the view factory.

lazy

Boolean

Lazy binds tabs based on user selection.


III.1.5.2. mobileTabs

  • extend : commonMobile, mobileSection

  • Inherited properties : model, validationModel, icon, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, borderType, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates, position, clientTypes

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center

  • allowed next element : views, actionMap, secondaryActionMap

  • Jspresso : MobileTabViewDescriptor

This composite view arranges its children in tabs. Each tab potentially displays a label (that is translated based on the name of the view in the tab), an icon (based on the icon of the view in the tab) and a tooltip (based on the description of the view in the tab). Default cascading order follows the order of nested view registrations in the container.

Table III.43. mobileTabs properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

views

ListOfView

Registers the list of views to be displayed as tabs. The tabs order follows the children views order of this list.

renderingOptions

String

Indicates how the actions should be rendered. This is either a value of the ERenderingOptions enum or its equivalent string representation :

  • LABEL_ICON for label and icon

  • LABEL for label only

  • ICON for icon only

Default value is null, i.e. determined from outside, e.g. the view factory.

lazy

Boolean

Lazy binds tabs based on user selection.

carouselMode

Boolean

Should this mobile tab view be rendered as a casousel ?


III.1.5.3. views

  • allowed previous element : tabs, mobileTabs, entityCardView, basicCardView

  • allowed next element : polarChart, cartesianChart, form, mapView, table, listView, propertyView, stringPropertyView, referencePropertyView, enumerationPropertyView, image, html, actionView, tree, tabs, mobileTabs, split, border, grid, evenGrid, entityCardView, basicCardView

Open a list of views where each view can be defined "inline"

Table III.44. views properties

PropertyDescription
This class does not have any specific named property.

III.1.5.4. split

  • extend : common

  • Inherited properties : model, validationModel, icon, iconWidth, iconHeight, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center

  • allowed next element : left, right, top, bottom, actionMap, secondaryActionMap

  • Jspresso : BasicSplitViewDescriptor

This composite view arranges its children in a container splitted either horizontally or vertically. With SJS the orientation is defined directly in the name of the descriptor : split_vertical or split_horizontal An horizontal split disposes its 2 children left and right whereas a vertical split disposes its 2 children top and bottom. The dividing bar can typically be moved by the user to distribute the available space. Default cascading order for master-detail is : left -> right or top -> bottom depending on the split orientation.

Table III.45. split properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

orientation

String

With SJS the orientation is defined directly in the name of the descriptor : split_vertical or split_horizontal

left

RefView

leftTopViewDescriptor

Sets the child view to layout in the left zone of a split_horizontal

right

RefView

rightBottomViewDescriptor

Sets the child view to layout in the rigth zone of a split_horizontal

top

RefView

leftTopViewDescriptor

Sets the child view to layout in the top zone of a split_vertical

bottom

RefView

rightBottomViewDescriptor

Sets the child view to layout in the bottom zone of a split_vertical

cascadingModels

Boolean

Enables the model "cascading" behaviour. This allows for instance to link 2 nested tables where the 2nd table model is the selected row of the first table (or null if selection is empty). Using cascadingModel=true is only necessary when tracking view selection on the master nested view. You don't need it if, for instance, the master nested view is a single model view like a omponent view. In the latter case, you can bind a table detail view just by adding it to the same composite without having to set cascadingModel=true. Default value is false, i.e. al nested views share the same model than the outer composite unless explicitely specified differently.


left
  • allowed previous element : split

  • allowed next element : polarChart, cartesianChart, form, mapView, table, listView, propertyView, stringPropertyView, referencePropertyView, enumerationPropertyView, image, html, actionView, tree, tabs, mobileTabs, split, border, grid, evenGrid, entityCardView, basicCardView

Enable to set an in-line view in in the left zone of a split_horizontal

Table III.46. left properties

PropertyDescription
This class does not have any specific named property.

right
  • allowed previous element : split

  • allowed next element : polarChart, cartesianChart, form, mapView, table, listView, propertyView, stringPropertyView, referencePropertyView, enumerationPropertyView, image, html, actionView, tree, tabs, mobileTabs, split, border, grid, evenGrid, entityCardView, basicCardView

Enable to set an in-line view in in the rigth zone of a split_horizontal

Table III.47. right properties

PropertyDescription
This class does not have any specific named property.

top
  • allowed previous element : split

  • allowed next element : polarChart, cartesianChart, form, mapView, table, listView, propertyView, stringPropertyView, referencePropertyView, enumerationPropertyView, image, html, actionView, tree, tabs, mobileTabs, split, border, grid, evenGrid, entityCardView, basicCardView

Enable to set an in-line view in in the top zone of a split_vertical

Table III.48. top properties

PropertyDescription
This class does not have any specific named property.

bottom
  • allowed previous element : split

  • allowed next element : polarChart, cartesianChart, form, mapView, table, listView, propertyView, stringPropertyView, referencePropertyView, enumerationPropertyView, image, html, actionView, tree, tabs, mobileTabs, split, border, grid, evenGrid, entityCardView, basicCardView

Enable to set an in-line view in in the the bottom zone of a split_vertical

Table III.49. bottom properties

PropertyDescription
This class does not have any specific named property.

III.1.5.5. border

  • extend : common

  • Inherited properties : model, validationModel, icon, iconWidth, iconHeight, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center

  • allowed next element : east, west, south, north, center, actionMap, secondaryActionMap

  • Jspresso : BasicBorderViewDescriptor

A border view is a composite view that arranges its children to the north, west, east, south and center. Depending its position in the container, the resizing rules apply differently :

  • north and south are resized horizontally and kept to their preferred size vertically

  • west and east are resized vertically and kept to their preferred size horizontally

  • center is resized both horizontally and vertically

Default cascading order for master-detail is : north -> west -> center -> east -> south

Table III.50. border properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

east

RefView

eastViewDescriptor

Sets the child view to layout in the east zone. The child view will be resized vertically.

west

RefView

westViewDescriptor

Sets the child view to layout in the west zone. The child view will be resized vertically.

south

RefView

southViewDescriptor

Sets the child view to layout in the south zone. The child view will be resized horizontally.

north

RefView

northViewDescriptor

Sets the child view to layout in the north zone. The child view will be resized horizontally.

center

RefView

centerViewDescriptor

Sets the child view to layout in the center zone. The child view will be resized both horizontally and vertically.

cascadingModels

Boolean

Enables the model "cascading" behaviour. This allows for instance to link 2 nested tables where the 2nd table model is the selected row of the first table (or null if selection is empty). Using cascadingModel=true is only necessary when tracking view selection on the master nested view. You don't need it if, for instance, the master nested view is a single model view like a omponent view. In the latter case, you can bind a table detail view just by adding it to the same composite without having to set cascadingModel=true. Default value is false, i.e. al nested views share the same model than the outer composite unless explicitely specified differently.


mobileBorder
  • extend : commonMobile, mobilePageAware

  • Inherited properties : model, validationModel, icon, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, borderType, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates, mainAction, enterAction, backAction, pageEndAction, swipeLeftAction, swipeRightAction, position, clientTypes

  • allowed previous element : Front, sections, headerSections, east, west, south, north, center

  • allowed next element : south, north, center, actionMap, secondaryActionMap

  • Jspresso : MobileBorderViewDescriptor

A border view is a composite view that arranges its children to the north, west, east, south and center. Depending its position in the container, the resizing rules apply differently :

  • north and south are resized horizontally and kept to their preferred size vertically

  • west and east are resized vertically and kept to their preferred size horizontally

  • center is resized both horizontally and vertically

Table III.51. mobileBorder properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

north

RefView

northViewDescriptor

Sets the child view to layout in the north zone. The child view will be resized horizontally.

center

RefView

centerViewDescriptor

Sets the child view to layout in the center zone. The child view will be resized both horizontally and vertically.

south

RefView

southViewDescriptor

Sets the child view to layout in the south zone. The child view will be resized horizontally.


east
  • allowed previous element : border

  • allowed next element : polarChart, cartesianChart, mobilePolarChart, mobileCartesianChart, form, mobileForm, mapView, mobileMapView, table, listView, propertyView, stringPropertyView, referencePropertyView, enumerationPropertyView, image, html, actionView, tree, tabs, mobileTabs, split, border, mobileBorder, grid, evenGrid, entityCardView, basicCardView, mobileNavPage, mobileCardPage, mobileCompositePage

Enable to set an in-line view in the east zone of a border

Table III.52. east properties

PropertyDescription
This class does not have any specific named property.

west
  • allowed previous element : border

  • allowed next element : polarChart, cartesianChart, mobilePolarChart, mobileCartesianChart, form, mobileForm, mapView, mobileMapView, table, listView, propertyView, stringPropertyView, referencePropertyView, enumerationPropertyView, image, html, actionView, tree, tabs, mobileTabs, split, border, mobileBorder, grid, evenGrid, entityCardView, basicCardView, mobileNavPage, mobileCardPage, mobileCompositePage

Enable to set an in-line view in the west zone of a border

Table III.53. west properties

PropertyDescription
This class does not have any specific named property.

south
  • allowed previous element : border, mobileBorder

  • allowed next element : polarChart, cartesianChart, mobilePolarChart, mobileCartesianChart, form, mobileForm, mapView, mobileMapView, table, listView, propertyView, stringPropertyView, referencePropertyView, enumerationPropertyView, image, html, actionView, tree, tabs, mobileTabs, split, border, mobileBorder, grid, evenGrid, entityCardView, basicCardView, mobileNavPage, mobileCardPage, mobileCompositePage

Enable to set an in-line view in the south zone of a border

Table III.54. south properties

PropertyDescription
This class does not have any specific named property.

north
  • allowed previous element : border, mobileBorder

  • allowed next element : polarChart, cartesianChart, mobilePolarChart, mobileCartesianChart, form, mobileForm, mapView, mobileMapView, table, listView, propertyView, stringPropertyView, referencePropertyView, enumerationPropertyView, image, html, actionView, tree, tabs, mobileTabs, split, border, mobileBorder, grid, evenGrid, entityCardView, basicCardView, mobileNavPage, mobileCardPage, mobileCompositePage

Enable to set an in-line view in the north zone of a border

Table III.55. north properties

PropertyDescription
This class does not have any specific named property.

center
  • allowed previous element : border, mobileBorder

  • allowed next element : polarChart, cartesianChart, mobilePolarChart, mobileCartesianChart, form, mobileForm, mapView, mobileMapView, table, listView, propertyView, stringPropertyView, referencePropertyView, enumerationPropertyView, image, html, actionView, tree, tabs, mobileTabs, split, border, mobileBorder, grid, evenGrid, entityCardView, basicCardView, mobileNavPage, mobileCardPage, mobileCompositePage

Enable to set an in-line view in the center zone of a border

Table III.56. center properties

PropertyDescription
This class does not have any specific named property.

III.1.5.6. grid

  • extend : common

  • Inherited properties : model, validationModel, icon, iconWidth, iconHeight, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center

  • allowed next element : cells, actionMap, secondaryActionMap

  • Jspresso : BasicConstrainedGridViewDescriptor

This composite view arranges its children in a grid where cell behaviour and dimensions are configured using cell constraints in a cells list

Table III.57. grid properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

cascadingModels

Boolean

Enables the model "cascading" behaviour. This allows for instance to link 2 nested tables where the 2nd table model is the selected row of the first table (or null if selection is empty). Using cascadingModel=true is only necessary when tracking view selection on the master nested view. You don't need it if, for instance, the master nested view is a single model view like a omponent view. In the latter case, you can bind a table detail view just by adding it to the same composite without having to set cascadingModel=true. Default value is false, i.e. al nested views share the same model than the outer composite unless explicitely specified differently.


evenGrid
  • extend : common

  • Inherited properties : model, validationModel, icon, iconWidth, iconHeight, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • mandatory : drivingDimension, drivingCellCount

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center

  • allowed next element : cells, actionMap, secondaryActionMap

  • Jspresso : BasicEvenGridViewDescriptor

This composite view arranges its children in a grid where cells are distributed evenly. All cells are resized horizontally and vertically to fill its available space. The number of cells in a row / column is determined by the combination of the drivingDimension and drivingCellCount properties. the cells are spread along the driving dimension (row or column) until the maximum number of cells in the dimension has been reached. Then a new row (or column) is added. The process repeats until all the cells have been added

Table III.58. evenGrid properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

cascadingModels

Boolean

Enables the model "cascading" behaviour. This allows for instance to link 2 nested tables where the 2nd table model is the selected row of the first table (or null if selection is empty). Using cascadingModel=true is only necessary when tracking view selection on the master nested view. You don't need it if, for instance, the master nested view is a single model view like a omponent view. In the latter case, you can bind a table detail view just by adding it to the same composite without having to set cascadingModel=true. Default value is false, i.e. al nested views share the same model than the outer composite unless explicitely specified differently.

drivingDimension

String

Configures the driving dimension of the grid :

  • ROW for distributing cells along rows then columns

  • COLUMN for distributing cells along columns then rows

Default value is ROW, i.e. distribute cells along rows then columns.

drivingCellCount

Integer

drivingDimensionCellCount

This property configures the maximum number of cells in the driving dimension (row or column). Nested views are distributed along the driving axis until this maximum number has been reached. A new row or column is then created to host the remaining cells.


cells
  • allowed previous element : grid, evenGrid

  • allowed next element : propertyView, stringPropertyView, referencePropertyView, enumerationPropertyView, image, html, cell, evenCell

open a cells list in grid or in an evenGrid

Table III.59. cells properties

PropertyDescription
This class does not have any specific named property.

cell
  • allowed previous element : cells

  • allowed next element : polarChart, cartesianChart, form, mapView, table, listView, propertyView, stringPropertyView, referencePropertyView, enumerationPropertyView, image, html, actionView, tree, tabs, mobileTabs, split, border, grid, evenGrid, entityCardView, basicCardView

Describes constraints on a cell of a grid

Table III.60. cell properties

PropertyDescription

view

RefView

the view to layout in the cell

row

Integer

the row to which the cell belongs

column

Integer

the column to which the cell belongs

height

Integer

the number of rows the cell spans vertically

width

Integer

the number of columns the cell spans horizontally (default value is 1)

widthResizable

Boolean

wether the cell should be resized to take all the available space horizontally

heightResizable

Boolean

wether the cell should be resized to take all the available space vertically


evenCell
  • allowed previous element : cells

  • allowed next element : polarChart, cartesianChart, form, mapView, table, listView, propertyView, stringPropertyView, referencePropertyView, enumerationPropertyView, image, html, actionView, tree, tabs, mobileTabs, split, border, grid, evenGrid, entityCardView, basicCardView

Describes a cell of an evenGrid evenCell IS NEVER DIRECTLY USED, like for a grid, cell is used. SJS automatically transforms cell it in evenCell in an evenGrid context

Table III.61. evenCell properties

PropertyDescription

view

RefView

the view to layout in the cell


III.1.5.7. entityCardView

  • extend : common

  • Inherited properties : model, validationModel, icon, iconWidth, iconHeight, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center

  • allowed next element : views, actionMap, secondaryActionMap

  • Jspresso : EntityCardViewDescriptor

A card view is a view stack made of children views (the cards) where only the view (card) at the top of the stack is visible. The actual child view to place on the top of the stack is dynamically determined based on the bound model. An entityCardView view provides a simple card determination strategy that is based on the bound model type. This strategy pulls up the card whose model descriptor matches the type of the bound model

Table III.62. entityCardView properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

views

ListOfView

viewDescriptors

Registers the list of card view descriptors. Every time the bound model changes, this list is iterated until a card with a matching model is found. The first matching card is displayed. Whenever no registered card matches, an empty view is displayed.


III.1.5.8. basicCardView

  • extend : common

  • Inherited properties : model, validationModel, icon, iconWidth, iconHeight, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates

  • mandatory : selector

  • allowed previous element : Front, left, right, top, bottom, cell, evenCell, views, east, west, south, north, center

  • allowed next element : views, actionMap, secondaryActionMap

  • Jspresso : BasicCardViewDescriptor

A card view is a view stack made of children views (the cards) where only the view (card) at the top of the stack is visible. The actual child view to place on the top of the stack is dynamically determined based on the bound model. A basicCardView describes a multi-purpose card view that is configurable with a custom card determination strategy. Cards are registered with a name key that is used to retrieve the card to display based on the card selector selected name key.

Table III.63. basicCardView properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

selector

RefBean

cardNameSelector

Configures the card determination strategy. This delegate is responsible for selecting the card name key based on the model bound to the view. Everytime the bound model changes, the card name selector is triggered to select a new card. The names returned by the card name selector must match the names under which the cards are registered. Whenever the card name selector returns an unknown name, the card view displays an empty view. The card name selector can optionally implement ICardProvider in which case, it will be given a chance to create cards dynamically based on their names.

views

MapOfView

cardViewDescriptors

Registers the card views keyed by their name keys. The names used as key of the Map must match the names that are returned by the registered card name selector.


III.1.6. Action

III.1.6.1. actionMap

  • allowed previous element : Front, treeNode, controller, mobileNavPage, mobileCompositePage, mobileCardPage, mobileForm, mobileBorder, mobileMapView, mobilePolarChart, mobileCartesianChart, mobileListView, mobileTree, mobileTabs, form, propertyView, referencePropertyView, enumerationPropertyView, stringPropertyView, tabs, tree, table, listView, split, border, mapView, grid, evenGrid, image, html, entityCardView, basicCardView, actionView, polarChart, cartesianChart

  • allowed next element : actionList

  • Jspresso : ActionMap

An action map is generally represented as a toolbar attached to the view. The toolbar follows the structure of the action map :

  • each action list is contained in its own toolbar section which is visually separated from the other sections. This allows for visually grouping related actions as they are grouped in the action lists.

  • each action contained in an action list is represented by a toolbar button using the action image as icon and translated action description as tooltip.

Table III.64. actionMap properties

PropertyDescription

parents

ListOfActionMaps

parentActionMaps

Assigns the parent action maps. The action lists that will actually be rendered will be the merge of the directly owned action lists and of the parent action maps. Action lists that have the same name are merged together and into a merged action list, local actions will replace parent actions with the same name.

renderingOptions

String

Indicates how the actions should be rendered. This is either a value of the ERenderingOptions enum or its equivalent string representation :

  • LABEL_ICON for label and icon

  • LABEL for label only

  • ICON for icon only

Default value is null, i.e. determined from outside, e.g. the view factory.

grantedRoles

ListOfString

Assigns the roles that are authorized to execute this action map. It supports "!" prefix to negate the role(s). This will directly influence the UI behaviour since unauthorized action maps won't be displayed. Setting the collection of granted roles to null (default value) disables role based authorization on this action map.

permId

String

Sets the permanent identifier to this application element. Permanent identifiers are used by different framework parts, like dynamic security or record/replay controllers to uniquely identify an application element. Permanent identifiers are generated by the SJS build based on the element id but must be explicitely set if Spring XML is used.

validationModel

RefDomain

This property is SJS specific. It allows to enforce SJS controls without actually assigning a model to the action gates.


secondaryActionMap
  • allowed previous element : treeNode, controller, mobileNavPage, mobileCompositePage, mobileCardPage, mobileForm, mobileBorder, mobileMapView, mobilePolarChart, mobileCartesianChart, mobileListView, mobileTree, mobileTabs, form, propertyView, referencePropertyView, enumerationPropertyView, stringPropertyView, tabs, tree, table, listView, split, border, mapView, grid, evenGrid, image, html, entityCardView, basicCardView, actionView, polarChart, cartesianChart

  • allowed next element : actionList

  • Jspresso : ActionMap

A secondary action map is generally represented as a toolbar attached at the bottom of the view. It is always declared as an "inline" statement. The toolbar follows the structure of the action map :

  • each action list is contained in its own toolbar section which is visually separated from the other sections. This allows for visually grouping related actions as they are grouped in the action lists.

  • each action contained in an action list is represented by a toolbar button using the action image as icon and translated action description as tooltip.

Table III.65. secondaryActionMap properties

PropertyDescription

parents

ListOfActionMaps

Assigns the parent action maps. The action lists that will actually be rendered will be the merge of the directly owned action lists and of the parent action maps. Action lists that have the same name are merged together and into a merged action list, local actions will replace parent actions with the same name.

renderingOptions

String

Indicates how the actions should be rendered. This is either a value of the ERenderingOptions enum or its equivalent string representation :

  • LABEL_ICON for label and icon

  • LABEL for label only

  • ICON for icon only

Default value is null, i.e. determined from outside, e.g. the view factory.

grantedRoles

ListOfString

Assigns the roles that are authorized to execute this action map. It supports "!" prefix to negate the role(s). This will directly influence the UI behaviour since unauthorized action maps won't be displayed. Setting the collection of granted roles to null (default value) disables role based authorization on this action map.

permId

String

Sets the permanent identifier to this application element. Permanent identifiers are used by different framework parts, like dynamic security or record/replay controllers to uniquely identify an application element. Permanent identifiers are generated by the SJS build based on the element id but must be explicitely set if Spring XML is used.

validationModel

RefDomain

This property is SJS specific. It allows to enforce SJS controls without actually assigning a model to the action gates.


actionList
  • allowed previous element : actionMap, secondaryActionMap

  • allowed next element : action, next, wrapped

  • Jspresso : ActionList

In an actionMap, an action list is contained in its own toolbar section which is visually separated from the other sections. This allows for visually grouping related actions as they are grouped in the action lists

Table III.66. actionList properties

PropertyDescription

description

String

Sets the description of this actionList. Most of the descriptor descriptions are used in conjunction with the Jspresso i18n layer so that the description property set here is actually an i18n key used for translation.

icon

String

iconImageURL

Sets the icon image URL of this descriptor. Supported URL protocols include :

  • all JVM supported protocols

  • the jar:/ pseudo URL protocol

  • the classpath:/ pseudo URL protocol

iconWidth

Integer

iconPreferredWidth

Allows to define a custom width for the icon. In that case, the default dimension computed by the view factory is ignored.

iconHeight

Integer

iconPreferredHeight

Allows to define a custom height for the icon. In that case, the default dimension computed by the view factory is ignored.

actions

ListOfAction

Assigns the list of actions owned by this action list.

renderingOptions

String

Indicates how the actions should be rendered. This is either a value of the ERenderingOptions enum or its equivalent string representation :

  • LABEL_ICON for label and icon

  • LABEL for label only

  • ICON for icon only

Default value is null, i.e. determined from outside, e.g. the view factory.

collapsable

Boolean

Configures the actionlist so that it can be collapsed by view factories. Collapsable action lists can typically be rendered as combo buttons in UI channels that support it.

Default value is false.

grantedRoles

ListOfString

Assigns the roles that are authorized to execute this action list. It supports "!" prefix to negate the role(s). This will directly influence the UI behaviour since unauthorized action listss won't be displayed. Setting the collection of granted roles to null (default value) disables role based authorization on this action list.

permId

String

Sets the permanent identifier to this application element. Permanent identifiers are used by different framework parts, like dynamic security or record/replay controllers to uniquely identify an application element. Permanent identifiers are generated by the SJS build based on the element id but must be explicitely set if Spring XML is used.

validationModel

RefDomain

This property is SJS specific. It allows to enforce SJS controls without actually assigning a model to the action gates.


III.1.6.2. action

  • allowed previous element : Front, actionList, controller, actionView

  • allowed next element : next, wrapped, bean, list, set, map

This descriptor establishes the foundation of the Jspresso action framework, i.e. each action can link :

  • a wrapped action that will execute a return back to the caller action

  • a next action that will execute after the caller

The action chaining described above supports the separation of concerns that consists in splitting the actions in two distinct categrories :

  • frontend actions that deal with user interaction. They are typically used to bootstrap a service request from th UI, update the UI state, trigger the display of informations, errors, ...

  • backend actions that are faceless, UI agnostic and deal with the manipulation of the domain model, backend services, ...

Conceptually, a frontend action can call a backend action or another frontend action but a backend action should stay on the backend, thus should only reference another backend action. In other words, the backend layer should never explicitely reference the frontend layer.

That's the main reason for having a wrapped and a next action in the action chain. The wrapped action is perfectly suited to call the backend layer (a backend action) and give the flow back to the frontend layer. The next action is perfectly suited to chain 2 actions of the same type (i.e. 2 frontend actions or 2 backend actions). Using this scheme helps keeping layer dependencies clear. Of course, this dual chaining mechanism is completely recursive thus allowing to compose small (generic) actions into larger composite ones and promoting reusability.

Table III.67. action properties

PropertyDescription

parent

RefAction

Allows to reference another descriptor as a model and to override certain properties.

class

String

java class that implement the action

ref

RefAction

Allows to reference an existing action using its identifier. It can be used everywhere an action can, e.g. in action lists.

next

RefAction

nextAction

Registers an action to be executed after this action and after the wrapped one. This is perfectly suited to chain an action of the same type (frontend or backend) as this one.

wrapped

RefAction

wrappedAction

Registers an action to be executed after this action but before the next one. This is perfectly suited to chain a backend action from a frontend action since the control flow will return back to the calling layer (the frontend).

custom

Map

Map of custom properties that have to be set on the action. When a property is a reference, its key has to be suffixed by "_ref". This enables SJS to generate the appropriate XML and to control the existence of the reference.

custom:[

    parentModuleName:'Projects', 

    componentDescriptor_ref:'Project'])

name

String

Sets the key used to compute the internationalized name of the action. The translated name is then usually used as label for the action (button label, menu label, ...)

description

String

Sets the description of this action. Most of the descriptor descriptions are used in conjunction with the Jspresso i18n layer so that the description property set here is actually an i18n key used for translation.

accelerator

String

acceleratorAsString

Configures a keyboard accelerator shortcut on this action. Support of this feature depends on the UI execution platform. The syntax used consists of listing keys that should be pressed to trigger the action, i.e. "alt shift D" or "ctrl C". This is the syntax supported by the javax.swing.KeyStroke

icon

String

iconImageURL

Sets the icon image URL of this descriptor. Supported URL protocols include :

  • all JVM supported protocols

  • the jar:/ pseudo URL protocol

  • the classpath:/ pseudo URL protocol

iconWidth

Integer

iconPreferredWidth

Allows to define a custom width for the icon. In that case, the default dimension computed by the view factory is ignored.

iconHeight

Integer

iconPreferredHeight

Allows to define a custom height for the icon. In that case, the default dimension computed by the view factory is ignored.

styleName

String

Assigns the style name to use for this view. The way it is actually leveraged depends on the UI channel. It will generally be mapped to some sort of CSS style name. Default value is null, meaning that a default style is used.

grantedRoles

ListOfString

Assigns the roles that are authorized to execute this action. It supports "!" prefix to negate the role(s). This will directly influence the UI behaviour since unauthorized actions won't be displayed. Setting the collection of granted roles to null (default value) disables role based authorization on this action. Note that this Actions authorization enforcement does not prevent programatic access that is of the developer responsbility.

permId

String

Sets the permanent identifier to this application element. Permanent identifiers are used by different framework parts, like dynamic security or record/replay controllers to uniquely identify an application element. Permanent identifiers are generated by the SJS build based on the element id but must be explicitely set if Spring XML is used.

booleanActionabilityGates

ListOfString

Assigns a collection of gates to determine action actionability. An action will be considered actionable (enabled) if and only if all boolean gates are open. With SJS a boolean actionability gate can be suffixed by '_cb', which stands for 'collection based'. Collection based actions will typically be installed on selectable views (table, list , tree) and will be enabled only when the view selection is not empty (a default gate is installed for this purpose). Moreover, boolean actionnability gates that are configured on collection based actions take their model from the view selected components instead of the view model itself. In case of multi-selection enabled UI views, the actionability gates will actually open if and only if their opening condition is met for all the selected items.

action('actionA', booleanActionabilityGates: ['!prop1', 'prop2_cb'] ...

  • The first '!prop1' gate is open if prop1 is false, the gate is not applied to each collection item individually

  • The second 'prop2' gate is open if prop2 is true, the gate is applied to each collection item individually

This mecanism is mainly used for dynamic UI authorization based on model state, e.g. a validated invoice should not be validated twice. Action assigned gates will be cloned for each concrete action instance created and bound to its respective UI component (usually a button). So basically, each action instance will have its own, unshared collection of actionability gates. By default, frontend actions are assigned a generic gate that closes (disables the action) when the view is not assigned any model

rolesActionabilityGates

ListOfString

Assigns a collection of gates to determine action actionability. An action will be considered actionable (enabled) if and only if all rolesGates are open.

action('actionA', rolesActionabilityGates: ['role1', '!role2'] ...

  • The first gate 'role1' is open if the connected user has the role1

  • The second gate '!role2' is open if the connected user does not have the role2

Same mecanism has booleanActionabilityGates

enumActionabilityGates

MapOfListOfString

Assigns a collection of gates to determine action actionability. An action will be considered actionable (enabled) if and only if all enum gates are open. With SJS an enum actionability gate can be suffixed by '_cb', which stands for 'collection based'. Collection based actions will typically be installed on selectable views (table, list , tree) and will be enabled only when the view selection is not empty (a default gate is installed for this purpose). Moreover, enum actionnability gates that are configured on collection based actions take their model from the view selected components instead of the view model itself. In case of multi-selection enabled UI views, the actionability gates will actually open if and only if their opening condition is met for all the selected items.

action('actionA', enumActionabilityGates: ['!prop1':['VAL1','VAL2'], 'prop2_cb':['VAL3']] ...

  • The first '!prop1' gate is open if prop1 is not one of 'VAL1' or 'VAL'2', the gate is not applied to each collection item individually

  • The second 'prop2' gate is open if prop2 is 'VAL3', the gate is applied to each collection item individually

This mecanism is mainly used for dynamic UI authorization based on model state, e.g. a validated invoice should not be validated twice. Action assigned gates will be cloned for each concrete action instance created and bound to its respective UI component (usually a button). So basically, each action instance will have its own, unshared collection of actionability gates. By default, frontend actions are assigned a generic gate that closes (disables the action) when the view is not assigned any model

regexActionabilityGates

MapOfString

Assigns a collection of gates to determine action actionability. An action will be considered actionable (enabled) if and only if all regex gates are open. With SJS a regex actionability gate can be suffixed by '_cb', which stands for 'collection based'. Collection based actions will typically be installed on selectable views (table, list , tree) and will be enabled only when the view selection is not empty (a default gate is installed for this purpose). Moreover, boolean actionnability gates that are configured on collection based actions take their model from the view selected components instead of the view model itself. In case of multi-selection enabled UI views, the actionability gates will actually open if and only if their opening condition is met for all the selected items.

action('actionA', regexActionabilityGates: ['!prop1':'[A-Z]*', 'prop2_cb':'[a-z]*'] ...

  • The first '!prop1' gate is open if prop1 does not match [A-Z]*, the gate is not applied to each collection item individually

  • The second 'prop2' gate is open if prop2 matches [a-z]*, the gate is applied to each collection item individually

This mecanism is mainly used for dynamic UI authorization based on model state, e.g. a validated invoice should not be validated twice. Action assigned gates will be cloned for each concrete action instance created and bound to its respective UI component (usually a button). So basically, each action instance will have its own, unshared collection of actionability gates. By default, frontend actions are assigned a generic gate that closes (disables the action) when the view is not assigned any model

collectionBased

Boolean

Declares the action as working on a collection of objects. Collection based actions will typically be installed on selectable views (table, list , tree) and will be enabled only when the view selection is not empty (a default gate is installed for this purpose). Moreover, model gates that are configured on collection based actions take their model from the view selected components instead of the view model itself. In case of multi-selection enabled UI views, the actionability gates will actually open if and only if their opening condition is met for all the selected items.

multiSelection

Boolean

multiSelectionEnabled

Declares the action as being abled to run on a collection containing more than 1 element. A multiSelection = false action will be disabled when the selection contains no or more than one element.

validationModel

RefDomain

This property is SJS specific. It allows to enforce SJS controls without actually assigning a model to the action gates.


III.1.6.3. next

  • extend : action

  • Inherited properties : parent, class, ref, next, wrapped, custom, name, description, accelerator, icon, iconWidth, iconHeight, styleName, grantedRoles, permId, booleanActionabilityGates, rolesActionabilityGates, enumActionabilityGates, regexActionabilityGates, collectionBased, multiSelection, validationModel

  • allowed previous element : actionList, controller, actionView, action, next, wrapped, rowAction, itemSelectionAction, sortingAction, enterAction, backAction, pageEndAction, mainAction, swipeLeftAction, swipeRightAction

  • allowed next element : next, wrapped, bean, list, set, map

Allows defining "inline" next action for the current action. A next action is an action to be executed after this action and after the wrapped one. This is perfectly suited to chain an action of the same type (frontend or backend) as this one.

Table III.68. next properties

PropertyDescription
This class does not have any specific named property.

III.1.6.4. wrapped

  • extend : next

  • Inherited properties : parent, class, ref, next, wrapped, custom, name, description, accelerator, icon, iconWidth, iconHeight, styleName, grantedRoles, permId, booleanActionabilityGates, rolesActionabilityGates, enumActionabilityGates, regexActionabilityGates, collectionBased, multiSelection, validationModel

  • allowed previous element : actionList, controller, actionView, action, next, wrapped, rowAction, itemSelectionAction, sortingAction, enterAction, backAction, pageEndAction, mainAction, swipeLeftAction, swipeRightAction

  • allowed next element : next, wrapped, bean, list, set, map

Allows defining "inline" wrapped action for the current action. This is perfectly suited to chain a backend action from a frontend action since the control flow will return back to the calling layer (the frontend).

Table III.69. wrapped properties

PropertyDescription
This class does not have any specific named property.

III.1.6.5. rowAction

  • extend : action

  • Inherited properties : parent, class, ref, next, wrapped, custom, name, description, accelerator, icon, iconWidth, iconHeight, styleName, grantedRoles, permId, booleanActionabilityGates, rolesActionabilityGates, enumActionabilityGates, regexActionabilityGates, collectionBased, multiSelection, validationModel

  • allowed previous element : controller, actionView, table, listView, tree

  • allowed next element : next, wrapped, bean, list, set, map

Allows defining "inline" rowAction for the current action. It is an action that is implicitely triggered everytime a row is activated (e.g. double-clicked for current UI channels) on the collection view UI peer. The context of the action execution is the same as if the action was registered in the view action map.

Table III.70. rowAction properties

PropertyDescription
This class does not have any specific named property.

III.1.6.6. itemSelectionAction

  • extend : action

  • Inherited properties : parent, class, ref, next, wrapped, custom, name, description, accelerator, icon, iconWidth, iconHeight, styleName, grantedRoles, permId, booleanActionabilityGates, rolesActionabilityGates, enumActionabilityGates, regexActionabilityGates, collectionBased, multiSelection, validationModel

  • allowed previous element : controller, actionView, table, listView, mobileListView, tree, mobileTree

  • allowed next element : next, wrapped, bean, list, set, map

Allows defining "inline" itemSelectionAction for the current action. It is an action that is implicitely triggered everytime the selection changes on the collection view UI peer. The context of the action execution is the same as if the action was registered in the view action map.

Table III.71. itemSelectionAction properties

PropertyDescription
This class does not have any specific named property.

III.1.6.7. sortingAction

  • extend : action

  • Inherited properties : parent, class, ref, next, wrapped, custom, name, description, accelerator, icon, iconWidth, iconHeight, styleName, grantedRoles, permId, booleanActionabilityGates, rolesActionabilityGates, enumActionabilityGates, regexActionabilityGates, collectionBased, multiSelection, validationModel

  • allowed previous element : controller, actionView, table

  • allowed next element : next, wrapped, bean, list, set, map

Allows defining "inline" sortingAction for the current action. It configures the action to be activated when a sort is triggered by the user. It should be used with caution and rarely be overriden from the default.

Table III.72. sortingAction properties

PropertyDescription
This class does not have any specific named property.

III.1.7. View

III.1.7.1. mobileNavPage

  • extend : commonMobile, mobilePageAware

  • Inherited properties : model, validationModel, icon, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, borderType, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates, mainAction, enterAction, backAction, pageEndAction, swipeLeftAction, swipeRightAction, position, clientTypes

  • allowed previous element : Front, sections, headerSections, east, west, south, north, center, nextPage

  • allowed next element : actionMap, secondaryActionMap, selection, headerSections, nextPage

  • Jspresso : MobileNavPageViewDescriptor

A Navigation page is a mobile page that displays a collection view (list or tree) in order to navigate to sub pages.

Table III.73. mobileNavPage properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

selection

RefView

selectionViewDescriptor

Defines the selection view of the navigation page, either tree or list.

headerSections

ListOfView

headerSectionDescriptors

Defines a list of section views to be placed above the selection view.

next

RefView

nextAction

Defines the page that will be navigated to when the user clicks an item in the selection view.


mobileCardPage
  • extend : commonMobile, mobilePageAware

  • Inherited properties : model, validationModel, icon, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, borderType, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates, mainAction, enterAction, backAction, pageEndAction, swipeLeftAction, swipeRightAction, position, clientTypes

  • allowed previous element : Front, sections, headerSections, east, west, south, north, center, nextPage

  • allowed next element : actionMap, secondaryActionMap, pages

  • Jspresso : MobileCardPageViewDescriptor

Defines a page that displays a card view as its main content.

Table III.74. mobileCardPage properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

pages

RefView

pagesCardViewDescriptor

Defines the card view that is displayed in the card page.


mobileCompositePage
  • extend : commonMobile, mobilePageAware

  • Inherited properties : model, validationModel, icon, styleName, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, borderType, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates, mainAction, enterAction, backAction, pageEndAction, swipeLeftAction, swipeRightAction, position, clientTypes

  • allowed previous element : Front, sections, headerSections, east, west, south, north, center, nextPage

  • allowed next element : actionMap, secondaryActionMap, sections, editorPage

  • Jspresso : MobileCompositePageViewDescriptor

Defines a composite page. A composite page is made of sections. A section can be :

  • Another page. In that case, a selection item is installed and the other page is navigated to when the user clicks the selection item.

  • A form. In that case, the form is displayed inline in the page.

You can install as many sections as you wish in any order.

Table III.75. mobileCompositePage properties

PropertyDescription

parent

RefView

Allows to reference another descriptor as a model and to override certain properties.

sections

ListOfView

pageSectionDescriptors

Defines the composite page sections.

inlineEditing

Boolean

A boolean indicating if the page is directly editable or if the user has to turn on edition mode in order to modify the data.

editorPage

RefView

Allows to override the editor page that is computed by default. This property is ignored whenever the inlineEditing flag is turned on.


selection
  • allowed previous element : mobileNavPage

  • allowed next element : mobileListView, mobileTree

Defines the selection view of a navigation page, either tree or list.

Table III.76. selection properties

PropertyDescription
This class does not have any specific named property.

headerSections
  • allowed previous element : mobileNavPage

  • allowed next element : mobilePolarChart, mobileCartesianChart, mobileForm, mobileMapView, mobileBorder, mobileNavPage, mobileCardPage, mobileCompositePage

Defines a list of section views to be placed above the selection view.

Table III.77. headerSections properties

PropertyDescription
This class does not have any specific named property.

nextPage
  • allowed previous element : mobileNavPage

  • allowed next element : mobileNavPage, mobileCardPage, mobileCompositePage

Defines the page that will be navigated to when the user clicks an item in the selection view of a navigation page.

Table III.78. nextPage properties

PropertyDescription
This class does not have any specific named property.

pages
  • allowed previous element : mobileCardPage

Defines the card view that is displayed in the card page.

Table III.79. pages properties

PropertyDescription
This class does not have any specific named property.

sections
  • allowed previous element : mobileCompositePage

  • allowed next element : mobilePolarChart, mobileCartesianChart, mobileForm, mobileMapView, mobileBorder, mobileNavPage, mobileCardPage, mobileCompositePage

Defines a composite page sections.

Table III.80. sections properties

PropertyDescription
This class does not have any specific named property.

editorPage
  • allowed previous element : mobileCompositePage

Defines the editor page of a composite page.

Table III.81. editorPage properties

PropertyDescription
This class does not have any specific named property.

III.1.8. workspace

III.1.8.1. workspace

  • mandatory : nameElement

  • allowed previous element : Front

  • allowed next element : module, collectionModule, filterModule, beanModule, nodeModule

A workspace is an group of functional application modules. You may decide arbitrarily how to group modules into workspaces but a good approach might be to design the workspaces based on roles (i.e. business activities). This helps to clearly seperates tasks-unrelated modules and eases authorization management since a workspace can be granted or forbidden as a whole by Jspresso security.

Workspaces might be graphically represented differently depending on the UI technology used. For instance, the Swing and ULC channels use a MDI UI in which each workspace is represented as an internal frame (document). On the other hand, Flex and Qooxdoo channels represent workspaces stacked in an accordion. Whatever the graphical representation is, there is at most one workspace active at a time for a user session - either the active (focused) internal frame or the expanded accordion section.

Table III.82. workspace properties

PropertyDescription

parent

RefWorkspace

Allows to use an other descriptor as a model and to override certain properties.

name

String

Configures the key used to translate actual internationalized workspace name. The resulting translation will be leveraged as the workspace label on the UI side.

description

String

Configures the key used to translate actual internationalized workspace description. The resulting translation will generally be leveraged as a tooltip on the UI side but its use may be extended for online help.

headerDescription

String

Configures the key used to translate actual internationalized workspace header description. The resulting translation will generally be leveraged as a textual section that explains the workspace goal.

icon

String

iconImageURL

Sets the icon image URL of this descriptor. Supported URL protocols include :

  • all JVM supported protocols

  • the jar:/ pseudo URL protocol

  • the classpath:/ pseudo URL protocol

iconWidth

Integer

iconPreferredWidth

Allows to define a custom width for the icon. In that case, the default dimension computed by the view factory is ignored.

iconHeight

Integer

iconPreferredHeight

Allows to define a custom height for the icon. In that case, the default dimension computed by the view factory is ignored.

startup

RefAction

startupAction

Configures an action to be executed the first time the workspace is "started" by the user. The action will execute in the context of the workspace but with no specific module selected. It will help initializing workspace values, notify user, ...

permId

String

Sets the permanent identifier to this application element. Permanent identifiers are used by different framework parts, like dynamic security or record/replay controllers to uniquely identify an application element. Permanent identifiers are generated by the SJS build based on the element id but must be explicitely set if Spring XML is used.

grantedRoles

ListOfString

Assigns the roles that are authorized to view this workspace. It supports "!" prefix to negate the role(s). This will directly influence the UI behaviour since unauthorized workspaces won't be displayed. Setting the collection of granted roles to null (default value) disables role based authorization on this workspace.


III.1.9. Module

III.1.9.1. module

  • allowed previous element : Front, workspace, module, nodeModule, collectionModule, filterModule, beanModule

  • allowed next element : module, collectionModule, filterModule, beanModule, nodeModule

A module is an entry point in the application. Modules are organized in bi-directional, parent-children hierarchy. As such, they can be viewed (and they are materalized in the UI) as trees. Modules can be (re)organized dynamically by changing their parent-children relationship and their owning workspace UI will reflect the change seamlessly, as with any Jspresso model (in fact workspaces and modules are regular beans that are used as model in standard Jspresso views).

Modules, among other features, are capable of providing a view to be installed in the UI wen they are selected. This makes Jspresso applications really modular and their architecture flexible enough to embed and run a large variety of different module types.

A module can also be as simple as a grouping structure for other modules (nodeModule).

Table III.83. module properties

PropertyDescription

parent

RefModule

Allows to use an other descriptor as a model and to override certain properties.

name

String

Configures the key used to translate actual internationalized module name. The resulting translation will be leveraged as the module label on the UI side.

description

String

Configures the key used to translate actual internationalized module description. The resulting translation will generally be leveraged as a tooltip on the UI side but its use may be extended for online help.

icon

String

iconImageURL

Sets the icon image URL of this descriptor. Supported URL protocols include :

  • all JVM supported protocols

  • the jar:/ pseudo URL protocol

  • the classpath:/ pseudo URL protocol

iconWidth

Integer

iconPreferredWidth

Allows to define a custom width for the icon. In that case, the default dimension computed by the view factory is ignored.

iconHeight

Integer

iconPreferredHeight

Allows to define a custom height for the icon. In that case, the default dimension computed by the view factory is ignored.

moduleView

RefView

projectedViewDescriptor

Configures the view descriptor used to construct the view that will be displayed when this module is selected.

startup

RefAction

startupAction

Reference to an action trigerred at statup when the module is first selected

entry

RefAction

entryAction

Configures an action to be executed every time the module becomes the current selected module (either through a user explicit navigation or a programmatic selection). The action will execute in the context of the current workspace, this module being the current selected module.

exit

RefAction

exitAction

Configures an action to be executed every time the module becomes unselected (either through a user explicit navigation or a programmatic deselection). The action will execute in the context of the current workspace, this module being the current selected module (i.e. the action occurs before the module is actually left).

ref

RefModule

Allows to reference an existing module using its identifier. It can be used everywhere a module can.

permId

String

Sets the permanent identifier to this application element. Permanent identifiers are used by different framework parts, like dynamic security or record/replay controllers to uniquely identify an application element. Permanent identifiers are generated by the SJS build based on the element id but must be explicitely set if Spring XML is used.

grantedRoles

ListOfString

Assigns the roles that are authorized to start this module. It supports "!" prefix to negate the role(s). Whenever the user is not granted sufficient privileges, the module is simply not installed in the workspace . Setting the collection of granted roles to null (default value) disables role based authorization on this module.

Some specific modules that are component/entity model based i.e. Bean(Collection)Module also inherit their authrorizations from their model.


III.1.9.2. collectionModule

  • extend : module

  • Inherited properties : parent, name, description, icon, iconWidth, iconHeight, moduleView, startup, entry, exit, ref, permId, grantedRoles

  • allowed previous element : Front, workspace, module, nodeModule, collectionModule, filterModule, beanModule

  • allowed next element : module, collectionModule, filterModule, beanModule, nodeModule

This type of module keeps a reference on a beans collection. There is no assumption made on wether these beans are actually persistent entites or any other type of java beans.

Simple bean collection modules must have their collection of referenced beans initialized somehow. There is no standard built-in action to do so, since it is highly dependent on what's needed. So it's rather common to have the module content initialized through a startup action depending on the session state.

Table III.84. collectionModule properties

PropertyDescription

component

RefDomain

elementComponentDescriptor

Configures the type of bean element this collection module manages . A bunch of default values are inferred from this element component descriptor. For instance, paging size (if used) will default to the component one unless explicitely set. Same goes for icon image URL, default ordering properties or even granted roles. The latter means that bean collection modules based on forbidden entities will automatically be excluded from the workspace of the logged-in user.

if not explicitely configured, the eement component descriptor can be inferred from the collection view descriptor configured as projected view descriptor.

detailView

RefView

elementViewDescriptor

This property is not used by the module itself, but by built-in actions that maybe registered on this module. One of tese actions is AddBeanAsSubModuleAction.

This property indicates the view to use whenever the user requests a "form-like" view on a collection element. Naturally the configured element view descriptor must be backed by a model matching the type of the module managed beans.


III.1.9.3. filterModule

  • extend : collectionModule

  • Inherited properties : detailView, parent, name, description, icon, iconWidth, iconHeight, moduleView, startup, entry, exit, ref, permId, grantedRoles

  • allowed previous element : Front, workspace, module, nodeModule, collectionModule, filterModule, beanModule

  • allowed next element : module, collectionModule, filterModule, beanModule, nodeModule

This is a specialized type of bean collection module that provides a filter ( an instance of IQueryComponent ). This type of module, coupled with a generic, built-in, action map is perfectly suited for CRUD-like operations.

Table III.85. filterModule properties

PropertyDescription

component

RefDomain

elementComponentDescriptor

This property allows to configure a custom filter model descriptor. If not set, which is the default value, the filter model is built out of the element component descriptor (QBE filter model).

filterComponent

RefDomain

filterComponentDescriptor

Assigns the filter to this module instance. It is by default assigned by the module startup action (see InitModuleFilterAction). So if you ever want to change the default implementation of the filter, you have to write and install you own custom startup action or explicitely inject a specific instance.

filterView

RefView

filterViewDescriptor

This property allows to refine the default filer view to re-arange the filter fields. Custom filter view descriptors assigned here must not be assigned a model descriptor since they will be at runtime. This is because the filter component descriptor must be reworked - to adapt comparable field structures for instance.

pagingStatus

RefView

Allows to change the default view for the paging status. If not set (default), a default paging status view is created containing the curent pageas well as the total number of pages available and the total number of records in the result set. This paging status view is the bordered with the bage navigation actions.

pagingAction

RefAction

Configures a custom action to be trigerred when paging.

ordering

Map

Configures a custom map of ordering properties for the result set. If not set, which is the default, the elements ordering properties is used. This property consist of a Map whose entries are composed with :

  • the property name as key

  • the sort order for this property as value. This is either a value of the ESort enum (ASCENDING or DESCENDING) or its equivalent string representation.

Ordering properties are considered following their order in the map iterator.

pageSize

Integer

Configures a custom page size for the result set. If not set, which is the default, the elements default page size is used.


III.1.9.4. beanModule

  • extend : module

  • Inherited properties : parent, name, description, icon, iconWidth, iconHeight, moduleView, startup, entry, exit, ref, permId, grantedRoles

  • allowed previous element : Front, workspace, module, nodeModule, collectionModule, filterModule, beanModule

  • allowed next element : module, collectionModule, filterModule, beanModule, nodeModule

This type of module keeps a reference on a beans collection. There is no assumption made on wether these beans are actually persistent entites or any other type of java beans.

Simple bean collection modules must have their collection of referenced beans initialized somehow. There is no standard built-in action to do so, since it is highly dependent on what's needed. So it's rather common to have the module content initialized through a startup action depending on the session state.

Table III.86. beanModule properties

PropertyDescription

component

RefDomain

componentDescriptor

Configures the type of bean element this collection module manages . A bunch of default values are inferred from this element component descriptor. For instance, paging size (if used) will default to the component one unless explicitely set. Same goes for icon image URL, default ordering properties or even granted roles. The latter means that bean collection modules based on forbidden entities will automatically be excluded from the workspace of the logged-in user.

if not explicitely configured, the element component descriptor can be inferred from the collection view descriptor configured as projected view descriptor.


III.1.9.5. nodeModule

  • extend : module

  • Inherited properties : parent, name, description, icon, iconWidth, iconHeight, moduleView, startup, entry, exit, ref, permId, grantedRoles

  • allowed previous element : Front, workspace, module, nodeModule, collectionModule, filterModule, beanModule

  • allowed next element : module, collectionModule, filterModule, beanModule, nodeModule

Allows to group modules under a simple node in a hierarchy of modules.

Table III.87. nodeModule properties

PropertyDescription
This class does not have any specific named property.

III.1.10. Controller

III.1.10.1. controller

  • mandatory : nameElement

  • allowed previous element : Front

  • allowed next element : actionMap, secondaryActionMap, action, next, wrapped, rowAction, itemSelectionAction, sortingAction

Sets the frontend application controllers. This controller is the place where you define the toplevel application structure like the workspace list, the name, the application-wide actions, ...

Table III.88. controller properties

PropertyDescription

name

String

Sets the application name.

description

String

Sets the application description.

icon

String

iconImageURL

Sets the icon image URL that is used as the application icon.

  • all JVM supported protocols

  • the jar:/ pseudo URL protocol

  • the classpath:/ pseudo URL protocol

iconWidth

Integer

iconPreferredWidth

Allows to define a custom width for the icon. In that case, the default dimension computed by the view factory is ignored.

iconHeight

Integer

iconPreferredHeight

Allows to define a custom height for the icon. In that case, the default dimension computed by the view factory is ignored.

workspaceIcon

String

workspacesMenuIconImageUrl

Sets the icon image URL that is used as the workspace menu icon. Same supported URL protocols than icon property.

actionMap

RefActionMap

References an application-wide action map that will be installed in the main application frame. These actions are available at any time from the UI and thus, do not depend on the active workspace. General purpose actions like "Change password" action should be installed here.

secondaryActionMap

RefActionMap

References a secondary application-wide action map that will be installed in the main application frame. These actions are available at any time from the UI and thus, do not depend on the active workspace.

helpActionMap

RefActionMap

Reference the help action map. The help action map should contain actions that are related to helping the user (online help, reference manual, tutorial, version dialog...).

The help action map is visually distinguished from the regular aplication action map. For instance elp actions can be represented in a menu that is right-aligned in the menubar.

context

String

loginContextName

Configures the name of the JAAS login context to use to authenticate users. It must reference a valid JAAS context that is installed in the JVM, either through setting the java.security.auth.login .config system property or through server-specific configuration.

language

String

forcedStartingLocale

Configures the locale used to initiate the login process. Whenever the forced starting locale is null, the client host default locale is used.

As soon as the user logs-in, his locale is then used to translate the UI . Whenever the login process is disabled, then the forced starting locale is kept as the UI I18N locale.

startup

RefAction

startupAction

Reference to an action trigerred at statup when when the application starts. An example of such an action would be a default workspace/module opening and selection, a "tip of the day" like action, ...

login

RefAction

loginAction

Configures an action to be executed just after the user has succesfully logged-in but before any UI initialization has begun. An example of such an action would be constructing a map of dynamic user right based on some arbitrary datastore so that the UI construction can actually depend on these extracted values.

onModuleEnter

RefAction

onModuleEnterAction

Reference an action to be executed each time a module of the application is entered. The action is executed in the context of the module the user enters.

onModuleExit

RefAction

onModuleExitAction

Reference an action to be executed each time a module of the application is exited. The action is executed in the context of the module the user exits. Default frontend controller configuration installs an action that checks current module dirty state.

onModuleStartup

RefAction

Reference an action to be executed each time a module of the application is started. The action is executed in the context of the module the user starts.

workspaces

ListOfWorkspace

Registers the workspaces that are available in the application. Workspaces are application entry-points and are hierarchically composed of modules / sub-modules.

width

Integer

frameWidth

Configures the width under which a scrollbar will appear.

height

Integer

frameHeight

Configures the height under which a scrollbar will appear.


III.1.11. Message

III.1.11.1. messageSource

  • mandatory : basenames

  • allowed previous element : Front

Jspresso relies on the well-known java I18N mechanism through the use of resource bundle property files.

Table III.89. messageSource properties

PropertyDescription

basenames

ListOfString

Configures the list of I18N resource bundles that will be used for the translations


III.1.12. Suppoprort

III.1.12.1. external

  • allowed previous element : Front

External gives SJS the List of references witch are not declared in SJS witch but can be used as reference.

Table III.90. external properties

PropertyDescription

id

ListOfString

List of authorized external references


III.1.13. Support

III.1.13.1. template

  • allowed previous element : Front

template configures a Map of default properties values for a descriptor

template 'form', parent: 'decoratedView', labelsPosition: 'ABOVE', columnCount: 2

template 'table', parent: 'decoratedView'

All new forms and tables will have these properties set

Table III.91. template properties

PropertyDescription

SJSAll

*

Map of any valid SJS properties with their values


III.1.13.2. paramSet

  • allowed previous element : Front

paramSet allows to create a reusable groups of properties in SJS declarations.

paramSet 'myCommon', readOnly:true, mandatory:true

paramSet can be used by declaration SJS using the attribute paramSets

Table III.92. paramSet properties

PropertyDescription

SJSAll

*

Map of any valid SJS properties with their values


III.1.13.3. namespace

  • allowed previous element : *

namespace allows to declare and open a namespace scope. The use of namespaces allows simplifying the declarations SJS referring to resources with a complex path.

namespace('org.jspresso.hrsample'){...}

This declaration allows, for example, to replace the following statement

Entity('City', 

        icon: 'classpath:org/jspresso/hrsample/images/city-48x48.png'){...}

by

('City',icon:'city-48x48.png') {...}

With namespaces, conventions on the organization of the Jspresso's directories are used. In this exemple, images are in the subdirectory /images of the project

Table III.93. namespace properties

PropertyDescription
This class does not have any specific named property.

III.1.13.4. spec

  • allowed previous element : *

spec allows to declare and open a named scope. Each definition declared into this spec will remain visible from outer specs but sibling specs are isolated from each other. What a spec means depends on what you want to use it for. For instance you can have 1 spec per UI channel to customize a Jspresso application based on the runtime UI. Once a spec is used, it can be generated in its own Spring XML so that you can reference it in any Spring context.

spec('Flex'){...}

Table III.94. spec properties

PropertyDescription
This class does not have any specific named property.

III.1.13.5. include

  • allowed previous element : *

include allows to use multi SJS sources files and to include them into each other.

include('fileName')

Table III.95. include properties

PropertyDescription
This class does not have any specific named property.

III.1.14. Generic

III.1.14.1. bean

  • allowed previous element : Front, bean, list, set, map, action, next, wrapped, rowAction, itemSelectionAction, sortingAction, enterAction, backAction, pageEndAction, mainAction, swipeLeftAction, swipeRightAction

  • allowed next element : bean, list, set, map

Allows to generate a bean Spring in the XML generated file

Table III.96. bean properties

PropertyDescription

parent

Ref

Allows to use an other descriptor as a model and to override certain properties.

prototype

Boolean

wether this bean is a prototype (i.e. a new instance is created every time) as opposed to a singleton.

class

String

Bean's java class

ref

String

Allows to reference an existing reference using its identifier.

name

String

Sets the name of this descriptor. Most of the descriptor names are used in conjunction with the Jspresso i18n layer so that the name property set here is actually an i18n key used for translation. The descriptor name property semantic may vary depending on the actual descriptor type. For instance, a property descriptor name is the name of the property and a component descriptor name is the fully qualified name of the underlying class...

description

String

Sets the description of this bean. Most of the descriptor descriptions are used in conjunction with the Jspresso i18n layer so that the description property set here is actually an i18n key used for translation.

custom

Map

Map of custom properties that have to be set on the action. When a property is a reference, its key has to be suffixed by "_ref". This enables SJS to generate the appropriate XML and to control the existence of the reference.

custom:[

    parentModuleName:'Projects', 

    componentDescriptor_ref:'Project'])

III.1.14.2. list

  • mandatory : nameElement

  • allowed previous element : Front, bean, list, set, map, action, next, wrapped, rowAction, itemSelectionAction, sortingAction, enterAction, backAction, pageEndAction, mainAction, swipeLeftAction, swipeRightAction

  • allowed next element : bean, list, set, map

Allows to generate a list Spring in the XML generated file

Table III.97. list properties

PropertyDescription

values

ListOfString

List of string values


III.1.14.3. set

  • mandatory : nameElement

  • allowed previous element : Front, bean, list, set, map, action, next, wrapped, rowAction, itemSelectionAction, sortingAction, enterAction, backAction, pageEndAction, mainAction, swipeLeftAction, swipeRightAction

  • allowed next element : bean, list, set, map

Allows to generate a list Spring in the XML generated file

Table III.98. set properties

PropertyDescription

values

ListOfString

List of string values


III.1.14.4. map

  • mandatory : nameElement

  • allowed previous element : Front, bean, list, set, map, action, next, wrapped, rowAction, itemSelectionAction, sortingAction, enterAction, backAction, pageEndAction, mainAction, swipeLeftAction, swipeRightAction

  • allowed next element : bean, list, set, map

Allows to generate a Map Spring in the XML generated file

Table III.99. map properties

PropertyDescription

values

Map

Map of string values