Widget (attribute of action)

From JRapid

Jump to: navigation, search

widget is an attribute of action.



The widget defines the way an action is rendered, on its location.

Take a look at the image to visually identify the different widgets.

Note: If widget is not defined, button is taken as the default value.

Available widgets are:

Renders the action as an HTML INPUT TYPE=button element, with the label as VALUE. (default)
Renders the action as an HTML A (anchor) element, with the label as child.

Both widgets use the ONCLICK attribute of its elements (div|a) to fire the action's event.


   name = NAME
   label = LABEL
   type = TYPE
   widget = WIDGET 


The code below was used to generate the entity in the image above.

    <entity name="WikiActionWidget" label="Action Widgets" menu="wiki" >
    	<property name="name" label="Name" display="primary" />
    	<property name="company" label="Company" entity="Company" display="primary" />
        <action name="action01" label="Action widget 'link'" 
            widget="link" location="listing"
            type="javascript" function="testJavascriptAction" functionparams="'action 01'" />
        <action name="newCountryCompany" label="Action widget 'button' (default)" 
            widget="button" location="listing" 
            type="relatedentity" entity="Company" defaultset="forCountry" />

See also

Personal tools