Actions

Overview

Actions class diagram

Common part

Reference

AbstractActionContextAware

AbstractActionContextAware

Abstract class for all objects that need to manipulate an action context. It contains helper methods that takes the developer away from the standard context internal knowledge. Action developers can (should) use these helper methods (for reference manual readers, give an eye to the linked javadoc).

AbstractActionContextAware properties
Property Description
This class does not have any specific property.

AbstractAction

This is the base class for all application actions. It 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 categories :
  • 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 information, 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 explicitly 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 reuse.

Actions execute on a context (an arbitrary map of objects keyed by "well-known" character strings) that is initialized by the controller when the action is triggered. The context passes along the action chain and is thus the perfect medium for actions to loosely communicate between each other. There are some framework standard elements placed in the action context that depend on the application state, but nothing prevents action developers to synchronize on arbitrary custom context elements that would be produced/consumed to/from the context.

Regarding framework-standard context elements, an action developer can (should) leverage the utility methods declared in the AbstractActionContextAware super class instead of relying on the element keys in the map. Take a look to the AbstractActionContextAware documentation to get your hands on action context exploration.

Last but not least, you should be aware that actions should be coded with thread-safety in mind. Actual action instances are generally singleton-like (unless explicitly stated which is extremely rare) and thus, might be used by multiple sessions (threads) at once. You should never use action class attributes for argument passing along the action chain, but use the thread-owned action execution context instead. The action context is a data structure that is local to an action chain execution thus not shared across threads (users). It is the perfect place for exchanging data between actions. Of course, different instances of the same action can be used and configured differently through their class attributes (refer to it as static configuration), but this is all for using in different places in the application.

AbstractAction properties
Property Description

grantedRoles

Collection​<​String​>​

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 authorization enforcement does not prevent programmatic access that is of the developer responsibility.

nextAction

IAction

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.

permId

String

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

wrappedAction

IAction

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).


AbstractActionMonitoringPlugin

Base class of action monitoring plugins. It mainly stores the action call stack in the chain as well as start timestamp and duration.

AbstractActionMonitoringPlugin properties
Property Description
This class does not have any specific property.

AbstractLovResultViewDescriptorFactory

The base abstract implementation for lov result view factories.

AbstractLovResultViewDescriptorFactory properties
Property Description

queryComponentDescriptorFactory

IQuery​Component​Descriptor​Factory

Sets the queryComponentDescriptorFactory.


AbstractLovViewDescriptorFactory

The base abstract implementation for lov view factories.

AbstractLovViewDescriptorFactory properties
Property Description

queryComponentDescriptorFactory

IQuery​Component​Descriptor​Factory

Sets the queryComponentDescriptorFactory.

queryViewDescriptorFactory

IQuery​View​Descriptor​Factory

Sets the queryViewDescriptorFactory.

resultViewDescriptorFactory

ILov​Result​View​Descriptor​Factory

Sets the resultViewDescriptorFactory.


ConnectorValueGetterCallback

Default handler implementation to deal with getting binary properties storing them in files.

ConnectorValueGetterCallback properties
Property Description

modelPath

String

Sets model path.


DefaultCriteriaFactory

Default implementation of a criteria factory.

DefaultCriteriaFactory properties
Property Description

triStateBooleanSupported

boolean

Configures the criteria factory whether to consider use 3-states booleans, i.e. true, false or undefined. If triStateBooleanSupported is set to false, then a false boolean value will simply be ignored in the generated criteria.

useAliasesForJoins

boolean

Sets use aliases for joins.


FileToByteArrayCallback

Default handler implementation to fully read the file input stream into a byte array and setting it in the context.

FileToByteArrayCallback properties
Property Description
This class does not have any specific property.

ActionMap

ActionMap

An action map is used to structure a set of actions. The actions are not directly registered but are placed into action lists that in turn are assigned to the action map. Action maps can be merged together, i.e. an action map can have multiple parent action maps. In that case, Action lists that have the same name are merged together. The way action maps are rendered depends on the place where they are declared. For instance an action map that is assigned to a view might be rendered as a toolbar with each action list separated into its own group. On the other hand, an action map declared on the frontend controller might be represented as a menu bar on the main application frame.

ActionMap properties
Property Description

actionLists

List​<​Action​List​>​

Assigns the action lists that are directly owned by this action map. 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.

grantedRoles

Collection​<​String​>​

Assigns the roles that are authorized to use this action map. It supports "!" prefix to negate the role(s). Whenever the user is not granted sufficient privileges, the action map is simply not displayed at runtime. Setting the collection of granted roles to null (default value) disables role based authorization, then access is granted to anyone.

hideActionWhenDisabled

Boolean

Sets hidden when disabled.

parentActionMaps

List​<​Action​Map​>​

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.

permId

String

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

renderingOptions

ERendering​Options

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

  • LABEL_ICON for label and icon
  • LABEL for label only
  • ICON for icon only.

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


ActionList

ActionList

An action list is collection of actions tha can be described with a name, a description and an icon. Whether these information are visually leveraged depends on the place where the action list is used. For instance, an action list used to create a menu in a menu bar will be able to leverage its name and icon for menu representation. If it is used to define a toolbar part, none of them will be leveraged. The name of the action list is also used to identify the sibling action lists to be merged when inheriting action map together.

ActionList properties
Property Description

actions

List​<​IDisplayable​Action​>​

Assigns the list of actions owned by this action list.

collapsable

boolean

Configures the action list 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

Collection​<​String​>​

Assigns the roles that are authorized to use this action list. It supports "!" prefix to negate the role(s). Whenever the user is not granted sufficient privileges, the action list is simply not displayed at runtime. Setting the collection of granted roles to null (default value) disables role based authorization, then access is granted to anyone.

hideActionWhenDisabled

Boolean

Sets hidden when disabled.

permId

String

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

renderingOptions

ERendering​Options

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

  • LABEL_ICON for label and icon
  • LABEL for label only
  • ICON for icon only.

Default value is null, i.e. determined from outside, e.g. the view factory or the owning action map.


Backend actions

Reference

BackendAction

BackendAction

This class should serve as base class for implementing actions that execute on the backend (domain model) of the application. It provides accessors on the context elements that are generally used through the action execution process.

BackendAction properties
Property Description

badFrontendAccessChecked

boolean

Sets the badFrontendAccessChecked.


AbstractCloneAction

An action used duplicate a domain object. the cloned domain object is set as model for the current view.

 protected abstract Object cloneElement(Object element,
     Map<String, Object> context)
 
AbstractCloneAction properties
Property Description
This class does not have any specific property.

CloneComponentAction

An action used duplicate an entity or a component. This action is parametrized with a clone factory (IEntityCloneFactory) to perform the actual component cloning. Executing this action will result in setting the cloned component to the underlying view.

CloneComponentAction properties
Property Description

entityCloneFactory

IEntity​Clone​Factory

Configures the entity clone factory to use to clone the components or entities.


AbstractCollectionAction

Base class for backend actions acting on collection models. This class is just used to refine certain protected methods return types.

AbstractCollectionAction properties
Property Description

viewPath

int

Sets view path.


AbstractAddCollectionToMasterAction

An action used in master/detail views to create and add a new detail to a master domain object. The only method to be implemented by concrete subclasses to retrieve the instances to be added to the master is :

 protected abstract List<?>
           getAddedComponents(Map<String, Object> context)
 

AbstractAddCollectionToMasterAction properties
Property Description

ignoreSelection

boolean

Sets ignore selection.

initializationMapping

Map​<​String​,Object​>​

Sets initialization mapping.


AbstractCloneCollectionAction

An action used duplicate a collection of domain objects. Cloning an entity should result in adding it to the collection the action was triggered on. Components to clone are retrieved from the context using the selected indices of the model collection connector. Actual cloning of components is left to concrete implementations that must implement :

 protected abstract Object cloneElement(Object element,
     Map<String, Object> context)
 
AbstractCloneCollectionAction properties
Property Description
This class does not have any specific property.

CloneComponentCollectionAction

An action used duplicate a collection of entities or components. This action is parametrized with a clone factory (IEntityCloneFactory) to perform the actual component cloning. Executing this action will result in adding the cloned component(s) to the underlying model collection.

CloneComponentCollectionAction properties
Property Description

entityCloneFactory

IEntity​Clone​Factory

Configures the entity clone factory to use to clone the components or entities.


AddAnyCollectionToMasterAction

An action used in master/detail views to add new detail(s) to a master domain object. The details to add are taken from the action context through the ActionParameter context value.

AddAnyCollectionToMasterAction properties
Property Description
This class does not have any specific property.

AddComponentCollectionToMasterAction

