Category:Action

From JRapid

Jump to: navigation, search

Actions are hooks (buttons, links, selects) that can be added to JRapid applications in different locations (local, form, select, button).

Actions are divided into property actions and entity actions.

According to its type, the action will show different behavior and require different parameters.

Contents

Entity actions

Currently, available types for entity actions are 'javascript' and 'relatedentity'.

Javascript actions

<entity ...>
   <action 
        label=LABEL 
        name=NAME
        type="javascript"
        location=LOCATION 
        display=DISPLAY 
        description=DESCRIPTION
        function=FUNCTION 
        functionparams=PARAMS (only when using location=local)
   />
</entity>
  • type: the type for this action. See type action.
  • location: the location where the action will be triggered. See location action.

The "function" attribute specifies the name of the JavaScript function associated to this action.

The prototype of the javascript function to be invoked has to be of the following way:

 function name(obj, ids, param1, param2, ... , paramN) {
    ...
 }
  • obj: object related to the action (eg. the input box).
  • ids: an array with the ids chosen from the list.
  • param_i: i extra param of the function.

More info can be found at Javascript Action.

Related entity actions

<entity ...>
   <action 
        label=LABEL 
        name=NAME
        type="relatedentity"
        location=LOCATION 
        display=DISPLAY 
        description=DESCRIPTION
        entity=ENTITY
        defaultset=DEFAULTSET 
        defaultsetparams=PARAMS (only when using location=form)
   />
</entity>

More info can be found at Relatedentity Action.

Property actions

Currently, available types for property actions are 'javascript', 'relatedentity', 'relatedlisting' and 'openentity'.

Javascript actions

<property ...>
   <action 
        label=LABEL 
        name=NAME
        type="javascript"
        location=LOCATION 
        display=DISPLAY 
        description=DESCRIPTION
        function=FUNCTION 
   />
</property>

More info can be found at Javascript Action.

Relatedentity actions

<property ...>
   <action 
        label=LABEL 
        name=NAME
        type="relatedentity"
        location=LOCATION 
        display=DISPLAY 
        description=DESCRIPTION
        entity=ENTITY
        defaultset=DEFAULTSET 
        defaultsetparams=PARAMS 
   />
</property>

More info can be found at Relatedentity Property Action.

Caution: in contrast with entity actions, when using relatedentity actions in properties, defaultsetparams attribute should be used.

Relatedlisting actions

<property ...>
   <action 
        label=LABEL 
        name=NAME
        type="relatedlisting"
        location=LOCATION 
        display=DISPLAY 
        description=DESCRIPTION
        entity=ENTITY
        listing=LISTING 
        subset=SUBSET 
        subsetparams=SUBSETPARAMS 
   />
</property>

More info can be found at Relatedlisting Action.

Openentity actions

<property ...>
   <action 
        label=LABEL 
        name=NAME
        type="openentity"
        location=LOCATION 
        display=DISPLAY 
        description=DESCRIPTION 
   />
</property>


More info can be found at Openentity Action.

Subcategories

This category has the following 4 subcategories, out of 4 total.

D

J

R

Pages in category "Action"

The following 8 pages are in this category, out of 8 total.

D

L

L cont.

N

O

R

T

Personal tools