Table of Contents
allowed next element : polarChart, cartesianChart, form, table, listView, propertyView, referencePropertyView, enumerationPropertyView, image, actionView, treeNode, tree, tabs, split, border, grid, evenGrid, entityCardView, basicCardView, actionMap, action, 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
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
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
| Property | Description |
|---|---|
|
permId
| 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
| 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
| 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']
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
| Assigns a collection of gates to determine view writability. A view will be considered writable (updatable) if and only if all RolesGates gates are open. form 'form2', rolesWritabilityGates: ['role1', '!role2']
Same mecanism has booleanWritabilityGates |
|
enumWritabilityGates
| 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']]
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
| 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]*']
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. |
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.
Table III.3. common properties
| Property | Description |
|---|---|
|
model
| Assigns the model descriptor backing the view. The model descriptor serves several purposes :
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
| 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
| Sets the icon image URL of this descriptor. Supported URL protocols include :
|
|
name
| 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
| 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
| Sets i18n key used for translation if it is different from the description |
|
actionMap
| 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 :
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
| Assigns the view a secondary action map at the bottom of the view |
|
readOnly
| 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
| 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
| 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
| Allows to customize the font used by the UI component. The font must be string encoded using the pattern "[name];[style];[size]" :
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
| Sets the border type of the view. This is either a value of the EBorderType enum or its equivalent string representation :
Default value is EBorderType.NONE, i.e. no border. |
|
preferredWidth
| 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
| 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
| 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. |
extend : common
Inherited properties : model, validationModel, icon, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates
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.4. chart properties
| Property | Description |
|---|---|
|
parent
| Allows to use an other descriptor as a model and to override certain properties. |
|
label
| Configures the model property name to use as label field on the chart. |
|
legend
| 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
| 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
| 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
| 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. |
extend : chart
Inherited properties : parent, label, legend, rowAction, itemSelectionAction, autoSelectFirstRow, model, validationModel, icon, 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, east, west, south, north, center, cell, evenCell, views
allowed next element : pieSeries, actionMap, secondaryActionMap
Jspresso : PieChartDescriptor
Defines at pie chart.
Table III.5. polarChart properties
| Property | Description |
|---|---|
|
pieSeries
| Configures the unique series to use for the pie chart. |
extend : chart
Inherited properties : parent, label, legend, rowAction, itemSelectionAction, autoSelectFirstRow, model, validationModel, icon, 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, east, west, south, north, center, cell, evenCell, views
allowed next element : lineSeries, barSeries, plotSeries, areaSeries, actionMap, secondaryActionMap
Jspresso : BarChartDescriptor
Defines a 2+ dimensional chart.
Table III.6. cartesianChart properties
| Property | Description |
|---|---|
|
lineSeries
| Defines a list of properties to use as line series. |
|
columnSeries
| Defines a list of properties to use as column series. |
|
barSeries
| Defines a list of properties to use as bar series. |
|
plotSeries
| Defines a list of properties to use as plot series. |
|
areaSeries
| Defines a list of properties to use as area series. |
|
orientation
| 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 :
Default value is EOrientation.VERTICAL, i.e. the value axis is the vertical one. |
|
axisMinValue
| 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
| 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
| Configures the way the series are displayed in the chart. This is either a value of the EBarChartType enum or its equivalent string representation :
Default value is EBarChartType.CLUSTERED, i.e. the series are drawn side by side. |
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.7. commonCartesianSeries properties
| Property | Description |
|---|---|
|
valueField
| Configures the model property name to be used as series value. It must obviously be a numeric property. |
|
i18nNameKey
| Sets i18n key used for translation if it is different from the description |
|
background
| 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
| 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
| 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
| Defines the background color of the series label. The font must be string encoded using the pattern "[name];[style];[size]" :
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
| 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
| Configures an action to be triggered when the user clicks on a series item. It is the equivalent of actions defined on table columns. |
extend : commonCartesianSeries
Inherited properties : valueField, i18nNameKey, background, foreground, labelBackground, labelFont, labelForeground, action
allowed previous element : cartesianChart
Jspresso : LineSeriesDescriptor
Defines a line series.
Table III.8. lineSeries properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
extend : commonCartesianSeries
Inherited properties : valueField, i18nNameKey, background, foreground, labelBackground, labelFont, labelForeground, action
allowed previous element : cartesianChart
Jspresso : BarSeriesDescriptor
Defines a bar series.
Table III.9. barSeries properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
extend : commonCartesianSeries
Inherited properties : valueField, i18nNameKey, background, foreground, labelBackground, labelFont, labelForeground, action
allowed previous element : cartesianChart
Jspresso : PlotSeriesDescriptor
Defines a plot series.
Table III.10. plotSeries properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
extend : commonCartesianSeries
Inherited properties : valueField, i18nNameKey, background, foreground, labelBackground, labelFont, labelForeground, action
allowed previous element : cartesianChart
Jspresso : AreaSeriesDescriptor
Defines a area series.
Table III.11. areaSeries properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
allowed previous element : polarChart
Jspresso : PieSeriesDescriptor
Declares a series to be used for pie charts.
Table III.12. pieSeries properties
| Property | Description |
|---|---|
|
valueField
| Configures the model property name to be used as series value. It must obviously be a numeric property. |
|
i18nNameKey
| Sets i18n key used for translation if it is different from the description |
|
background
| 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
| 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
| Defines the background color of the series label. The font must be string encoded using the pattern "[name];[style];[size]" :
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
| 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
| Configures an action to be triggered when the user clicks on a pie sector. It is the equivalent of actions defined on table columns. |
extend : common
Inherited properties : model, validationModel, icon, 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, east, west, south, north, center, cell, evenCell, views
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.13. form properties
| Property | Description |
|---|---|
|
parent
| Allows to reference another descriptor as a model and to override certain properties. |
|
labelsPosition
| Instructs Jspresso where to place the fields label. This is either a value of the ELabelPosition enum or its equivalent string representation :
Default value is ELabelPosition.ASIDE, i.e. fields label next to the property UI component. |
|
columnCount
| 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
| 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
| 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 :
Default value is null, meaning all property fields have a span of 1. |
extend : common
Inherited properties : model, validationModel, icon, 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, east, west, south, north, center, cell, evenCell, views
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.15. table properties
| Property | Description |
|---|---|
|
parent
| Allows to reference another descriptor as a model and to override certain properties. |
|
columns
| 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
| 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
| 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 |
|
selectionMode
| Sets the selection mode of the collection view.
Default value MULTIPLE_INTERVAL_SELECTION, i.e. any type of selection allowed. |
|
rowAction
| 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
| 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
| 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
| 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
| 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. |
extend : common
Inherited properties : model, validationModel, icon, 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, east, west, south, north, center, cell, evenCell, views
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.16. listView properties
| Property | Description |
|---|---|
|
parent
| Allows to reference another descriptor as a model and to override certain properties. |
|
iconProvider
| 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
| 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
| Sets the selection mode of the collection view.
Default value MULTIPLE_INTERVAL_SELECTION, i.e. any type of selection allowed. |
|
rowAction
| 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
| 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
| 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
| 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. |
allowed previous element : table
allowed next element : propertyView, referencePropertyView, enumerationPropertyView, image
Open a list of propertyView to individually fine-tunes each column in a table
Table III.17. columns properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
extend : common
Inherited properties : model, validationModel, icon, 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, east, west, south, north, center, cell, evenCell, views, 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.18. propertyView properties
| Property | Description |
|---|---|
|
parent
| Allows to reference another descriptor as a model and to override certain properties. |
|
ref
| Allows to reference an existing property view using its identifier. |
|
name
| 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
| 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
| 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
| 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]" :
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
| 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. |
|
action
| Configures the action to be triggered when acting on this property. There are 2 cases :
|
|
renderedChildProperties
| Whenever the property decriptor backing the view is not scalar, this property allows to override which of the referenced component fields should be displayed :
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
| 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 :
Default value is null, meaning use property type default. |
|
sortable
| 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. |
extend : propertyView
Inherited properties : parent, ref, name, width, labelBackground, labelFont, labelForeground, action, renderedChildProperties, horizontalAlignment, sortable, model, validationModel, icon, 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, east, west, south, north, center, cell, evenCell, views, 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.19. referencePropertyView properties
| Property | Description |
|---|---|
|
lovAction
| Allows to override the default "List of values" action attached to this reference property view. A null value (default) keeps the standard action. |
extend : propertyView
Inherited properties : parent, ref, name, width, labelBackground, labelFont, labelForeground, action, renderedChildProperties, horizontalAlignment, sortable, model, validationModel, icon, 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, east, west, south, north, center, cell, evenCell, views, 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.20. enumerationPropertyView properties
| Property | Description |
|---|---|
|
allowedValues
| 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
| 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
| Configures the rendering of the enumeration property as radio buttons if supported instead of combobox. Default value is false. |
|
orientation
| Configures wether radio values be rendered horizontally or vertically. HORIZONTAL if radio values should be rendered horizontally and VERTICAL otherwise. Default value is VERTICAL. |
extend : propertyView
Inherited properties : parent, ref, name, width, labelBackground, labelFont, labelForeground, action, renderedChildProperties, horizontalAlignment, sortable, model, validationModel, icon, 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, east, west, south, north, center, cell, evenCell, views, 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.21. image properties
| Property | Description |
|---|---|
|
scrollable
| 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 |
extend : common
Inherited properties : model, validationModel, icon, 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, east, west, south, north, center, cell, evenCell, views
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.22. actionView properties
| Property | Description |
|---|---|
|
action
| 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
| Indicates how the actions should be rendered. This is either a value of the ERenderingOptions enum or its equivalent string representation :
Default value is null, i.e. determined from outside, e.g. the view factory. |
extend : common
Inherited properties : model, validationModel, icon, 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.23. treeNode properties
| Property | Description |
|---|---|
|
parent
| Allows to reference another descriptor as a model and to override certain properties. |
|
rendered
| This property allows to define the model property used to label the node. |
extend : common
Inherited properties : model, validationModel, icon, 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, east, west, south, north, center, cell, evenCell, views
allowed next element : subTree, actionMap, secondaryActionMap, rowAction
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.24. tree properties
| Property | Description |
|---|---|
|
parent
| Allows to reference another descriptor as a model and to override certain properties. |
|
rendered
| This property allows to define the model property used to label the root node. |
|
iconProvider
| 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
| 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
| 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
| 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
| 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. |
extend : common
Inherited properties : model, validationModel, icon, name, description, i18nNameKey, actionMap, secondaryActionMap, readOnly, background, foreground, font, borderType, preferredWidth, preferredHeight, paramSets, permId, grantedRoles, booleanWritabilityGates, rolesWritabilityGates, enumWritabilityGates, regexWritabilityGates
allowed previous element : tree, 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.25. subTree properties
| Property | Description |
|---|---|
|
ref
| Allows to reference an existing subtree using its identifier. It can be used everywhere a subtree can. |
|
parent
| Allows to reference another descriptor as a model and to override certain properties. |
extend : common
Inherited properties : model, validationModel, icon, 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, east, west, south, north, center, cell, evenCell, views
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.26. tabs properties
| Property | Description |
|---|---|
|
parent
| Allows to reference another descriptor as a model and to override certain properties. |
|
views
| Registers the list of views to be displayed as tabs. The tabs order follows the children views order of this list. |
|
cascadingModels
| 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
| Indicates how the actions should be rendered. This is either a value of the ERenderingOptions enum or its equivalent string representation :
Default value is null, i.e. determined from outside, e.g. the view factory. |
|
lazy
| Lazy binds tabs based on user selection. |
allowed previous element : tabs, entityCardView, basicCardView
allowed next element : polarChart, cartesianChart, form, table, listView, propertyView, referencePropertyView, enumerationPropertyView, image, actionView, tree, tabs, split, border, grid, evenGrid, entityCardView, basicCardView
Open a list of views where each view can be defined "inline"
Table III.27. views properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
extend : common
Inherited properties : model, validationModel, icon, 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, east, west, south, north, center, cell, evenCell, views
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.28. split properties
| Property | Description |
|---|---|
|
parent
| Allows to reference another descriptor as a model and to override certain properties. |
|
orientation
| With SJS the orientation is defined directly in the name of the descriptor : split_vertical or split_horizontal |
|
left
| Sets the child view to layout in the left zone of a split_horizontal |
|
right
| Sets the child view to layout in the rigth zone of a split_horizontal |
|
top
| Sets the child view to layout in the top zone of a split_vertical |
|
bottom
| Sets the child view to layout in the bottom zone of a split_vertical |
|
cascadingModels
| 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. |
allowed previous element : split
allowed next element : polarChart, cartesianChart, form, table, listView, propertyView, referencePropertyView, enumerationPropertyView, image, actionView, tree, tabs, split, border, grid, evenGrid, entityCardView, basicCardView
Enable to set an in-line view in in the left zone of a split_horizontal
Table III.29. left properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
allowed previous element : split
allowed next element : polarChart, cartesianChart, form, table, listView, propertyView, referencePropertyView, enumerationPropertyView, image, actionView, tree, tabs, split, border, grid, evenGrid, entityCardView, basicCardView
Enable to set an in-line view in in the rigth zone of a split_horizontal
Table III.30. right properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
allowed previous element : split
allowed next element : polarChart, cartesianChart, form, table, listView, propertyView, referencePropertyView, enumerationPropertyView, image, actionView, tree, tabs, split, border, grid, evenGrid, entityCardView, basicCardView
Enable to set an in-line view in in the top zone of a split_vertical
Table III.31. top properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
allowed previous element : split
allowed next element : polarChart, cartesianChart, form, table, listView, propertyView, referencePropertyView, enumerationPropertyView, image, actionView, tree, tabs, 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.32. bottom properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
extend : common
Inherited properties : model, validationModel, icon, 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, east, west, south, north, center, cell, evenCell, views
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.33. border properties
| Property | Description |
|---|---|
|
parent
| Allows to reference another descriptor as a model and to override certain properties. |
|
east
| Sets the child view to layout in the east zone. The child view will be resized vertically. |
|
west
| Sets the child view to layout in the west zone. The child view will be resized vertically. |
|
south
| Sets the child view to layout in the south zone. The child view will be resized horizontally. |
|
north
| Sets the child view to layout in the north zone. The child view will be resized horizontally. |
|
center
| Sets the child view to layout in the center zone. The child view will be resized both horizontally and vertically. |
|
cascadingModels
| 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. |
allowed previous element : border
allowed next element : polarChart, cartesianChart, form, table, listView, propertyView, referencePropertyView, enumerationPropertyView, image, actionView, tree, tabs, split, border, grid, evenGrid, entityCardView, basicCardView
Enable to set an in-line view in the east zone of a border
Table III.34. east properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
allowed previous element : border
allowed next element : polarChart, cartesianChart, form, table, listView, propertyView, referencePropertyView, enumerationPropertyView, image, actionView, tree, tabs, split, border, grid, evenGrid, entityCardView, basicCardView
Enable to set an in-line view in the west zone of a border
Table III.35. west properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
allowed previous element : border
allowed next element : polarChart, cartesianChart, form, table, listView, propertyView, referencePropertyView, enumerationPropertyView, image, actionView, tree, tabs, split, border, grid, evenGrid, entityCardView, basicCardView
Enable to set an in-line view in the south zone of a border
Table III.36. south properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
allowed previous element : border
allowed next element : polarChart, cartesianChart, form, table, listView, propertyView, referencePropertyView, enumerationPropertyView, image, actionView, tree, tabs, split, border, grid, evenGrid, entityCardView, basicCardView
Enable to set an in-line view in the north zone of a border
Table III.37. north properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
allowed previous element : border
allowed next element : polarChart, cartesianChart, form, table, listView, propertyView, referencePropertyView, enumerationPropertyView, image, actionView, tree, tabs, split, border, grid, evenGrid, entityCardView, basicCardView
Enable to set an in-line view in the center zone of a border
Table III.38. center properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
extend : common
Inherited properties : model, validationModel, icon, 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, east, west, south, north, center, cell, evenCell, views
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.39. grid properties
| Property | Description |
|---|---|
|
parent
| Allows to reference another descriptor as a model and to override certain properties. |
|
cascadingModels
| 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. |
extend : common
Inherited properties : model, validationModel, icon, 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, east, west, south, north, center, cell, evenCell, views
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.40. evenGrid properties
| Property | Description |
|---|---|
|
parent
| Allows to reference another descriptor as a model and to override certain properties. |
|
cascadingModels
| 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
| Configures the driving dimension of the grid :
Default value is ROW, i.e. distribute cells along rows then columns. |
|
drivingCellCount
| 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. |
allowed previous element : grid, evenGrid
allowed next element : propertyView, referencePropertyView, enumerationPropertyView, image, cell, evenCell
open a cells list in grid or in an evenGrid
Table III.41. cells properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
allowed previous element : cells
allowed next element : polarChart, cartesianChart, form, table, listView, propertyView, referencePropertyView, enumerationPropertyView, image, actionView, tree, tabs, split, border, grid, evenGrid, entityCardView, basicCardView
Describes constraints on a cell of a grid
Table III.42. cell properties
| Property | Description |
|---|---|
|
view
| the view to layout in the cell |
|
row
| the row to which the cell belongs |
|
column
| the column to which the cell belongs |
|
height
| the number of rows the cell spans vertically |
|
width
| the number of columns the cell spans horizontally (default value is 1) |
|
widthResizable
| wether the cell should be resized to take all the available space horizontally |
|
heightResizable
| wether the cell should be resized to take all the available space vertically |
allowed previous element : cells
allowed next element : polarChart, cartesianChart, form, table, listView, propertyView, referencePropertyView, enumerationPropertyView, image, actionView, tree, tabs, 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
extend : common
Inherited properties : model, validationModel, icon, 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, east, west, south, north, center, cell, evenCell, views
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.44. entityCardView properties
| Property | Description |
|---|---|
|
parent
| Allows to reference another descriptor as a model and to override certain properties. |
|
views
| 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. |
extend : common
Inherited properties : model, validationModel, icon, 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, east, west, south, north, center, cell, evenCell, views
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.45. basicCardView properties
| Property | Description |
|---|---|
|
parent
| Allows to reference another descriptor as a model and to override certain properties. |
|
selector
| 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. |
|
views
| 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. |
allowed previous element : Front, treeNode, controller, form, propertyView, referencePropertyView, enumerationPropertyView, tabs, tree, table, listView, split, border, grid, evenGrid, image, 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.46. actionMap properties
| Property | Description |
|---|---|
|
parents
| 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
| Indicates how the actions should be rendered. This is either a value of the ERenderingOptions enum or its equivalent string representation :
Default value is null, i.e. determined from outside, e.g. the view factory. |
|
grantedRoles
| 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
| 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
| This property is SJS specific. It allows to enforce SJS controls without actually assigning a model to the action gates. |
allowed previous element : treeNode, controller, form, propertyView, referencePropertyView, enumerationPropertyView, tabs, tree, table, listView, split, border, grid, evenGrid, image, 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.47. secondaryActionMap properties
| Property | Description |
|---|---|
|
parents
| 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
| Indicates how the actions should be rendered. This is either a value of the ERenderingOptions enum or its equivalent string representation :
Default value is null, i.e. determined from outside, e.g. the view factory. |
|
grantedRoles
| 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
| 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
| This property is SJS specific. It allows to enforce SJS controls without actually assigning a model to the action gates. |
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.48. actionList properties
| Property | Description |
|---|---|
|
description
| 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
| Sets the icon image URL of this descriptor. Supported URL protocols include :
|
|
actions
| Assigns the list of actions owned by this action list. |
|
renderingOptions
| Indicates how the actions should be rendered. This is either a value of the ERenderingOptions enum or its equivalent string representation :
Default value is null, i.e. determined from outside, e.g. the view factory. |
|
collapsable
| 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
| 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
| 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
| This property is SJS specific. It allows to enforce SJS controls without actually assigning a model to the action gates. |
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.49. action properties
| Property | Description |
|---|---|
|
parent
| Allows to reference another descriptor as a model and to override certain properties. |
|
class
| java class that implement the action |
|
ref
| Allows to reference an existing action using its identifier. It can be used everywhere an action can, e.g. in action lists. |
|
next
| 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
| 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 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
| 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
| 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
| 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
| Sets the icon image URL of this descriptor. Supported URL protocols include :
|
|
grantedRoles
| 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
| 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
| 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'] ...
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
| 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'] ...
Same mecanism has booleanActionabilityGates |
|
enumActionabilityGates
| 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']] ...
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
| 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]*'] ...
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
| 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
| 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
| This property is SJS specific. It allows to enforce SJS controls without actually assigning a model to the action gates. |
extend : action
Inherited properties : parent, class, ref, next, wrapped, custom, name, description, accelerator, icon, grantedRoles, permId, booleanActionabilityGates, rolesActionabilityGates, enumActionabilityGates, regexActionabilityGates, collectionBased, multiSelection, validationModel
allowed previous element : actionList, controller, actionView, action, next, wrapped, rowAction, itemSelectionAction, sortingAction
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.50. next properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
extend : next
Inherited properties : parent, class, ref, next, wrapped, custom, name, description, accelerator, icon, grantedRoles, permId, booleanActionabilityGates, rolesActionabilityGates, enumActionabilityGates, regexActionabilityGates, collectionBased, multiSelection, validationModel
allowed previous element : actionList, controller, actionView, action, next, wrapped, rowAction, itemSelectionAction, sortingAction
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.51. wrapped properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
extend : action
Inherited properties : parent, class, ref, next, wrapped, custom, name, description, accelerator, icon, 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.52. rowAction properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
extend : action
Inherited properties : parent, class, ref, next, wrapped, custom, name, description, accelerator, icon, grantedRoles, permId, booleanActionabilityGates, rolesActionabilityGates, enumActionabilityGates, regexActionabilityGates, collectionBased, multiSelection, validationModel
allowed previous element : controller, actionView, table, listView
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.53. itemSelectionAction properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
extend : action
Inherited properties : parent, class, ref, next, wrapped, custom, name, description, accelerator, icon, 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.54. sortingAction properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
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.55. workspace properties
| Property | Description |
|---|---|
|
parent
| Allows to use an other descriptor as a model and to override certain properties. |
|
name
| 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
| 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. |
|
icon
| Sets the icon image URL of this descriptor. Supported URL protocols include :
|
|
startup
| 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
| 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
| 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. |
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.56. module properties
| Property | Description |
|---|---|
|
parent
| Allows to use an other descriptor as a model and to override certain properties. |
|
name
| 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
| 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
| Sets the icon image URL of this descriptor. Supported URL protocols include :
|
|
moduleView
| Configures the view descriptor used to construct the view that will be displayed when this module is selected. |
|
startup
| Reference to an action trigerred at statup when the module is first selected |
|
entry
| 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
| 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
| Allows to reference an existing module using its identifier. It can be used everywhere a module can. |
|
permId
| 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
| 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. |
extend : module
Inherited properties : parent, name, description, icon, moduleView, startup, entry, exit, ref, permId, grantedRoles
mandatory : nameElement
allowed previous element : Front, workspace, module, nodeModule, collectionModule, filterModule, beanModule
allowed next element : module, collectionModule, filterModule, beanModule, nodeModule
Jspresso : BeanCollectionModule
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.57. collectionModule properties
| Property | Description |
|---|---|
|
component
| 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
| 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. |
extend : collectionModule
Inherited properties : detailView, parent, name, description, icon, moduleView, startup, entry, exit, ref, permId, grantedRoles
mandatory : nameElement, nameElement
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.58. filterModule properties
| Property | Description |
|---|---|
|
component
| 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
| 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
| 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
| 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. |
|
ordering
| 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 :
Ordering properties are considered following their order in the map iterator. |
|
pageSize
| Configures a custom page size for the result set. If not set, which is the default, the elements default page size is used. |
extend : module
Inherited properties : parent, name, description, icon, moduleView, startup, entry, exit, ref, permId, grantedRoles
mandatory : nameElement
allowed previous element : Front, workspace, module, nodeModule, collectionModule, filterModule, beanModule
allowed next element : module, collectionModule, filterModule, beanModule, nodeModule
Jspresso : BeanModule
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.59. beanModule properties
| Property | Description |
|---|---|
|
component
| 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. |
extend : module
Inherited properties : parent, name, description, icon, moduleView, startup, entry, exit, ref, permId, grantedRoles
mandatory : nameElement
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.60. nodeModule properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
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.61. controller properties
| Property | Description |
|---|---|
|
icon
| Sets the icon image URL that is used as the application icon.
|
|
workspaceIcon
| Sets the icon image URL that is used as the workspace menu icon. Same supported URL protocols than icon property. |
|
actionMap
| 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
| 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
| 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
| 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
| 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
| 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
| 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
| 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
| 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. |
|
workspaces
| Registers the workspaces that are available in the application. Workspaces are application entry-points and are hierarchically composed of modules / sub-modules. |
|
width
| Configures the width under which a scrollbar will appear. |
|
height
| Configures the height under which a scrollbar will appear. |
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.62. messageSource properties
| Property | Description |
|---|---|
|
basenames
| Configures the list of I18N resource bundles that will be used for the translations |
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.64. template properties
| Property | Description |
|---|---|
|
SJSAll
| Map of any valid SJS properties with their values |
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.65. paramSet properties
| Property | Description |
|---|---|
|
SJSAll
| Map of any valid SJS properties with their values |
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.66. namespace properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
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.67. spec properties
| Property | Description |
|---|---|
| This class does not have any specific named property. | |
allowed previous element : Front, bean, list, set, map, action, next, wrapped, rowAction, itemSelectionAction, sortingAction
allowed next element : bean, list, set, map
Allows to generate a bean Spring in the XML generated file
Table III.69. bean properties
| Property | Description |
|---|---|
|
parent
| Allows to use an other descriptor as a model and to override certain properties. |
|
prototype
| wether this bean is a prototype (i.e. a new instance is created every time) as opposed to a singleton. |
|
class
| Bean's java class |
|
ref
| Allows to reference an existing reference using its identifier. |
|
name
| 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
| 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 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'])
|
mandatory : nameElement
allowed previous element : Front, bean, list, set, map, action, next, wrapped, rowAction, itemSelectionAction, sortingAction
allowed next element : bean, list, set, map
Allows to generate a list Spring in the XML generated file
mandatory : nameElement
allowed previous element : Front, bean, list, set, map, action, next, wrapped, rowAction, itemSelectionAction, sortingAction
allowed next element : bean, list, set, map
Allows to generate a list Spring in the XML generated file
mandatory : nameElement
allowed previous element : Front, bean, list, set, map, action, next, wrapped, rowAction, itemSelectionAction, sortingAction
allowed next element : bean, list, set, map
Allows to generate a Map Spring in the XML generated file