An action used in master/detail views to create and add a new detail to a master domain object. Entity (or component) to add are actually created by the entity factory retrieved from the action context. The class of entity (component) to create is either taken :

  1. from the action context under the key ELEMENT_DESCRIPTOR
  2. or, if it does not exist, taken from the view model descriptor. In this case, the component descriptor to use is the element descriptor of the underlying collection descriptor.

AddComponentCollectionToMasterAction properties
Property Description
This class does not have any specific property.

AddMapToMasterAction

An action used in master/detail views where models are backed by maps to create and add a new detail to a master domain object. The new instance created is an instance of org.jspresso.framework.util.collection.ObjectEqualityMap. Default property values as well as onCreate lifecycle interceptors registered on the component descriptor are supported.

AddMapToMasterAction properties
Property Description
This class does not have any specific property.

CloneMapCollectionAction

An action used duplicate a collection of domain objects implemented as maps. Newly created maps are instances of org.jspresso.framework.util.collection.ObjectEqualityMap that contains the same key/value pairs as the maps to clone. Executing this action will result in adding the cloned map to the underlying model collection.

CloneMapCollectionAction properties
Property Description
This class does not have any specific property.

PasteCollectionToMasterAction

An action used in master/detail views to paste previously copied or cut detail(s) to a master domain object. The application clipboard is used to retrieve the entities (or components) to paste. Whenever the components have been previously copied to the clipboard, the paste action will clone them when executed using the configured entity clone factory. Whenever the components have been previously cut, the paste action will simply use the exact same instances as the one placed on the clipboard.

PasteCollectionToMasterAction properties
Property Description

entityCloneFactory

IEntity​Clone​Factory

Configures the entity clone factory to use when the paste action is triggered after a copy.


CollectionElementMoveAction

This action can be declared on views that are backed by collections with list semantics (indexed collections). It allows to take a the selected elements and move them in the collection using a configured offset. It allows for re-ordering the list.

CollectionElementMoveAction properties
Property Description

offset

int

Configures the offset to use when moving the selected elements inside the list. A configured offset of 1 will increase (move down) by one the selected elements indices whereas an offset of -1 will decrease (move up) the selected elements indices.

toBottom

boolean

Configures this action to move the selected elements to the bottom of the list.

toTop

boolean

Configures this action to move the selected elements to the top of the list.


RemoveCollectionFromMasterAction

An action used in master/detail views to remove selected details from a master domain object. No further operation (like actual removal from a persistent store) is performed by this action.

RemoveCollectionFromMasterAction properties
Property Description
This class does not have any specific property.

RemoveCollectionFromMasterAction

An action used in master/detail views to remove selected details from a master domain object. More than just removing the selected details from their owning collection, this action "cuts" the existing links between the entities to remove and the rest of the domain then registers them for deletion on next save operation.

Note that cleaning of relationships is a 2 pass process. The 1st one is a dry run that checks that no functional exception is thrown by the business rules. The second one performs the actual cleaning.

RemoveCollectionFromMasterAction properties
Property Description
This class does not have any specific property.

RemoveFromModuleObjectsAction

This action, which is to be used on bean collection modules, removes the selected objects from the module's projected collection. If one (or more) of the removed objects are also used in children bean modules, the corresponding children bean modules are also removed accordingly.

RemoveFromModuleObjectsAction properties
Property Description
This class does not have any specific property.

RemoveModuleObjectAction

This action, which is to be used on bean modules, deletes the module object from the persistent store. The bean module is also removed from it's parent accordingly.

RemoveModuleObjectAction properties
Property Description
This class does not have any specific property.

SetActionParamFromSelectedComponentsAction

A trivial backend action that updates the action context by setting the ActionParameter with the selected components of the underlying model.

SetActionParamFromSelectedComponentsAction properties
Property Description
This class does not have any specific property.

AbstractLdapAction

Root abstract class of actions that deal with LDAP directory. It's only purpose is to standardize the use of Spring LdapTemplate.

AbstractLdapAction properties
Property Description

ldapTemplate

Ldap​Template

Configures the Spring LDAP template to use with this action.


AbstractPasswordAction

Abstract pasword class with base methods for encofding and hashing passwords.

AbstractPasswordAction properties
Property Description

digestAlgorithm

String

Sets the digestAlgorithm to use to hash the password before storing it (MD5 for instance).

hashEncoding

String

Sets the hashEncoding to encode the password hash before storing it. You may choose between :

  • BASE64 for base 64 encoding.
  • HEX for base 16 encoding.
Default encoding is BASE64.


AbstractChangePasswordAction

This is the base class for implementing an action that performs actual modification of a logged-in user password. This implementation delegates to subclasses the actual change in the concrete JAAS store. This backend action expects a Map<String,Object> in as action parameter in the context. This map must contain :

  • password_current entry containing current password. Entry key can be referred to as PASSWD_CURRENT static constant.
  • password_typed entry containing the new password. Entry key can be referred to as PASSWD_TYPED static constant.
  • password_retyped entry containing the new password retyped. Entry key can be referred to as PASSWD_RETYPED static constant.
For the action to succeed, current_password must match the logged-in user current password and password_typed and password_retyped mut match between each other. The only method to be implemented by concrete subclasses is :

 protected abstract boolean changePassword(UserPrincipal userPrincipal,
           String currentPassword, String newPassword)
 
AbstractChangePasswordAction properties
Property Description

allowEmptyPasswords

boolean

Configures the possibility to choose an empty password.

Default value is true, i.e. allow for empty passwords.

allowLoginPasswords

boolean

Configures the possibility to choose a password that equals the login.

Default value is true, i.e. allow for password equals login.

passwordRegex

String

Configures a regex that new passwords must match.

Default value is null, i.e. no regex is enforced.

passwordRegexSample

String

Configures an example of a valid password to explain the regex rules.


DatabaseChangePasswordAction

Concrete backend implementation of a change password action where password is stored in a relational database.

DatabaseChangePasswordAction properties
Property Description

jdbcTemplate

Jdbc​Template

Configures the Spring jdbcTemplate to use to issue the update statement.

updateQuery

String

Configures the update query to execute to change the password. The prepared statement parameters that will be bound are, in order :

  1. "new password" potentially hashed.
  2. "user name".
  3. "current password" potentially hashed.


LdapChangePasswordAction

Concrete backend implementation of a change password action where password is stored in an LDAP directory. The user DN to use to connect to the LDAP directory is the one stored in the user principal from the login process.

LdapChangePasswordAction properties
Property Description

ldapUrl

String

Configures the LDAP url (e.g. http://localhost:389) of the LDAP directory. The user must be authorized to change its own password in the LDAP backend.


MockChangePasswordAction

Mocks up password change.

MockChangePasswordAction properties
Property Description
This class does not have any specific property.

AbstractResetPasswordAction

This is the base class for implementing an action that performs actual reset of a logged-in user password. This implementation delegates to subclasses the actual change in the concrete JAAS store. This backend action will generate a random String that will replace the user password in the store.

The only method to be implemented by concrete subclasses is :

 protected abstract boolean resetPassword(String username, String newPassword)
 
AbstractResetPasswordAction properties
Property Description
This class does not have any specific property.

DatabaseResetPasswordAction

Concrete backend implementation of a reset password action where password is stored in a relational database.

DatabaseResetPasswordAction properties
Property Description

jdbcTemplate

Jdbc​Template

Configures the Spring jdbcTemplate to use to issue the update statement.

updateQuery

String

Configures the update query to execute to change the password. The prepared statement parameters that will be bound are, in order :

  1. "new password" potentially hashed.
  2. "user name".


MockResetPasswordAction

Mocks up password reset.

MockResetPasswordAction properties
Property Description
This class does not have any specific property.

AbstractQbeAction

Abstract base class for QBE find actions.

AbstractQbeAction properties
Property Description

queryAction

IAction

Configures the query action used to actually perform the entity query.

sortOnly

boolean

Sets the sortOnly.


FindAction

This action will climb the model connector hierarchy to retrieve a query component used as QBE filter. It will then tailor paging status on this query component before continuing execution. This action is meant to be chained with an actual backend action to perform the query (like QueryEntitiesAction).

FindAction properties
Property Description
This class does not have any specific property.

QueryModuleFilterAction

Retrieves the filter of a module and queries the persistent store to populate the module objects. The actual query is delegated to another backend action (defaulted to QueryEntitiesAction) that can be configured through the queryAction property.

QueryModuleFilterAction properties
Property Description
This class does not have any specific property.

AbstractQueryComponentsAction

This action is the base abstract class to query components by example. It is used behind the scene in several places in Jspresso based applications, as in filtered bean collection modules, list of values, ... The principles are to perform a search based on the Jspresso "IQueryComponent ". A Jspresso query component is a hierarchical data structure that mimics a portion of the domain model headed by an entity. It is essentially a set of property/value pairs where values can be :

  1. a scalar value
  2. a comparable query structure (operator, inf and sup value) to place a constraint on a comparable property (date, number, ...)
  3. a sub query component

Whenever the query is successful, the result is merged back to the application session and assigned to the query component queriedComponents property.

Note that there is 1 hook that can be configured by injection to fine-tune the performed query : queryComponentRefiner.

AbstractQueryComponentsAction properties
Property Description

mergeMode

EMerge​Mode

Sets the mergeMode to use when assigning the queried components to the filter query component. A null value means that the queried components will assigned without being merged at all. In that case, the merging has to be performed later on in the action chain. Forgetting to do so will lead to unexpected results. Default value is EMergeMode.MERGE_CLEAN_LAZY.

queryComponentRefiner

IQuery​Component​Refiner

Configures a query component refiner that will be called before the query component is processed to extract the Hibernate detached criteria. This allows for instance to force query values.

useCountForPagination

boolean

Sets use count for pagination.


QueryEntitiesAction

This action is used to Hibernate query entities by example. It is used behind the scene in several places in Jspresso based applications, as in filtered bean collection modules, list of values, ... The principles are to tailor an Hibernate Criterion based on the Jspresso "IQueryComponent ". A Jspresso query component is a hierarchical data structure that mimics a portion of the domain model headed by an entity. It is essentially a set of property/value pairs where values can be :

  1. a scalar value
  2. a comparable query structure (operator, inf and sup value) to place a constraint on a comparable property (date, number, ...)
  3. a sub query component

Out of this query component, the action will build an Hibernate detached criteria by constructing all join sub-criteria whenever necessary.

Once the detached criteria is complete, the action will perform the Hibernate query while using paging information taken from the query component as well as custom sorting properties.

Whenever the query is successful, the result is merged back to the application session and assigned to the query component queriedComponents property.

Note that there are 2 hooks that can be configured by injection to fine-tune the performed query : queryComponentRefiner and criteriaRefiner.

QueryEntitiesAction properties
Property Description

criteriaFactory

ICriteria​Factory

Sets the criteriaFactory.

criteriaRefiner

ICriteria​Refiner

Configures a criteria refiner that will be called before the Hibernate detached criteria is actually used to perform the query. It allows to complement the criteria with arbitrary complex clauses that cannot be simply expressed in a "Query by Example" semantics.

useInListForPagination

boolean

Sets the useInListForPagination.


StaticQueryComponentsAction

This action filters an arbitrary component list against the query component using a query component matcher.

StaticQueryComponentsAction properties
Property Description

componentStore

List​<​?​>​

Sets component store.


AddBeanAsSubModuleAction

This action can be installed on any collection view and will :

  1. take the selected elements in the underlying model collection,
  2. create bean modules out of them, using the childModuleProjectedViewDescriptor as projected view if it has been configured,
  3. add the created bean modules as children of the currently selected module, visualizing them in the workspace navigation tree.
Whenever there is no childModuleProjectedViewDescriptor configured, and the currently selected module is a bean collection module, the created modules projected view descriptor is taken from the bean collection module (elementViewDescriptor).

AddBeanAsSubModuleAction properties
Property Description

childModuleProjectedViewDescriptor

IView​Descriptor

Sets the childModuleProjectedViewDescriptor.


CreateQueryComponentAction

Creates a query component to be used in filters or list of values. The created query component is stored in the context under the key IQueryComponent.QUERY_COMPONENT. Further explanations are given about query components in the QueryEntitiesAction documentation.

CreateQueryComponentAction properties
Property Description

queryComponentDescriptorFactory

IQuery​Component​Descriptor​Factory

Sets the queryComponentDescriptorFactory.

queryComponentRefiner

IQuery​Component​Refiner

Sets the queryComponentRefiner.


DeleteEntityAction

An action used to delete the entity that is model of the view.

Note that cleaning of relationships is a 2 pass process. The 1st one is a dry run that checks that no functional exception is thrown by the business rules. The second one performs the actual cleaning.

DeleteEntityAction properties
Property Description
This class does not have any specific property.

GenerateJasperReportAction

This action performs the actual Jasper report generation using a JDBC data source. The report design is retrieved from the action context (under the key IReport.REPORT_ACTION_PARAM). The report context used during the generation includes the action context so that all Jspresso managed objects can be leveraged in the report itself. The logged-in user locale is used as the report locale.

The resulting JasperPrint report is then placed into the action context as action parameter for further processing (like PDF production for instance).

GenerateJasperReportAction properties
Property Description

jdbcTemplate

Jdbc​Template

Configures the JDBC template (wrapping a data source) to use for filling the report.


InitModuleFilterAction

Initialize a module filter with a brand new query component and resets the module objects collection.

InitModuleFilterAction properties
Property Description

createQueryComponentAction

Create​Query​Component​Action

Sets the createQueryComponentAction.

queryComponentRefiner

IQuery​Component​Refiner

Sets the queryComponentRefiner.


PurgeCompletedAsynExecutorsAction

Purges completed asynchronous action executors.

PurgeCompletedAsynExecutorsAction properties
Property Description
This class does not have any specific property.

ReloadAction

Reloads the entities provided by the context ActionParameter. The whole entities graphs are reloaded from the persistent store.

ReloadAction properties
Property Description

transactional

boolean

Sets transactional.


ReloadModuleObjectAction

Reloads all the module entities as well as all its sub-modules entities recursively. The whole entities graphs are reloaded from the persistent store.

ReloadModuleObjectAction properties
Property Description
This class does not have any specific property.

RemoveFromModuleObjectsAction

This action, which is to be used on bean collection modules, removes the selected objects from the module's projected collection and deletes them from the persistent store. If one (or more) of the removed objects are also used in children bean modules, the corresponding children bean modules are also removed accordingly. It is versatile enough to work on mobile collection module details.

RemoveFromModuleObjectsAction properties
Property Description
This class does not have any specific property.

ResetConnectorValueAction

Resets the model connector value to null.

ResetConnectorValueAction properties
Property Description

modelPath

String

Sets model path.


SaveAction

Saves the entities provided by the context ActionParameter. All previously registered persistence operations are also performed.

SaveAction properties
Property Description
This class does not have any specific property.

SaveModuleObjectAction

Saves all the module entities as well as all its sub-modules entities recursively. All previously registered persistence operations are also performed.

SaveModuleObjectAction properties
Property Description
This class does not have any specific property.

ScriptedBackendAction

A scripted backend action. The action takes the script to execute (an IScript implementation) out of its context (using ActionParameter) and delegates the actual script execution to a IScriptHandler configured through the scriptHandler property.

ScriptedBackendAction properties
Property Description

scriptHandler

IScript​Handler

Configures the script handler to use to perform the script execution.


StaticScriptedBackendAction

A statically scripted backend action. The script and the scripting language are statically configured in the action itself.

StaticScriptedBackendAction properties
Property Description

script

String

Sets the script source code.

scriptLanguage

String

Sets the script language this scripted action is written in.


SelectEntityPropertyAction

A generic action to fill-in the context ActionParameter with the value of an entity property.

SelectEntityPropertyAction properties
Property Description

property

String

Configures the property to extract out of the underlying model.


TransferCollectionAction

An action used to register a collection of domain objects into the application's clipboard along with a transfer mode semantics.

TransferCollectionAction properties
Property Description

transferMode

ETransfer​Mode

Configures the transferMode to use when pasting will be requested, i.e. :

  • ETransferMode.COPY for copy semantics.
  • ETransferMode.MOVE for move/cut semantics.


Frontend actions

Reference

FrontendAction

FrontendAction

This is the base class for frontend actions. To get a better understanding of how actions are organized in Jspresso, please refer to AbstractAction documentation.

This base class allows for visual (name, icon, toolTip) as well as accessibility (accelerator, mnemonic shortcuts) and actionability (using gates) parametrization.

A frontend action is to be executed by the frontend controller in the context of the UI. It can thus access the view structure, interact visually with the user, and so on. A frontend action can chain a backend action but the opposite will be prevented.

FrontendAction properties
Property Description

acceleratorAsString

String

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 d or ctrl c. This is the syntax supported by the javax.swing.KeyStroke#getKeyStroke(...) swing static method.

actionabilityGates

Collection​<​IGate​>​

Assigns a collection of gates to determine action actionability. An action will be considered actionable (enabled) if and only if all gates are open. This mechanism 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.

Jspresso provides a useful set of gate types, like the binary property gate that open/close based on the value of a boolean property of the view model the action is installed to.

By default, frontend actions are assigned a generic gate that closes (disables the action) when the view is not assigned any model.

collectionBased

boolean

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

description

String

Sets the key used to compute the internationalized description of the action. The translated description is then usually used as toolTip for the action.

hiddenWhenDisabled

Boolean

Sets hidden when disabled.

icon

Icon

Sets the icon.

iconImageURL

String

Sets the icon image URL used to decorate the action UI component peer.

Supported URL protocols include :

  • all JVM supported protocols
  • the jar:/ pseudo URL protocol
  • the classpath:/ pseudo URL protocol

iconPreferredHeight

int

Sets the icon preferred height.

iconPreferredWidth

int

Sets the icon preferred width.

mnemonicAsString

String

Configures the mnemonic key used for this action. Support of this feature depends on the UI execution platform. Mnemonics are typically used in menu and menu items.

multiSelectionEnabled

boolean

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

name

String

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

repeatPeriodMillis

Integer

Sets repeat period in milliseconds. Whenever this is set to a positive integer, the client UI controller should schedule an execution of this action periodically.

styleName

String

Assigns the style name to use for this view. The way it is actually leveraged depends on the UI channel. It will generally be mapped to some sort of CSS style name.

Default value is null, meaning that a default style is used.


AbstractChartAction

This is the abstract base class for Fusioncharts (flash based charting library) display actions. It holds several common properties that are independent from the actual, concrete, implementations.

AbstractChartAction properties
Property Description

actions

List​<​IDisplayable​Action​>​

Configures a list of actions to install in the chart modal dialog.

chartDescriptor

IChart​Descriptor

This property describes the chart to compute and display. A chart descriptor is a simple data structure that provides :

  • the URL of the chart SWF archive (can be loaded by the classloader using a classpath pseudo URL)
  • the title of the chart
  • the width/height of the chart area
  • an abstract method to implement in order to compute the chart XML data

jdbcTemplate

Jdbc​Template

Configures the JDBC template to be used by the chart to compute its data.


DisplayChartAction

This is the concrete implementation of the Fusionchart display action. This action is specialized by UI channel, i.e. server based UI channels (Ajax, Flex, ULC) will use server .DisplayChartAction whereas standalone UI channels (Swing) will use standalone.DisplayChartAction.

DisplayChartAction properties
Property Description
This class does not have any specific property.

AbstractEditComponentAction

This action serves as a base class for actions that pop-pup a dialog to edit a component.

AbstractEditComponentAction properties
Property Description

complementaryActions

List​<​?​>​

Installs a list of complementary actions to install between the ok and cancel actions.

viewDescriptor

IView​Descriptor

Configures the view descriptor to be used to create the component editing view that will be installed in the dialog.


EditComponentAction

This action pulls a model out of the context (action parameter or selected model if action parameter is not filled), creates a view, binds it on the model and prepares for chaining with a modal dialog action to pop-up the result. The translated name of the action, whenever not empty, will be used as the dialog title. If the context extracted model is a collection, the first element of the collection is used. Custom actions ( okAction and cancelAction) can be configured to take care of user decision when closing the dialog.

EditComponentAction properties
Property Description

cancelAction

IDisplayable​Action

Configures the action to be installed in the dialog when the user cancels the component edition.

okAction

IDisplayable​Action

Configures the action to be installed in the dialog when the user confirms the component edition.


ChangePasswordAction

This is the frontend action to initiate the logged-in user password change. It will install a form view with a custom component designed to host :

  1. the current password
  2. the new password
  3. the confirmation for the new password
This action must be combined (setting okAction) with a concrete subclass of backend AbstractChangePasswordAction that performs the actual password change depending on the authentication backend. Jspresso offers two concrete implementations :
  • LdapChangePasswordAction for LDAP based authentication backend
  • DatabaseChangePasswordAction for JDBC based authentication backend

ChangePasswordAction properties
Property Description
This class does not have any specific property.

CreateEntityFromLovAction

The type Create entity from lov action.

CreateEntityFromLovAction properties
Property Description
This class does not have any specific property.

EditBackendControllerAction

This is a frontend action to display a view backed by the session backend controller itself. It is used, for instance, to display the running asynchronous actions.

EditBackendControllerAction properties
Property Description
This class does not have any specific property.

EditFrontendControllerAction

This is a frontend action to display a view backed by the session backend controller itself. It is used, for instance, to display the running asynchronous actions.

EditFrontendControllerAction properties
Property Description
This class does not have any specific property.

EditReportParametersAction

This action takes a report (IReport) from the context ( REPORT_ACTION_PARAM key) and pops-up a form to allow for the report input parameters customization.

EditReportParametersAction properties
Property Description
This class does not have any specific property.

MobileEditComponentAction

This is the mobile version of the edit component action. okAction and cancelAction) are added as page actions instead of dialog ones.

MobileEditComponentAction properties
Property Description
This class does not have any specific property.

EditSelectedComponentAction

This action should be installed on collection views. It takes the selected component and edit it in a modal dialog. Editing happens in a "Unit of Work" meaning that it can be rolled-back when canceling.

EditSelectedComponentAction properties
Property Description

cancelAction

Frontend​Action​<​E​,F​,G​>​

Sets the cancelAction.

okAction

Frontend​Action​<​E​,F​,G​>​

Sets the okAction.


AbstractMessageAction

This is the base class for all UI message based communication actions. This type of action generally opens a modal dialog to display an informational message, ask a question, and so on. It takes the message from the action context parameter and supports basic HTML formatting. In order for the message to be interpreted as HTML, it must be surrounded by <HTML> tags.

AbstractMessageAction properties
Property Description
This class does not have any specific property.

InfoAction

This action pops-up an informational message to the user.

InfoAction properties
Property Description
This class does not have any specific property.

StaticInfoAction

This action pops-up an informational message to the user. The message, instead of being extracted out of the context, is parametrized statically into the action through its internationalization key.

StaticInfoAction properties
Property Description

messageCode

String

Configures the i18n key used to translate the message that is to be displayed to the user. When the action executes, the statically configured message is first translated, then placed into the action context to be popped-up.


OkCancelAction

This action pops-up an Ok - Cancel confirmation option. Depending on user answer, another action is triggered. The Ok - Cancel alternative actions are parametrized statically.

OkCancelAction properties
Property Description

cancelAction

IAction

Assigns the action to execute when the user cancels the option.

okAction

IAction

Assigns the action to execute when the user confirms the option.


StaticOkCancelAction

This action pops-up an Ok - Cancel confirmation option. The message, instead of being extracted out of the context, is parametrized statically into the action through its internationalization key.

StaticOkCancelAction properties
Property Description

messageCode

String

Configures the i18n key used to translate the message that is to be displayed to the user. When the action executes, the statically configured message is first translated, then placed into the action context to be popped-up.


YesNoAction

This action pops-up a binary question. Depending on user answer, another action is triggered. The Yes - No alternative actions are parametrized statically.

YesNoAction properties
Property Description

noAction

IAction

Assigns the action to execute when the user answers negatively to the question.

yesAction

IAction

Assigns the action to execute when the user answers positively to the question.


StaticYesNoAction

This action pops-up a binary question. The message, instead of being extracted out of the context, is parametrized statically into the action through its internationalization key.

StaticYesNoAction properties
Property Description

messageCode

String

Configures the i18n key used to translate the message that is to be displayed to the user. When the action executes, the statically configured message is first translated, then placed into the action context to be popped-up.


YesNoCancelAction

This action pops-up a binary question with Cancel option. Depending on user answer, another action is triggered. The Yes - No - Cancel alternative actions are parametrized statically.

YesNoCancelAction properties
Property Description

cancelAction

IAction

Assigns the action to execute when the user cancels the option.

noAction

IAction

Assigns the action to execute when the user answers negatively to the question.

yesAction

IAction

Assigns the action to execute when the user answers positively to the question.


StaticYesNoCancelAction

This action pops-up a binary question with Cancel option. The message, instead of being extracted out of the context, is parametrized statically into the action through its internationalization key.

StaticYesNoCancelAction properties
Property Description

messageCode

String

Configures the i18n key used to translate the message that is to be displayed to the user. When the action executes, the statically configured message is first translated, then placed into the action context to be popped-up.


AbstractModuleDirtyStateAction

This is the base abstract class for actions that are responsible for checking module dirty state. Dirty is taken in the sense of an entity needing to be flushed to the persistent store. Among modules that are to be checked, a collection module is marked dirty if and only if one of its module objects is an entity which is dirty. On the other hand, a bean module is marked dirty if and only if its (single) module object is an entity and is dirty.

AbstractModuleDirtyStateAction properties
Property Description
This class does not have any specific property.

CheckAllModulesDirtyStateAction

This action recomputes all application modules dirty state. All the workspaces are traversed as well as, for each workspace, the whole module hierarchy. This action is typically triggered before a user exists the application to bring up a notification of potentially lost pending changes.

CheckAllModulesDirtyStateAction properties
Property Description
This class does not have any specific property.

CheckModuleDirtyStateAction

This action recomputes the dirty state of the current selected module. It is typically triggered when the user navigates (leaves) out of the module to compute a visual notification of a pending change.

CheckModuleDirtyStateAction properties
Property Description
This class does not have any specific property.

AnimateAction

Selects animates current page.

AnimateAction properties
Property Description

animation

String

Sets animation.

callbackAction

IAction

Sets callback action.

direction

String

Sets direction.

duration

int

Sets duration.

hideView

boolean

Sets hide view.

reverse

boolean

Sets reverse.


BackPageAction

Triggers back navigation of current page.

BackPageAction properties
Property Description
This class does not have any specific property.

ChooseFileAction

This is the abstract base class for actions dealing with client file system operations. It holds several parametrizations that are common to all file operations. Please, be aware that these FS actions heavily depend on the UI channel, i.e. you have different implementation classes (but registered under the same Spring name) for all supported UI technologies. For instance, SaveFileAction will have as many implementations as the number of supported UIs, each in a specific package :

org.jspresso.framework.application.frontend.action. [ui].file.SaveFileAction

ChooseFileAction properties
Property Description

defaultFileName

String

Configures a default file name to be used whenever a file needs to be chosen. Subclasses ma use their specific callback to override this name with a more dynamically computed one.

fileFilter

Map​<​String​,List​>​

Configures the file filters to be used whenever the UI technology supports it in the file choosing dialog. Filter file types are a map of descriptions keying file extension lists.

For instance, an entry in this map could be :

  • key : "images"
  • value : [".png",".jpg",".gif",".bmp"]


OpenFileAction

This action lets the user browse his local file system and choose a file to read some content from. What is done with the file content is determined by the configured fileOpenCallback instance.

OpenFileAction properties
Property Description

fileMaxSize

Integer

Sets the file max size.

fileOpenCallback

IFile​Open​Callback

Configures the file open callback instance that will be used to deal with the file dialog events. Two methods must be implemented :

  • fileChosen(InputStream, IActionHandler, Map[String, Object]) that is called whenever a file has been chosen. The input stream that is passed as parameter allows for reading from the chosen file. The developer doesn't have to cope with closing the stream.
  • cancel(IActionHandler, Map[String, Object]) that is called whenever the file selection is cancelled. It is perfectly legal not to do anything.


OpenFileAsBinaryPropertyAction

This action lets the user browse the local file system and choose a file to update the content of a binary property. Files are filtered based on the file filter defined in the binary property descriptor. This file action must be installed on a property view. A suitable (built-in) file open callback is installed upon action instantiation and thus, nothing has to be configured for the action to be immediately operational.

OpenFileAsBinaryPropertyAction properties
Property Description

modelPath

String

Sets model path.


SaveFileAction

This action lets the user browse his local file system and choose a file to write some content to. What is done with the file content is determined by the configured fileSaveCallback instance.

SaveFileAction properties
Property Description

contentType

String

Configures the content type to be used whenever the UI technology used requires a download. The content type defaults to "application/octet-stream".

fileSaveCallback

IFile​Save​Callback

Configures the file save callback instance that will be used to deal with the file dialog events. Three methods must be implemented :

  • fileChosen(OutputStream, IActionHandler, Map[String, Object]) that is called whenever a file has been chosen. The output stream that is passed as parameter allows for writing to the chosen file. The developer doesn't have to cope with flushing nor closing the stream.
  • getFileName(Map[String, Object]) that is called to give a chance top the callback to compute a file name dynamically depending on the action context. Whenever the callback returns a null or empty file name, the default file name parametrized in the application is used.
  • cancel(IActionHandler, Map[String, Object]) that is called whenever the file selection is cancelled. It is perfectly legal not to do anything.


SaveBinaryPropertyAsFileAction

This action lets the user browse the local file system and choose a file to save the content of a binary property to. Files are filtered based on the file filter defined in the binary property descriptor. This file action must be installed on a property view. A suitable (built-in) file open callback is installed upon action instantiation and thus, nothing has to be configured for the action to be immediately operational.

SaveBinaryPropertyAsFileAction properties
Property Description

modelPath

String

Sets model path.


CleanModuleAndGoBackIfTransientAction

Check current selected module object. If it is transient, removes it from the current module and go back.

CleanModuleAndGoBackIfTransientAction properties
Property Description
This class does not have any specific property.

DisplayJasperReportAction

This action will take a JasperPrint (a processed Jasper report instance), produce a PDF output and open a browser window (tab) to display it.

DisplayJasperReportAction properties
Property Description
This class does not have any specific property.

EditCurrentPageAction

Triggers editing of current page.

EditCurrentPageAction properties
Property Description
This class does not have any specific property.

NearElementAction

Selects next / previous element.

NearElementAction properties
Property Description

onFailureAction

IAction

Sets on failure action.

onSuccessAction

IAction

Sets on success action.

reverse

boolean

Sets reverse.


AbstractReportAction

Abstract base class for Jasper report actions.

AbstractReportAction properties
Property Description

reportFactory

IReport​Factory

Configures the report factory to use. The report factory is responsible for creating an IReport (a concrete report instance) from a report descriptor (IReportDescriptor).


ReportAction

This action allows the user to select a report to generate on the collection view where it has been installed. The collection backing the view can either be a collection of IReport or IReportDescriptor. In the latter situation, the corresponding IReport instances are created on the fly using the configured report factory.

ReportAction properties
Property Description
This class does not have any specific property.

StaticReportAction

This action generates and displays a report that is statically configured through the reportDescriptor parameter. The report context is augmented with the identifier of the entity that is selected in the view were the action is installed, under the key ENTITY_ID.

StaticReportAction properties
Property Description

reportDescriptor

IReport​Descriptor

Configures the report to execute.


ActionParamToSelectedModelAction

A very simple frontend action that uses the puts the context action param as selected model.

ActionParamToSelectedModelAction properties
Property Description
This class does not have any specific property.

AddBeanAsSubModuleFrontAction

This action can be installed on any collection view and will take the selected elements in the underlying model collection and create a bean module out of them.

AddBeanAsSubModuleFrontAction properties
Property Description

childModuleProjectedViewDescriptor

IView​Descriptor

Sets the childModuleProjectedViewDescriptor.

parentModuleName

String

Sets the parent module where to add components to.

parentWorkspaceName

String

Sets the WorkspaceName where to add components to.

referencePath

String

Allows to configure a property path to extract the bean(s) to add from the selected models. If null, which is the default value, the selected models are used themselves.


AddCollectionToMasterAction

This action is designed to wrap a backend action that will create and add a (collection of) component(s) to the model collection of the view it's installed on. Its objective is to complete the action context with the descriptor of the component (or entity) to be added so that the backend action explicitly knows what to create. Moreover, the name, description and icon used for the graphical representation are all computed out of the configured elementEntityDescriptor.

AddCollectionToMasterAction properties
Property Description

elementEntityDescriptor

IComponent​Descriptor​<​IEntity​>​

Configures the descriptor of the entities that are to be added by the action to the underlying model collection. Setting this property serves multiple objectives :

  • complete the application context with the AddComponentCollectionToMasterAction.ELEMENT_DESCRIPTOR key so that the chained backend action knows what type of entity to create.
  • customize the name, description and icon used to represent the action in the UI. All three are derived from the configured element entity descriptor.


AddPageAction

A special mobile pagination action that adds a page to the current results.

AddPageAction properties
Property Description
This class does not have any specific property.

BinaryPropertyInfoAction

This action displays information about a binary property content. The displayed information mainly consists in the content size. The action must be installed on a property view and supports textual and binary properties.

BinaryPropertyInfoAction properties
Property Description

modelPath

String

Sets model path.


ChooseActionAction

This action displays a list of frontend actions so that the user can choose and launch one of them. This action is meant to be chained with the generic ChooseComponentAction so that the action list is actually displayed.

ChooseActionAction properties
Property Description

actions

List​<​IDisplayable​Action​>​

Configures the list of actions to choose from.


ChooseComponentAction

This action takes an arbitrary model collection connector from the action context parameter and binds it to a newly created table view. This action is meant to be chained to the generic ModalDialogAction so that the table is actually popped-up in a dialog. Two actions (okAction and cancelAction) can be configured to react to the user decision.

ChooseComponentAction properties
Property Description

cancelAction

IDisplayable​Action

Configures the action that will be triggered when the user cancels the component choice.

collectionViewDescriptor

ICollection​View​Descriptor

Sets the collectionViewDescriptor.

componentDescriptor

IComponent​Descriptor​<​?​>​

Sets the componentDescriptor.

okAction

IDisplayable​Action

Configures the action that will be triggered when the user confirms the component choice. the chosen component will then be retrieved from the selected view item.


CloseDialogAction

This is a very generic action that closes (disposes) the currently opened dialog. The dialog is actually closed between the wrapped action and the next action if and only if the wrapped action succeeds.

CloseDialogAction properties
Property Description
This class does not have any specific property.

EditSelectedComponentAction.DefaultOkAction

Default OK action.

EditSelectedComponentAction.DefaultOkAction properties
Property Description
This class does not have any specific property.

CreateEntityFromLovPersistAction

The type Create entity from lov persist action.

CreateEntityFromLovPersistAction properties
Property Description
This class does not have any specific property.

DisplayNextPinnedModuleAction

This action triggers a "forward" navigation in the recorded module history. The frontend controller automatically keeps track of the traversed modules so that a user can go back and forward his navigation history, much like for a web navigation.

DisplayNextPinnedModuleAction properties
Property Description
This class does not have any specific property.

DisplayPreviousPinnedModuleAction

This action triggers a "backward" navigation in the recorded module history. The frontend controller automatically keeps track of the traversed modules so that a user can go back and forward his navigation history, much like for a web navigation.

DisplayPreviousPinnedModuleAction properties
Property Description
This class does not have any specific property.

DisplayUrlAction

This action opens a browser (or a browser tab) targeted at a URL. The actual URL is a composition of a static parametrized prefix (baseUrl) and a dynamic part taken from the action context parameter.

DisplayUrlAction properties
Property Description

baseUrl

String

Configures the static prefix that is prepended (if not null) to the opened URL.

target

String

Sets the target window.


DisplayStaticUrlAction

Like its parent, this action opens a URL in a browser (or a browser tab). But instead of taking the URL out of the context, it uses a statically parametrized URL, or rather a key (urlKey) used to translate the URL based on the logged-in user language. This is particularly useful for linking to static internationalized content, like an online manual. Be aware that once the URL is translated, it is still appended to the baseUrl.

DisplayStaticUrlAction properties
Property Description

urlKey

String

Configures the translation key used to internationalize the URL to open.


EditSelectionAction

This action is meant to trigger editing on the current collection view whenever a single element is selected.

EditSelectionAction properties
Property Description
This class does not have any specific property.

ExecuteActionAction

This generic action takes another arbitrary action out of the context parameter and executes it.

ExecuteActionAction properties
Property Description
This class does not have any specific property.

ExitAction

This action exits the application. Before doing so, user activated application modules are traversed to check that no pending changes need to be forwarded to the persistent store. Also asynchronous executor thread are traversed to check for still alive one. Whenever the dirty checking is positive, or any asynchronous executor is still alive, then the user is notified and given a chance to cancel the exit.

ExitAction properties
Property Description

checkCurrentModuleDirtyStateAction

IAction

Configures the action used to perform dirty checking on current module to update its dirty state. It will be triggered just before a global iteration is performed on all the application modules to be able to notify the user that pending changes are not yet flushed to the persistent store.


ListApplicationElementsAction

This is a special frontend action to list all application metamodel elements available along with their permIds. This is particularly useful to set-up the base of security referential setup.

ListApplicationElementsAction properties
Property Description
This class does not have any specific property.

LoginAction

This is the frontend action to trigger the application login using the current credential in the frontend controller. If the action is configured with anonymous = true, then an anonymous login is attempted. If not, a normal login is performed.

LoginAction properties
Property Description

anonymous

boolean

Sets anonymous.

changePasswordAction

Change​Password​Action​<​E​,F​,G​>​

Sets change password action.


LovAction

This is a standard "List Of Values" action for reference property views. Although this action is used by default in view factories on reference fields, it can also be used in a more standard way, i.e. registered as a view action. In the latter, the okAction must be configured to perform a custom treatment once the entity is chosen from the LOV. Additionally you can statically configure the descriptor of the searched entities using the entityDescriptor parameter so that the LOV will act on this type of entities.

The LOV action prepares a QBE view (filter / result list) along with 3 actions that can be further refined : findAction, okAction and cancelAction. It must the be linked to a ModalDialogAction so that the LOV actually pops up.

LovAction properties
Property Description

autoquery

boolean

Whenever setting autoquery to true, the LOV action will trigger the query as soon as it gets executed and the initial query filter is not empty (e.g. the user typed something in the reference field). This brings autocomplete feature to reference fields since, whenever the initial filter limits to exactly 1 result, the LOV dialog won't even open. Defaults to true.

cancelAction

IDisplayable​Action

Configures the action to be executed whenever the user cancels the LOV dialog.

componentDescriptorRegistry

IComponent​Descriptor​Registry

Sets component descriptor registry.

createAction

IDisplayable​Action

Sets create action.

createQueryComponentAction

Create​Query​Component​Action

Configures the action used to create the filter query component based on the type of entities backing the LOV.

criteriaFactory

Object

Sets criteria factory. Depending on the persistence layer used, it should be an instance of :

  • org.jspresso.framework.model.persistence.hibernate.criterion.ICriteriaFactory
  • org.jspresso.framework.model.persistence.mongo.criterion.IQueryFactory

criteriaRefiner

Object

Sets criteria refiner. Depending on the persistence layer used, it should be an instance of :

  • org.jspresso.framework.application.backend.action.persistence.hibernate.ICriteriaRefiner
  • org.jspresso.framework.application.backend.action.persistence.mongo.IQueryRefiner

defaultIconImageURL

String

Sets the defaultIconImageURL.

entityDescriptor

IComponent​Descriptor​<​?​>​

Configures explicitly the type of entities the LOV relies on. This is automatically determined when installed on a reference field but must be set in any other case.

findAction

IDisplayable​Action

Configures the action to be executed whenever the user queries the persistent store, either explicitly when using the action installed in the LOV dialog or implicitly through the auto query feature.

findOnSet

Boolean

Whenever setting findOnSet to true, the LOV dialog will trigger the query each time a field is set in the LOV filter view. This brings continuous autocomplete feature on the LOV dialog.

findOnType

Boolean

Whenever setting findOnType to true, the LOV dialog will trigger the query each time a field is typed-in in the LOV filter view. This brings continuous autocomplete feature on the LOV dialog.

initializationMapping

Map​<​String​,Object​>​

Whenever the LOV action is not used on a reference field, in which case the filter initialization mapping is taken from the reference field descriptor (see BasicReferencePropertyDescriptor documentation), this property allows to initialize some of the LOV filter properties. Initialization is computed dynamically by transferring property values from the view model to the filter.

lovViewDescriptorFactory

ILov​View​Descriptor​Factory

Configures the factory to be used to create the QBE view used in the dialog.

lovViewDescriptorForCreationFactory

ILov​View​Descriptor​For​Creation​Factory

Configures the factory to be used to create the LOV's on-the-fly-creation view.

okAction

IDisplayable​Action

Configures the action to be executed whenever the user validates the LOV selection.

pageSize

Integer

Sets page size.

pagingAction

IAction

Sets the pagingAction.

preselectItems

boolean

Should the LOV view pre-select items in the LOV view.

queryComponentRefiner

IQuery​Component​Refiner

Sets query component refiner.

selectionMode

ESelection​Mode

Allows to force the result view selection mode.

staticComponentStore

List​<​?​>​

Sets static component store.


MobileLovAction

This is a standard "List Of Values" action for mobile environment.

MobileLovAction properties
Property Description
This class does not have any specific property.

ModalDialogAction

This is a very generic action that takes its specifications out of the action context, creates and pops-up a modal dialog based on these specs. The action is meant to be chained after another frontend action that produce the dialog specs into the action context. Context entries that are used are :

  • DIALOG_VIEW : the view to be used as the dialog content pane.
  • DIALOG_TITLE : the title of the dialog.
  • DIALOG_ACTIONS : the actions to be installed at the bottom of the dialog.
  • DIALOG_SIZE : the dialog preferred size. Whenever the dialog size is null, the dialog size is determined from the preferred size of the content view.

ModalDialogAction properties
Property Description

triggerOnEnter

boolean

Sets trigger on enter.


ModuleRestartAction

This action is used to restart a module. It cleans its children and executes its startup action.

ModuleRestartAction properties
Property Description
This class does not have any specific property.

ModuleSelectionAction

Displays a module, and the corresponding workspace if necessary based on their names. It can be used as startup action to select and display a module when the application launches.

ModuleSelectionAction properties
Property Description

moduleName

String

Configures the name (untranslated) of the module to be displayed.

workspaceName

String

Configures the name (untranslated) of the workspace to be displayed.


Navigates the module objects by selecting the next / previous element.

NavigateModuleObjectsAction properties
Property Description

offset

int

Sets offset.


OkChooseComponentAction

This action augments the context by setting the action parameter to the selected component of the collection view (or null if none is selected).

OkChooseComponentAction properties
Property Description
This class does not have any specific property.

OkLovAction

This action augments the context by setting the action parameter to the selected entity of the LOV result list (or null if none is selected).

OkLovAction properties
Property Description
This class does not have any specific property.

PageOffsetAction

This action simply augment the context with a page offset integer ( PAGE_OFFSET). It is meant to be linked to a find/query action that will further leverage this offset to navigate a pageable result set.

PageOffsetAction properties
Property Description

pageOffset

Integer

Configures the page offset to be set to the action context.


ParentModuleConnectorSelectionAction

This action simply displays the parent of the currently selected module; i.e. it goes up one level in the module hierarchy of the current workspace.

ParentModuleConnectorSelectionAction properties
Property Description
This class does not have any specific property.

PrintAction

This action allows the user to choose a report among a list and print it. The list of available reports is statically configured into the action.

PrintAction properties
Property Description

reportDescriptors

List​<​IReport​Descriptor​>​

Configures the available report descriptors the user will be allowed to choose.

reportFactory

IReport​Factory

Configures the report factory to use. The report factory is responsible for creating an IReport (a concrete report instance) from a report descriptor (IReportDescriptor).


QueryFilterModuleAction

Queries filter module and notify user of empty record set.

QueryFilterModuleAction properties
Property Description

criteriaFactory

Object

Sets criteria factory. Depending on the persistence layer used, it should be an instance of :

  • org.jspresso.framework.model.persistence.hibernate.criterion.ICriteriaFactory
  • org.jspresso.framework.model.persistence.mongo.criterion.IQueryFactory

criteriaRefiner

Object

Sets criteria refiner. Depending on the persistence layer used, it should be an instance of :

  • org.jspresso.framework.application.backend.action.persistence.hibernate.ICriteriaRefiner
  • org.jspresso.framework.application.backend.action.persistence.mongo.IQueryRefiner

emptyResultAction

IAction

Sets empty result action.

queryComponentRefiner

IQuery​Component​Refiner

Sets query component refiner.


RefreshCardViewFrontAction

Refresh card view having given permId

RefreshCardViewFrontAction properties
Property Description

cardViewId

String

Sets the card view id.

viewPath

int

Sets view path to start search from.


RefreshControllerDescriptionAction

Refreshes frontend controller name and description.

RefreshControllerDescriptionAction properties
Property Description
This class does not have any specific property.

RemoveComponentsFromWorkspacesFrontAction

Remove selected models from workspaces front action.

RemoveComponentsFromWorkspacesFrontAction properties
Property Description
This class does not have any specific property.

ResetPasswordAction

This is the frontend action to initiate a user password reset. The username to change the password for is retrieved from the selected model using the usernameProperty parameterized in the action. This action must wrap with a concrete subclass of backend AbstractResetPasswordAction that performs the actual password reset depending on the authentication backend. Jspresso offers one concrete implementation :

  • DatabaseChangePasswordAction for JDBC based authentication backend

ResetPasswordAction properties
Property Description

usernameProperty

String

Sets username property.


SaveModuleObjectFrontAction

This action is used to save module and sub-modules objects.

SaveModuleObjectFrontAction properties
Property Description

dirtyTrackingEnabled

boolean

Set dirty tracking enabled.


SelectedModelToActionParamAction

A very simple frontend action that puts the selected model(s) as context action param.

SelectedModelToActionParamAction properties
Property Description
This class does not have any specific property.

SetConnectorValueAction

This action retrieves the action parameter from the action context and assigns it as value to the targeted connector. The connector to target is itself retrieved from the action context using a parametrized key.

SetConnectorValueAction properties
Property Description

connectorActionContextKey

String

Configures the key to look for the target connector in the context, e.g. VIEW_CONNECTOR.


TransferToClipboardAction

An action used to transfer textual representation(s) of selected models to the system clipboard.

TransferToClipboardAction properties
Property Description

clipboardTransferHandler

IClipboard​Transfer​Handler

Sets the clipboardTransferHandler.


EditSelectedComponentAction.UowRollbackerAction

A wrapper action that roll backs the current UOW before delegating to its delegate.

EditSelectedComponentAction.UowRollbackerAction properties
Property Description
This class does not have any specific property.

WizardAction

This action implements a "wizard". It can be configured from the simplest use-case (as for a value entering) to the most complex, multi-step wizard. Here are a usage directions :

  1. The generic wizard front-end action is registered in the Spring context under the name wizardAction. So you will typically inherit the bean definition using the parent="wizardAction" when declaring yours.
  2. The goal of the wizard action is to work on a map - the wizard model - (potentially containing other maps) that represents a hierarchical data structure that can be used seamlessly as model for any Jspresso view. In your case, the map will only contain 1 key-value pair (the property you want your user to enter). When finishing the wizard, the action context will contain the map with all the key-value pairs the user has created/modified through the wizard steps. It will be accessible in the action context under the ActionContextConstants.ACTION_PARAM key and will typically serve as input for the finish chained action.
  3. The wizard action is configured using chained org.jspresso.framework.application .frontend.action.wizard.IWizardStepDescriptor. A concrete, directly usable, implementation of this interface is org.jspresso.framework.application.frontend .action.wizard.StaticWizardStepDescriptor. Each wizard step is highly configurable (name, description, icon, ...) but its most important properties are :
    1. viewDescriptor : the Jspresso view descriptor to be shown in the wizard GUI when the user enters this step. It can be arbitrarily complex (even with master-detail like views, inner actions, constraints, security enforcements, ...). Of course, the view descriptor needs a model descriptor. So you must describe the wizard model as you would do for persistent entities or components (so that step views can configure themselves). You will typically use a BasicComponentDescriptor without name so that it is automatically excluded from code generation. Note that your actual model object will be a map (and not Jspresso generated java bean) but Jspresso connectors are "smart" enough to detect the situation and work with the hierarchy of maps as if it was a hierarchy of java beans.
    2. optional onEnterAction and onLeaveAction : actions that will respectively be executed when entering and when exiting the wizard step.
    3. optional nextLabelKey and previousLabelKey : i18n keys for next and previous buttons if you want to change the default ones.
    4. optional nextStepDescriptor : the next wizard step. If null, the wizard GUI will enable the finish action.
    </li>
  4. The first wizard step is registered on the wizard action using the firstWizardStep property.
  5. When the user leaves the last wizard step (clicking the finish action button), the finish action is triggered. The finish action can be registered on the wizard action using the finishAction property. This is typically the place where you explore the wizard map model - ACTION_PARAM - to get back all the data the user has worked on. Note that the finish button is entirely configured from the finish action (label and icon).
  6. </ol>

WizardAction properties
Property Description

cancelAction

IDisplayable​Action

Configures the action that will be executed whenever the user cancels the wizard.

finishAction

IDisplayable​Action

Configures the action that will be executed whenever the user validates the wizard.

firstWizardStep

IWizard​Step​Descriptor

Configures the first wizard step to display.

height

Integer

Configures explicitly the height of the wizard dialog. It prevents the dialog from resizing dynamically depending on the displayed wizard step.

width

Integer

Configures explicitly the width of the wizard dialog. It prevents the dialog from resizing dynamically depending on the displayed wizard step.


WorkspaceSelectionAction

This action displays a workspace using its (untranslated) name.

WorkspaceSelectionAction properties
Property Description

forceReselection

boolean

Sets force reselection.

workspaceName

String

Configures the name of the workspace to display.


Built-in actions

You will find here the complete list of Jspresso built-in actions along with their Spring id and a short description.

Built-in actions
Spring Id SJS Id Description
pasteCollectionBackAction back.component.paste Pastes entities/components from the application clipboard.
removeCollectionFromMasterBackAction back.component.remove Marks the selected objects for deletion (next save operation) and removes them from the master managed collection.
saveBackAction back.component.save Gets a collection of entities to save out of the context and saves them transactionally.
createQueryComponentAction back.filter.create Creates a filter model for QBE queries and set it as value of the filter model connector retrieved from the context.
initModuleFilterAction back.filter.init Retrieves the current module filter connector and adds it in the context.
queryEntitiesBackAction back.filter.query Executes an QBE query based on a filter retrieved from the context. The resulting entity collection is added to the context.
reloadBackAction back.module.reload Reloads current module selected objects from the persistent store.
removeFromModuleObjectsAction back.module.remove Marks current module selected objects for deletion (next save operation) and removes them from the module managed collection.
saveModuleObjectBackAction back.module.save Saves the current module selected objects to the persistent store.
doPrintBackendAction back.report.generate Generates a Jasper report and adds it to the context.
scriptedBackAction back.script.dynamic Executes a script taken out of the context. Supports any BSF supported language (Groovy, Jython, Beanshell, ...).
staticScriptedBackAction back.script.static Executes a script statically defined as an action parameter. Supports any BSF supported language (Groovy, Jython, Beanshell, ...).
lovFindBackAction back.lov.find Standard QBE find action for "list of values".
abstractChooseActionAction front.action.choose Opens a modal dialog box offering a choice of actions.
executeActionAction front.action.execute Takes an action out of the context and executes it.
chooseActionOkFrontAction front.action.ok Gets the selected action and places it in the context for execution.
addAnyToMasterFrontAction front.any.add Retrieves an object collection from the context and appends it to the master managed collection (no creation).
moveDownFrontAction front.any.down Moves downward the selected objects contained in an ordered collection.
moveBottomFrontAction front.any.bottom Moves bottom the selected objects contained in an ordered collection.
removeAnyCollectionFromMasterFrontAction front.any.remove After user confirmation, retrieves an object collection from the context and removes it from the master managed collection.
moveUpFrontAction front.any.up Moves upward the selected objects contained in an ordered collection.
moveTopFrontAction front.any.top Moves top the selected objects contained in an ordered collection.
binaryPropertyInfoAction front.binary.info Retrieves a binary property value out of the connector and opens a message box displaying the size of the binary content.
openFileAsBinaryPropertyAction front.binary.load Let the user browse the local file system to choose a file. The file content is used as the content of a binary property.
saveBinaryPropertyAsFileAction front.binary.save Let the user browse the local file system to choose a file. The file is used to save the content of a binary property.
chartAction front.chart Computes and displays a fusioncharts chart.
abstractAddToMasterFrontAction front.component.add.abstract Creates a new entity/component and adds it to the master managed collection. No icon nor accelerator set.
addToMasterFrontAction front.component.add Creates a new entity/component and adds it to the master managed collection.
chooseComponentAction front.component.choose Opens a modal dialog to let the user choose an component/entity out of a collection retrieved from the context.
cloneEntityCollectionFrontAction front.component.clone Duplicates selected entities/components and adds the clones to the master managed collection.
copyCollectionFrontAction front.component.copy Copies the selected entities/components to the application clipboard.
cutCollectionFrontAction front.component.cut Cuts the selected entities/components to the application clipboard.
editSelectedComponentAction front.selected.edit Opens a dialog box to edit the selected entity/component in an arbitrary view.
editComponentAction front.component.edit Opens a dialog box to edit an entity/component in an arbitrary view.
pasteCollectionFrontAction front.component.paste Pastes entities/components from the application clipboard.
removeEntityCollectionFromMasterFrontAction front.component.remove After user confirmation, marks the selected objects for deletion (next save operation) and removes them from the master managed collection.
viewConnectorSetAction front.connector.set Retrieves an arbitrary value from the context and assigns it to the view connector value.
okDialogFrontAction front.dialog.ok Closes the top most dialog. Icon and name set.
cancelDialogFrontAction front.dialog.cancel Closes the top most dialog. Icon and name set.
closeDialogAction front.dialog.close Closes the top most dialog.
modalDialogAction front.dialog.open Opens a modal dialog box that is parametrized out of context values (title, view bound to its model, size, secondary action list).
openFileAction front.file.open Let the user browse the local file system to choose a file. The selected file content is placed in the context.
saveFileAction front.file.save Let the user browse the local file system to choose a file. The selected file is used to save an arbitrary content taken from the context.
nextModuleFilterPageAction front.filter.next Moves to the next result page of a filtered module.
previousModuleFilterPageAction front.filter.previous Moves to the previous result page of a filtered module.
queryModuleFilterAction front.filter.query Performs the QBE query of a filtered module.
infoFrontAction front.info.dynamic Retrieves an information message from the context and displays it to the user.
staticInfoFrontAction front.info.static Translates an information message statically parametrized in the action and displays it to the user.
lovAction front.lov Pops-up a "list of values" dialog.
lovFindFrontAction front.lov.find Performs the QBE query of a "list of values".
nextLovPageFrontAction front.lov.next Moves to the next result page of a "list of values".
lovOkFrontAction front.lov.ok Gets the selected result from a "list of values" and places it in the context.
previousLovPageFrontAction front.lov.previous Moves to the previous result page of a "list of values".
addMapToMasterFrontAction front.map.add Creates a new map and adds it to the master managed collection.
cloneMapCollectionFrontAction front.map.clone Duplicates selected maps and adds the clones to the master managed collection.
cloneMapCollectionFrontAction front.map.clone Duplicates selected maps and adds the clones to the master managed collection.
cloneModuleObjectFrontAction front.module.clone Duplicates selected entities/components and adds the clones to the module managed collection.
reloadModuleObjectFrontAction front.module.reload Reloads the module selected entity/component from the persistent store. entities/components previously marked for deletion are also restored.
removeFromModuleObjectFrontAction front.module.remove After user confirmation, marks the selected module entities/components for deletion (next save operation) and removes them from the module managed collection.
restartModuleFrontAction front.module.reset Restarts the current module.
saveModuleObjectFrontAction front.module.save Saves the module selected entities/components to the persistent store and performs deletion of previously "marked for deletion" entities/components.
saveModuleObjectAndGoBackFrontAction front.module.save.back Saves the module selected entities/components to the persistent store and performs deletion of previously "marked for deletion" entities/components. If successful, returns back to the parent module.
parentModuleConnectorSelectionFrontAction front.module.back Returns back to the parent module.
moduleConnectorSelectionFrontAction front.module.select Gets a module out or the context and selects it in the current workspace.
addAsChildModuleFrontAction front.module.sub Gets selected module objects, adds them as current module children then selects them.
nextPinnedModuleAction front.module.next Navigates to the next pinned module in history.
previousPinnedModuleAction front.module.previous Navigates to the previous pinned module in history.
okCancelFrontAction front.okcancel.dynamic Retrieves an ok/cancel message out of the context and displays it to the user.
staticOkCancelFrontAction front.okcancel.static Retrieves an ok/cancel message statically parametrized in the action and displays it to the user.
changePasswordAction front.password.change Opens a dialog box allowing the user to initiate a password change operation (old, new, check).
printOkFrontAction front.print.ok Retrieves the selected Jasper report and puts it in the context for display/print.
resetPropertyFrontAction front.property.reset Resets a property to its default value.
displayReportAction front.report.display Displays/prints a Jasper report taken out of the context to the user.
reportAction front.report.dynamic Retrieves a Jasper report definition out of the context, opens the report parameters entry dialog, then triggers generation and display/print.
editReportParametersAction front.report.edit Opens a dialog box for the user to input a Jasper report parameters.
doPrintAction front.report.print Triggers generation and display/print of a Jasper report after parameters input.
staticReportAction front.report.static Gets a Jasper report definition statically defined as an action parameter, opens the report parameters entry dialog, then triggers generation and display/print.
displayUrlFrontAction front.url.dynamic Targets the browser (actually a new browser window/tab) to a URL retrieved from the context.
staticDisplayUrlFrontAction front.url.static Targets the browser (actually a new browser window/tab) to a URL statically defined as an action parameter. The URL is previously translated so thant it can be variabilized based on the user language (used for online help for instance).
connectorSelectionFrontAction front.view.select Retrieves an object collection out of the context and selects it on the collection view (table, list, tree).
wizardAction front.wizard Triggers a wizard dialog.
yesNoFrontAction front.yesno.dynamic Retrieves a yes/no binary question out of the context and displays it to the user.
staticYesNoFrontAction front.yesno.static Retrieves a yes/no binary question statically parametrized in the action and displays it to the user.
yesNoCancelFrontAction front.yesnocancel.dynamic Retrieves a yes/no/cancel binary question out of the context and displays it to the user.
staticYesNoCancelFrontAction front.yesnocancel.static Retrieves a yes/no/cancel binary question statically parametrized in the action and displays it to the user.

results matching ""

    No results matching ""