2. Plugins

2.1. Introduction

Plugins are reusable implementations of standard functionality. Plugins can be used in Portlets that need to provide the plugin’s functionality. The Gentics portlet has to register every plugin under a unique name (unique for the specific portlet). This pluginname is used as prefix for plugin parameters when they are defined in the portlet’s pnode.

2.2. ViewPlugin

2.2.1. Introduction

The ViewPlugin is the core of the portal's visualisation engine. It is capable of rendering userinterfaces based on a XML userinterface definition, and small templates. Userinteraction is handled by an action layer.

2.2.2. Basic elements of a View

View - is the definition of a dialog of an application. Technically it's a XML file based on a View-Schema, containing Components and PluggableActions.

Component - A Component is a visualisation element, either used for user input, presentation or interaction (e.g. a textfield, a list or a button). Technically Components are Java objects and nodes of the View XML Schema.

PluggableAction - A PluggableAction is used to execute any businesslogic in the userinterface and dynamicly interact with the user. Technically PluggableActions are Java objects and nodes of the View XML Schema.

2.2.3. Property Paths

The following Properties are provided by the ViewPlugin - usually accessible by portal.modules.<module id>.plugins.viewplugin. See “Portal Property Paths” (Section 8) for more information.

Table 4.11. ViewPlugin Properties

NameTypeDescription
activeviewObjectThe currently active view / can also be used to change the currently active view.

2.2.4. Parameters

ViewPlugin parameters are used to configure the source for the XML View.

Table 4.12. ViewPlugin Parameters

ParameterTypeDescription
{pluginname}.viewsNodestructure defining the views
{pluginname}.viewbasedirStringrelative path to the base directory, where the views are defined in files - If it couldn't be found relative it is search absolute. - Can contain system properties. (See Section 2, “System properties”)

The ViewPlugin supports two different modes of view configuration: inline (in the pnode) or external (every view is defined in a separate file). When the parameter {pluginname}.viewbasedir is given, views are defined externally and inline views are ignored, otherwise the views have to be defined with the parameter {pluginname}.views.

When a {pluginname}.viewbasedir is given, the directory is searched for view definitions. The given path is interpreted relative to the web-application’s home directory (e.g. …/webapps/Portal.Node/). Every .xml file in the directory is supposed to contain the definition of a single view. Additional parameters can be given in a single file views.properties.

The views.properties file has the following properties:

defaultview=myviewname

Example 4.5. View Parameters

This example shows how the viewplugin is configured for a portlet in the Section 4.4, “Gentics Portletdescriptor” .

<portlet>
  <portlet-name>DatasourceListExample</portlet-name>
  <parameter-description>
    <parameter-definition type="string" name="viewplugin.viewbasedir">
				path of the view definitions
	</parameter-definition>
  </parameter-description>
  <start-parameters>
    <parameter name="viewplugin.viewbasedir">WEB-INF/views/list</parameter>
  </start-parameters>
	...
</portlet>				

2.2.5. Templates

2.2.5.1. Introduction

The ViewPlugin Templates are used to render the Views and their Components.

The plugin comes with a set of example templates. They come with the Portal.Node webapp and are updated during productupdates. The templatefiles can be found in the folders ${com.gentics.portalnode.home}/WEB-INF/templates/FormPlugin2 and ${com.gentics.portalnode.home}/WEB-INF/templates/ViewPlugin respectively. They are referenced in the Gentics Portlet Descriptor in ${com.gentics.portalnode.home}/WEB-INF/gentics-portlet.xml.

If you want to customize any of those templates, transfer the template file to your portletapplication or portalserver configurationpath, add a templateloader in your Portal Configuration pointing to your template location. In case you want to customize the template for your whole portal, add a reference to your template in your Portal Configuration's template-section. If you want to customize the template only for one portlet, add it to the templates section of your Gentics Portlet Descriptor. See Section 8, “Portal Configuration File” for details on the Portal Configuration and Section 4.4, “Gentics Portletdescriptor” for details on the Gentics Portlet Descriptor. Please note, that it is currently not possible to define custom templates Portletapplication-wide.

The variables provided in every template are provided by the portal. See the Section Section 8, “Portal Property Paths” for details.

In addition component provides specific variables, see the Section Section 2.2.7, “Components” for further details.

Example 4.6. ViewPlugin Template Customisation Example

<portlet>
  ...
  <templates>
    <template loader="portalloader">
      <classes>
        <class id="plugin">formplugin2</class>
        <class id="component">TextComponent</class>
      </classes>
      <parameters>
        <parameter id="filename">plugins/FormPlugin2/TextComponent.vm</parameter>
      </parameters>
    </template>
    ...
  </templates>
</portlet>
						
2.2.5.2. View Templates

View Templates are identifed via the classes section.

Example 4.7. Syntax of View Template Classes

<classes>
  <class id="plugin">ViewPlugin</class>
  <class id="windowstate">...</class>
</classes>
						

Table 4.13. View Template Classes

ClassRequiredDescription
pluginxMust be set to "ViewPlugin".
windowstatexWindowstate for which the template is used. Must be one of normal, maximized.

Customizing templates for specific windowstates can for example be used to show one specific view in the windowstate normal and other views in the windowstate maximized.

2.2.5.3. Form Templates

The form template is classified by the following classes section and renders the <form> tag.

Example 4.8. Syntax of Form Template Classes

<classes>
  <class id="plugin">formplugin2</class>
  <class id="form">...</class>
  <class id="class">...</class>
</classes>
						

Table 4.14. Form Template Classes

ClassRequiredDescription
pluginxMust be set to "formplugin2".
form Id of the rendered form (view). Templates with a form set will never be used for forms that have other ids.
class Class of the form (view). Templates with a class set will only be used for forms that have the same class setting.

When a form is rendered, the "best matching" template is used for rendering. A template is matching for a specific form, when it’s classes definition is exactly one of the following combinations (order defines priority):

  • plugin + form + class

    for all forms with the given id and class.

  • plugin + form

    for all forms with the given id.

  • plugin + class

    for all forms with the given class.

  • plugin

    for all forms. this is the most general form template

Table 4.15. Template Variables for Form Templates

NameTypeDescription
$portalObjectMain portal object. See Section 8, “Portal Property Paths” .
$formObjectThe form object.
$form.nameStringThe current form name, as used in the output.
$form.enctypeStringThe encoding type of the form (should be used for <form enctype="">).
$form.errorBooleanTrue when one of the form components contains an input error, false if not.
$form.componentsCollection of objectsCollection of all components in the form.
$form.propertiesMap of objectsMap of all custom view properties.
$component in $form.componentsObjectsInformation object for a component in the form. Note that this object cannot be used to get input data from the component.
$component.idStringThe id of the component.
$component.typeStringThe type like "tabcollection".
$component.optionalBooleanWhether this component must contain a value.
$component.visibleBooleanWhether this component is visible. Invisible components are automaticaly not rendered.
$component.enabledBooleanWhether this component is enabled, and may be interacted with.
$component.labelStringReadable label.
$component.helpStringHelp content for the current component.
$component.errorBooleanTrue if the current component has invalid content.
$component.errortextStringErrortext for the current component if error.
$component.focusedfieldStringName of the focused component field or null if the component is not focused.
$component.focusedBooleanTrue when the component is focused, false if not. Only one component per form can be focused.
$component.focusBooleanAlias for $component.focused
$component.propertiesMapList of custom component properties.
$contentStringRendered content of the form.
$actionurlStringAction url of the form. Posting data to this url will submit the form.
2.2.5.4. Component Templates

Component Templates are identified via the classes section. Each component template may be specialized by adding specific class restrictions. Following classes are available for all templates, some of them are required within some special templates.

Example 4.9. Syntax of Component Template Classes

<classes>
  <class id="plugin">formplugin2</class>
  <class id="component">...</class>
  <class id="form">...</class>
  <class id="class">...</class>
  <class id="id">...</class>
</classes>

						
[Note]Note

Please note that "plugin" is always set to "formplugin2", even though templates are defined for the ViewPlugin since the ViewPlugin internally utilizes the FormPlugin2 to render components.

Table 4.16. Component Template Classes

ClassRequiredDescription
pluginxMust be set to "formplugin2".
componentxMust be set to the type of the component. Identifies the template to belong to a specific component type (e.g. "TextComponent", ...).
form Id of the form (view) this component shall be used. Templates with a form set will never be used for forms that have other ids.
class Components class. Template with a class set will only be used for components that have the same class setting.
id Id of the component. Templates with a component id set will only be used for components (typically only one) with that id.

When a component is rendered, the "best matching" template is used for rendering. A template is matching for a specific component, when it’s classes definition is exactly one of the following combinations (order defines priority):

  • plugin + component + form + id

    for the one component of the given type in the form and the given id. This is the most special template for a specific component.

  • plugin + component + form + class

    for all components of the given type and class in the given form.

  • plugin + component + form

    for all components of the given type in the form.

  • plugin + component + id

    for all components of the given type and the id (in all forms).

  • plugin + component + class

    for all components of the given type and class (in all forms).

  • plugin + component

    for all components of the given type. This is the most general template.

2.2.5.5. Custom Action URLs / Events

It is possible to create an action URL within every Plugin template which triggers an event which can be used together with a reaction. (See Section 11.1, “Portaltemplate”)

Example 4.10. Custom Action URL in Template

#set( $url = $javax.portlet.response.createActionURL() )
$url.setParameter( "action", "myEvent" )
$url.setParameter( "myParameter", "some value" )
<a href="$url">Some URL</a><br/>

If this code is in a component template, e.g. of a TextComponent in a pnode with 'TestPortlet' the path for the reaction would be: portal.modules.TestPortlet.plugins.formplugin2.onMyEvent. Custom parameters may also be accessed via event.properties.*

2.2.6. Views

The View XML file is based on the XML Schema pn4doc_views.xsd and can currently be found in the Gentics .Node® Infoportal.

When defining a View XML it already has an embedded 'ListComponent' which is used to define the initial layout of the view. All components within a view are layed out using the template for a ListComponent.

By default the view files are checked for modifications on each access in Gentics Portal.Node SDK installations. To improve performance you can disable this behaviour with the portal.viewplugin.checkviewchanges parameter. See “ViewPlugin Configuration” (Section 8.2.11) for more information.

Example 4.11. Syntax Views

<view id="" class="" label="" doubleclickprotection="" xmlns="http://www.gentics.com/xml/ns/portal/view">
  <onload>
    <actions>
      ...
    </actions>
  </onload>
  <onview>
    <actions>
      ...
    </actions>
  </onview>
  <callableactions>
    <callableaction id="">
        <actions>
          ...
        </actions>
    </callableaction>
  </callableactions>
  <properties>
    <property id="..">...</property>
    ...
  </properties>
  ...
</view>

Table 4.17. Settings Views

NameTypeDefaultDescription
idString(required)Identifier for the view, must be unique in this viewbasedir.
classStringNULLIdentifier for class used for the embedded ListComponent (This allows you to use different templates depending on the views class).
labelStringNULLLabel of the view
doubleclickprotectionBooleanNULL

With this flag, the portal-wide or ViewPortlet-wide setting for the double-click protection can be overwritten for a specific view. The default is to not overwrite the setting (which would default to true if not set differently). See “ViewPortlet” (Section 3) and “ViewPlugin Configuration” (Section 8.2.11) for details.

xmlnsStringNULLcan be set to http://www.gentics.com/xml/ns/portal/view to enable autocompletion and syntax checking when the view is edited in Gentics Portal.Node SDK
onloadNodeNULLContainer for Pluggable Actions that shall be done once for every user session. The actions will be performed when the view is rendered the first time. For details on Pluggable Actions see Section 2.2.8, “Pluggable Actions”
onviewNodeNULLContainer for Pluggable Actions that shall be done whenever the view is rendered. When a view is shown more than once in the same portal page, the actions are only performed once. For details on Pluggable Actions see Section 2.2.8, “Pluggable Actions”
callableactionsNodeNULLContainer for Callable Actions that can be executed using AJAX requests by the browser.
callableactionNodeNULLA Callable Action which can be called by the browser using an AJAX request.
callableaction.idString(required)The identifier of the Callable Action.
callableaction.actionsNodeNULLContainer for Pluggable Actions that are executed whenever the Callable Action is called. For details on Pluggable Actions see Section 2.2.8, “Pluggable Actions”. Special Pluggable Actions are used to define the return value that is sent to the client, see Section 2.2.8.19, “PlainCallableActionResponseAction”, Section 2.2.8.16, “JsonCallableActionResponseAction” and Section 2.2.8.3, “BinaryCallableActionResponseAction”
propertiesNodeNULL Container for all custom view properties to be initially set to this view.

Table 4.18. Template Variables for Views

NameTypeDescription
$viewsListAll defined views. See Section 8.2, “Views”
$activeviewObjectCurrently active view object. See Section 8.2, “Views”
$formStringThe rendered content of the currently active view.

2.2.7. Components

2.2.7.1. All Components

All components have some basic properties to define their templates and settings. Id and class are available for every component, and are not listed within each component description.

Example 4.12. Syntax All Components

<{component} id="" class="">
	<label></label>
	<optional>[<prule></prule>]</optional>
	<visible>[<prule></prule>]</visible>
	<enabled>[<prule></prule>]</enabled>
	<help></help>
	<properties>
		<property id="[key]">[value]</property>
		<property id="[key]">[value]</property>
		...
	</properties>
</{component}>
						

Table 4.19. Settings All Components

NameTypeDefaultDescription
idStringNULLId of this component. Can be used in template properties to define a template for a specific component.
classStringNULLClass of this component. The class can be used to group components of the same type to use the same template.
labelString{required}Readable label. The label should be the i18n key of the real labels in the dictionaries for multilanguage support.
optionalBoolean or pruleTRUEWhether this component is optional or not. Components that are not optional must be filled in order to successfully submit the whole form and will produce an error if not filled.
visibleBoolean or pruleTRUEWhether this component is visible or not.
enabledBoolean or pruleTRUEWhether this component is enabled or disabled. Disabled components show their values but cannot be modified by the user.
helpStringNULLHelp content for the current component (i18n key).
clearErrorsStringNULLSet to "true" to clear previous errors.
propertiesListNULLList of custom properties of the component. The properties can be read in the components template.

Optional, visible and enabled may contain <prule>s, that can resolve the base objects "portal.*", "view.*", "views.*" and "module.*". See Section 8, “Portal Property Paths” for details on property paths.

Table 4.20. Template Variables for All Components

NameTypeDescription
$portalObjectMain portal object. See Section 8, “Portal Property Paths” .
$moduleObjectThe current portlet in which the component is rendered. See Section 8.3, “Modules”.
$formObjectMain form object.
$form.nameStringThe current form name, as used in the output.
$componentObjectThe current component.
$component.idStringThe id of the component.
$component.typeStringThe type like "tabcollection".
$component.optionalBooleanWhether this component must contain a value.
$component.visibleBooleanWhether this component is visible. Invisible components are automaticaly not rendered.
$component.enabledBooleanWhether this component is enabled, and may be interacted with.
$component.labelStringReadable label.
$component.helpStringHelp content for the current component.
$component.errorBooleanTrue if the current component has invalid content.
$component.errortextStringErrortext for the current component if error.
$component.focusedfieldStringName of the focused component field or null if the component is not focused.
$component.focusedBooleanTrue when the component is focused, false if not. Only one component per form can be focused.
$component.focusBooleanAlias for $component.focused
$component.propertiesMapList of custom component properties.
2.2.7.2. Input Components

These components are used to enter data of any kind (e.g. text, files, options).

2.2.7.2.1. ButtonComponent

Buttons used to handle forms or fields.

Example 4.13. Syntax ButtonComponent

<buttoncomponent>
	<errorcheck component=""></errorcheck>
	<actions>...</actions>
</buttoncomponent>						

Table 4.21. Settings ButtonComponent

NameTypeDefaultDescription
errorcheckBooleanfalseWhether the button shall check components for errors upon submit.
errorcheck.componentStringroot component of the formId of the component were errorchecking shall be started
actionsNodeNULLContainer for pluggable actions that shall be triggered by the buttoncomponent. See Section 2.2.8, “Pluggable Actions”

A ButtonComponent renders a button. For the button is stored in a list, but only one button exists.

[Note]Note

When errorchecking is used for a ButtonComponent, there are some things the implementor has to care about:

  • When no errorcheck.component is configured, errorchecking will be done for the main Form, even if the ButtonComponent is nested inside a NestedFormComponent.

  • When a form is checked for errors, eventually nested forms (inside a NestedFormComponent) are NOT checked, since they are considered to be different forms. Checking multiple forms (e.g. the main form an a nested form) can be accomplished by usage of the “CheckErrorsAction” (Section 2.2.8.5) .

Table 4.22. Template Variables for ButtonComponent

NameTypeDescription
$component.buttonsListList containing the button.
$button IN $component.buttonsObjectThe button.
$button.labelStringReadable label of the button
$button.enabledBooleanIf button is enabled and clickable or not.
$button.nameStringUnique identifier of this button.
$buttonStringPlaceholder for rendering the button (deprecated).

ButtonComponent Example:

The example illustrates the usage of this component. 
Show example in
Gentics Portal.Node SDK
Show example in Gentics Portal.Node SDK
2.2.7.2.2. CaptchaComponent

Component which can be used to verify that the current user is no robot. (Currently displays a simple text captcha.)

Example 4.14. Syntax CaptchaComponent

<captchacomponent>
</captchacomponent>

Table 4.23. Settings CaptchaComponent

NameTypeDefaultDescription
No Settings.

Table 4.24. Template Variables for CaptchaComponent

NameTypeDescription
$component.captchaurlResource URLThe resource URL under which the captcha can be retrieved.
$component.captchawidthIntegerWidth of the captcha image in px.
$component.captchaheightIntegerHeight of the captcha image in px.
$component.nameStringInternal name of the component, used as html property.

Table 4.25. Error Keys for CaptchaComponent

KeyDescription
fill out image captchaKey of the error message when the captcha was not filled
Invalid captchaKey of the error message when the captcha was incorrectly filled
2.2.7.2.3. CheckboxComponent

Component used to display a checkbox.

Example 4.15. Syntax CheckboxComponent

<checkboxcomponent>
	<truevalue></truevalue>
	<falsevalue></falsevalue>
</checkboxcomponent>

Table 4.26. Settings CheckboxComponent

NameTypeDefaultDescription
truevalueStringtrueValue that will be assigned if checkbox is checked
falsevalueStringfalseValue that will be assigned if checkbox is unchecked

Table 4.27. Template Variables for CheckboxComponent

NameTypeDescription
$component.selectedBooleanTrue if checkbox is selected.

CheckboxComponent Example:

The example illustrates the usage of this component. 
Show example in
Gentics Portal.Node SDK
Show example in Gentics Portal.Node SDK
2.2.7.2.4. DatasourceSelectComponent

A single or multi selectcomponent with Resolvables matching the given rule.

[Note]Note

Altough this component can be used with every datasource, you should make sure that all requirements for the used datasource are provided.

For example “Datasources of type ldap” (Section 8.6.3.2) require that a rule is given. Otherwise it will not display any results.

Example 4.16. Syntax DatasourceSelectComponent

<datasourceselectcomponent>
	<datasource></datasource>
	<rule></rule>
	<nameattribute></nameattribute>
	<valueattribute></valueattribute>
	<multivalue></multivalue>
	<sortby></sortby>
	<sortorder></sortorder>
</datasourceselectcomponent>

Table 4.28. Settings DatasourceSelectComponent

NameTypeDefaultDescription
datasourceStringdefault datasource of the portletDatasource to use for the objects
ruleStringNULLRule to filter the shown objects. The currend object can be accessed via the "object" keyword when assembling rules.
nameattributeString(required)Attribute to be shown in the select box
valueattributeStringNULLAttribute to be used as values of the selected objects. When this setting is used, the component will return the referenced attribute values of the selected objects. Otherwise the component will return the selected objects themselves.
multivalueBooleanfalseWhether multiple values can be selected.
sortbyStringNULLAttributes by which the objects are sorted
sortorderStringASCsortorder ASC for ascending, DESC for descending

Table 4.29. Template Variables for DatasourceSelectComponent

NameTypeDescription
$component.multivalueBooleanWhether the component allows selection of multiple values
$component.nameStringInternal name of the component, used as html property.
$component.itemsListAll options.
$item IN $component.itemsObjectItem object.
$item.objectObjectResolvable object of this item.
$item.object(.*)ObjectProperties of the Resolvable object.
$item.selectedBooleanTrue if current item is selected.
$item.nameStringDisplayname of the item. Note: when the name is found in a dictionary, the translated String is rendered here. If this behaviour is not desired, implementations may use $item.nameKey instead.
$item.nameKeyString 
$item.valueStringValue of the select item.

Table 4.30. Error Keys for DatasourceSelectComponent

KeyDescription
Error required field must not be emptyKey of the error message when a mandatory field was not filled

DatasourceSelectComponent Example:

The example illustrates the usage of this component. 
Show example in
Gentics Portal.Node SDK
Show example in Gentics Portal.Node SDK
2.2.7.2.5. DateComponent

Component used to input Date/Time/Datetime.

Example 4.17. Syntax DateComponent

<datecomponent>
	<mindate></mindate>
	<maxdate></maxdate>
	<dateformatterid></dateformatterid>
	<dateformat></dateformat>
	<format-description></format-description>
	<help></help>
</datecomponent>																																		

Table 4.31. Settings DateComponent

NameTypeDefaultDescription
mindateDateNULLEarliest allowed date. Must be given in the form yyyy-MM-dd
maxdateDateNULLLatest allowed date. Must be given in the form yyyy-MM-dd
dateformatteridStringdateId of the dateformatter imp.
dateformatStringNULLFormat of the date. Must be a format definition that can be interpreted by the dateformatter imp.
format-descriptionStringNULLError message shown when the input could not be interpreted as date. Supports variable $date to show a correctly formatted date. If mindate and/or maxdate are set, additional variables $mindate and/or $maxdate are available.
helpStringNULLHelp message. Supports variable $date to show a correctly formatted date. If mindate and/or maxdate are set, additional variables $mindate and/or $maxdate are available.

Table 4.32. Template Variables for DateComponent

NameTypeDescription
$component.calendarbuttoncomponentObjectButtoncomponent to open and close the calendar. The Calendari s initially closed. $textcomponent is readonly while $calendar.open is true.
$component.calendarObjectCalendar Object.
$component.calendar.openBooleanTrue if calendar is open, false if closed. Is set, after $calendarbuttoncomponent click is processed.
$component.textcomponentObjectTextcomponent for display and text input of date.
$component.monthselectcomponentObjectSelectbox for months.
$component.yearselectcomponentObjectSelectbox for months.
$component.applybuttoncomponentObjectApply button for the year and month selectbox, used for users who have no javascript.
$component.weekdaysListList of Weekdays (in correct order, startin with the first weekday in a week.)
$weekday IN $component.weekdaysObjectDay of week.
  $weekday.dateDateDate object of weekday (the first fitting weekday of this month, 0:00)
$component.weeksListList of weeks to be shown in the calendar.
$week IN $weeksObjectA single week of the calendar.
  $week.dateDateFirst day in the week. (Can be used to show the # of the week.)
  $week.daysListList of days of the week.
$day IN $week.daysObjectDay object.
  $day.dateDateDate object of day (0:00)
  $day.selectedBooleanTrue if this is the currently selected day.
  $day.todayBooleanTrue if this is the current day. (today)
$day.urlStringURL to select the day and close the calendar again.
  $day.selectableBooleanWether the day can be selected, because of min/max date.
$component.calendar.todayObjectToday object.
$component.calendar.today.urlStringURL to store the day and close the calendar again.
$component.calendar.today.dateDateDate object of today (0:00)
$component.calendar.mindateDateEarliest day allowed.
$component.calendar.maxdateDateLatest date allowed.
$component.calendar.dateformatStringDateformat configured for the datecomponent.

Table 4.33. Error Keys for DateComponent

KeyDescription
Error no empty text allowedKey of the error message when a mandatory field was not filled

Table 4.34. Error Keys for DateComponent

KeyDescription
Invalid date syntaxKey of the error message when the date component was filled with an invalid format.

DateComponent Example:

The example illustrates the usage of this component. 
Show example in
Gentics Portal.Node SDK
Show example in Gentics Portal.Node SDK
2.2.7.2.6. FileUploadComponent

Component used to handle binary data (upload and download files). When the components data is stored into a Resolvable with a Form2ObjectAction, the binary data is stored in the attribute [id] and additional data (contenttype, filesize, uploaddate, filename) is stored in the configured attributes.

Example 4.18. Syntax FileUploadComponent

<fileuploadcomponent>
	<contenttypeattribute></contenttypeattribute>
	<filesizeattribute></filesizeattribute>
	<uploaddateattribute></uploaddateattribute>
	<filenameattribute></filenameattribute>
	<keepcontent></keepcontent>
	<downloadactions>...</downloadactions>
</fileuploadcomponent>

Table 4.35. Settings FileUploadComponent

NameTypeDefaultDescription
contenttypeattributeString(required)name of the attribute where the contenttype is stored
filesizeattributeStringNULLname of the attribute where the filesize is stored
uploaddateattributeStringNULLname of the attribute where the uploaddate is stored
filenameattributeString(required)name of the attribute where the filename is stored
keepcontentBooleantrueWhether to keep the uploaded file in the session after the upload.
downloadactionsNodefalseContainer for pluggable actions that shall be triggered when the binary data is downloaded. See Section 2.2.8, “Pluggable Actions”
[Note]Note

Some Browsers (e.g. Microsoft® Internet Explorer or Opera) are sending the full path to a file, instead of just the filename. This is circumvented by stripping everything from the beginning to the last / or \ from the filename.

The full path can still be retrieved by the component property originalFilename, or just the path with filepath right after the upload.

Table 4.36.  Component Properties for FileUploadComponent

NameTypeDescription
dataInputStreamAlias for filestream.
filestreamInputStreamThe content of the uploaded file.
filenameStringThe filename.
filesizeLongThe filesize in bytes.
contenttypeStringThe delivered contenttype of the file.
filepathStringThe locale path the file was uploaded from, if available.
viewurlString The viewurl that was created during the last rendering process. This url can be used to download the current binary data with Content-Disposition: inline.
downloadurlString The downloadurl that was created during the last rendering process. This url can be used to download the current binary data with Content-Disposition: attachment.

Table 4.37. Template Variables for FileUploadComponent

NameTypeDescription
$component.filesizeIntegerSize of the uploaded file (if available) in bytes.
$component.contenttypeStringContenttype of the uploaded file (if available).
$component.filenameStringname of the uploaded file (if available).
$component.viewurlStringURL to view the uploaded file in a new window (disposition:inline).
$component.downloadurlStringURL to download the uploaded file (disposition:attachment).

Table 4.38. Error Keys for FileUploadComponent

KeyDescription
file doesn't match current patternThe uploaded file did not match the given filename pattern
file too bigThe uploaded file exceeded the file upload limit
No file uploadedNo file was uploaded for a mandatory component
file upload errorAnother file upload error occurred.

FileUploadComponent Example:

The example illustrates the usage of this component. 
Show example in
Gentics Portal.Node SDK
Show example in Gentics Portal.Node SDK
2.2.7.2.7. NumberComponent

Component used to input integer or floating point (double) numbers.

Example 4.19. Syntax NumberComponent

<numbercomponent>
  <min></min>
  <max></max>
  <type></type>
  <fractiondigits failifmore=""></fractiondigits>
</numbercomponent>

Table 4.39. Settings NumberComponent

NameTypeDefaultDescription
minNumberNULLMinimum number allowed to be entered. Must be entered in the "internal" format for numbers, like: -1003.14159. When not entered, there is no lower limit for the entered number.
maxNumberNULLMaximum number allowed to be entered. Must be entered in the "internal" format for numbers, like: -1003.14159. When not entered, there is no upper limit for the entered number.
type"integer"|"double"doubleType of the entered number.
fractiondigitsInteger0Number of allowed fraction digits, when the type is set to Double. When more fraction digits are entered, the number will be rounded or an error thrown, depending on the setting of failifmore.
fractiondigits.failifmoreBooleanFALSEBehaviour when more than fractiondigits are entered for Double numbers. When set to true, an error will be thrown, when set to false, the number will be rounded.

Table 4.40. Template Variables for NumberComponent

NameTypeDescription
$component.valueStringCurrent value.
$component.nameStringInternal name of the component, used as html property.

Table 4.41. Error Keys for NumberComponent

KeyDescription
Error no number enteredNo number entered for a mandatory component.
Error Not a valid numberThe entered text was not a number
Error Number not in rangeThe entered number was not in the valid range
Error Too many fraction digits givenThe entered number had too many fraction digits.

NumberComponent Example:

The example illustrates the usage of this component. 
Show example in
Gentics Portal.Node SDK
Show example in Gentics Portal.Node SDK
2.2.7.2.8. PasswordComponent

Singleline textfield with error checking by regexes. The component can render a second input field for verification of the input.

Example 4.20. Syntax PasswordComponent

<passwordcomponent>
	<encrypted></encrypted>
	<labelverify></labelverify>
	<syntax></syntax>
	<syntax-description></syntax-description>
</passwordcomponent>																		

Table 4.42. Settings PasswordComponent

NameTypeDefaultDescription
encryptedBooleantrueWhether to provide the password cleartext or encrypted.
labelverifyStringVerifyLabel for the verify field.
syntaxStringNULLRegular expression the value is matched against. Creates an error in case of mismatch.
syntax-descriptionStringInvalid SyntaxReadable description of the syntax. Will be displayed as error message.

Table 4.43.  Component Properties for PasswordComponent

NameTypeDescription
dataStringThe given password, either cleartext or encrypted depending on the component's settings
encryptedStringThe given password, encrypted. The algorithm used is MD5 in a 32 characters (0-9A-F) representation independent of the component's settings.
cleartextStringThe given password, cleartext. If encryption is enabled this will be NULL as long as the user has not entered a new password.

Table 4.44. Template Variables for PasswordComponent

NameTypeDescription
$component.namepasswordStringInternal name of the component, used as html property.
$component.namepasswordverifyStringInternal name of the verify component, used as html property.
$component.labelverifyStringLabel for the verify-password input field.

Table 4.45. Error Keys for PasswordComponent

KeyDescription
Error: Please enter a password!No password was entered for a mandatory component.
Error: Passwords do not match!The password was not entered identically in both fields.

PasswordComponent Example:

The example illustrates the usage of this component. 
Show example in
Gentics Portal.Node SDK
Show example in Gentics Portal.Node SDK
2.2.7.2.9. SelectComponent

Component used to select static options.

Example 4.21. Syntax SelectComponent

<selectcomponent>
	<multivalue></multivalue>
	<options>
		<option id=""></option>
		... 
	</options>
	<optionsproperty type="" sortorder=""></optionsproperty>
	<nameattribute></nameattribute>
	<valueattribute></valueattribute>
</selectcomponent>

Table 4.46. Settings SelectComponent

NameTypeDefaultDescription
multivalueBooleanfalseWhether more than one value can be selected
optionsNodeNULLlist of static options
options.optionStringNULLThe shown option value
options.option.idStringNULLThe stored option id
optionspropertyStringNULLPath to a portal property holding an encoded map of selectable values
optionsproperty.typeStringkeyfirstEither keyfirst or valuefirst. Whether the key comes first in the encoded map or the value
optionsproperty.sortorderString (asc|desc)NULLSortorder for the options defined in the optionsproperty.
nameattributeStringNULLIf the options are set as a collection, use this attribute to read the name.
valueattributeStringNULLIf the options are set as a collection, use this attribute to read the value.

Table 4.47. Template Variables for SelectComponent

NameTypeDescription
$component.itemsListAll options.
$item IN $component.itemsObjectItem object.
  $item.nameStringDisplay name of option.
  $item.valueStringInternal value of option. May be null (see $component.hasvalue)
  $item.selectedStringDisplayname of item.
  $item.objectObjectObject representation of the item.
$component.hasvaluesBooleanTrue if $component.items have values and names, false if $component.items have only names.
$component.nameStringInternal name of the component, used as html property.
$component.multipleBooleanTrue if multiple selections are allowed.
$component.hassizeBooleanTrue if a specific size has been set for this component.
$component.sizeIntegerSize of the selection. May be null (see $component.hassize)

Table 4.48.  Component Properties for SelectComponent

NameTypeDescription
singlevalueStringSelected value as a single String (not as collection)
optionsNodelist of static options
nameattributeStringIf the options are set as a collection, use this attribute to read the name.
valueattributeStringIf the options are set as a collection, use this attribute to read the value.

Table 4.49. Error Keys for SelectComponent

KeyDescription
Error required field must not be emptyNo value selected in a mandatory select component.

SelectComponent Example:

The example illustrates the usage of this component. 
Show example in
Gentics Portal.Node SDK
Show example in Gentics Portal.Node SDK
2.2.7.2.10. TextAreaComponent

Multiline textfield with error checking by regexes.

Example 4.22. Syntax TextAreaComponent

<textareacomponent>
	<syntax></syntax>
	<syntax-description></syntax-description>
</textareacomponent>													

Table 4.50. Settings TextAreaComponent

NameTypeDefaultDescription
syntaxStringNULLRegular expression the value is matched against. Creates an error in case of mismatch.
syntax-descriptionStringNULLReadable description of the syntax. Will be displayed as error message.

Table 4.51. Template Variables for TextAreaComponent

NameTypeDescription
$component.valueTextCurrent value.
$component.nameStringInternal name of the component, used as html property.
$component.lengthIntegerLength of the textfield.

Table 4.52. Error Keys for TextAreaComponent

KeyDescription
Error no empty text allowedNo text entered into a mandatory text field.

TextAreaComponent Example

The example illustrates the usage of this component. 
Show example in
Gentics Portal.Node SDK
Show example in Gentics Portal.Node SDK
2.2.7.2.11. TextComponent

Singleline textfield with error checking by regexes.

Example 4.23. Syntax TextComponent

<textcomponent>
	<syntax></syntax>
	<syntax-description></syntax-description>
</textcomponent>															

Table 4.53. Settings TextComponent

NameTypeDefaultDescription
syntaxStringNULLRegular expression the value is matched against. Creates an error in case of mismatch. This can also be the key of entries in the dictionaries, to support language specific syntax checking.
syntax-descriptionStringNULLReadable description of the syntax. Will be displayed as error message.

Table 4.54. Template Variables for TextComponent

NameTypeDescription
$component.valueStringCurrent value.
$component.nameStringInternal name of the component, used as html property.

Table 4.55. Error Keys for TextComponent

KeyDescription
Error no empty text allowedNo text entered into a mandatory text field.

TextComponent Example:

The example illustrates the usage of this component. 
Show example in
Gentics Portal.Node SDK
Show example in Gentics Portal.Node SDK
2.2.7.3. Display Components
2.2.7.3.1. DatasourceListComponent

Lists Resolvables Objects in ViewPlugin according to Objectstructure, with sorting, formatting and quicksearch.

[Note]Note

Altough this component can be used with every datasource, you should make sure that all requirements for the used datasource are provided.

For example “Datasources of type ldap” (Section 8.6.3.2) require that a rule is given. Otherwise it will not display any results.

Example 4.24. Syntax DatasourceListComponent

<datasourcelistcomponent>
  <columns>
    <column id="">
      <visible>[<prule></prule>]</visible>
      <label></label>
      <property></property>
      <foreignproperty></foreignproperty>
      <sortable></sortable>
      <actions>...</actions>
      <properties>
        <property id="...">...</property>
        ...
      </properties>
    </column>
    ...
  </columns>
  <sortorder></sortorder>
  <sortby></sortby>
  <sortable></sortable>
  <quicksearch></quicksearch>
  <rule></rule>
  <filterrule></filterrule>
  <filterlabel></filterlabel>
  <paging>
    <size></size>
    <current></current>
    <customsizes></customsizes>
  </paging>
  <datasource></datasource>
  <idattribute></idattribute>
  <stickyselection>[<prule></prule>]</stickyselection>
</datasourcelistcomponent>

Table 4.56. Settings DatasourceListComponent

NameTypeDefaultDescription
columnsListNULLAll columns to be listed
column in columnsObjectNULLA single column and its properties
column.idString(required)Id of the column. For columns showing object attributes this must be the attribute’s id.
column.visibleBoolean or pruleTRUEWhether this column is visible or not.
column.labelString(required)Label of the column
column.propertyStringidObject property to show in this column
column.foreignpropertyStringNULL When the show property is another Resolvable object, the foreignproperty is the attribute of the Resolvable to be shown in the column (otherwise, the string representation of the Resolvable would be shown). This may also be a property path, if the foreignproperty of the linked object is again an object link (thus it is e.g. possible to show the name of the manager of the company of a listed person).
column.actionsNodeNULLConfigured pluggable actions for the column. The actions will resolve the clicked object (row) as data.object.* in their contexts.Section 2.2.8, “Pluggable Actions”
column.propertiesNodeNULLCustom properties set for this column. Can be used to set properties that are interpreted in the template of the DatasourceListComponent.
propertyNodeNULLSingle property setting.
property.idString(required)Id of the property set.
column.sortableBooleanNULLWhether this column is sortable or not. (Sortable means that the user may sort the list by this column). This setting overwrites the general setting sortable .
sortorderStringASCsort order, ASC for ascending or DESC for descending
sortbyStringNULLdefines the name of the attribute by which the elements in the list are sorted
sortableBooleanfalseWhether the list shall be sortable or not. This setting applies to all columns but can be overwritten with column.sortable .
quicksearchNodeNULLNode containing the quicksearch settings
quicksearch.filterlabelString(required)Filterlabel to be set when the list is filtered by a quicksearch
ruleStringNULLBase rule that filters the objects shown in the list. (The current item is accessible through 'object.' in the rule)
filterruleStringNULLAdditional filterrule that further limits the objects shown in the list (combined with AND to an eventually existing rule). The filterrule is changed by a quicksearch or by other search mechanisms (e.g. RuleSearchAction). (The current item is accessible through 'object.' in the rule)
filterlabelStringNULLFilterlabel shown when a filterrule is applied
pagingNodeNULLPaging settings. This column is optional. If no paging settings are provided no paging is applied.
paging.sizeInteger(required)Number of objects shown on a single page. When this is set to 0, no paging is used.
paging.currentInteger1Initial value for the currently shown page.
paging.customsizesList of IntegersNULLSpace delimited list of Custom page sizes the user may select for the list. 0 would be shown as "all" in the pagesize selectbox.
datasourceStringNULLId of the datasource to be used. When left empty, the portlet's default datasource is used (when configured). Set the datasource to false when the component shall not fetch the objects itself, but shall be filled by modification of the property items or by filling objects into a view using the Object2FormAction.
idattributeStringcontentidAttribute of the listed objects that identifies the objects uniquely. It is necessary to set this correctly so that list items can be identified.
stickyselectionBoolean or PruleFALSE

Whether the selection of rows in the list will remain longer than until the next click. With stickyselection set to FALSE, a selection made by the user will automatically be removed when the user clicks on a button or link. This is the default behaviour. If you need the selection for more than the next click, set this to TRUE. The selection can be reset by setting the component property view.components.[datasourcelistcomponent].selection = "".

[Note]Note

When a column is defined to represent binary data (e.g. the contents of a file), the rendered data is not the binary data itself, but is a link that can be used to download the binary data. Additionally, the template of the DatasourceListComponent has to take care about this fact and generate the html link for such columns!

Another solution for providing download links in a DatasourceListComponent would be to use a DownloadAction in combination with a DownloadComponent. See Section 2.2.7.3.3, “DownloadComponent” and Section 2.2.8.10, “DownloadAction” for details.

Table 4.57. Template Variables for DatasourceListComponent

NameTypeDescription
$component.quicksearchStringThe quicksearch content.
$component.quicksearch.enabledBooleanTrue when the list is filtered by a quicksearch.
$component.headersListAll column headers
$header IN $component.headersObjectA single column header
$header.labelStringLabel of this column header
$header.sortlinkStringThe URL to sort this list by this property ASC or, if already ASC, URL to order DESC
$header.sortlinkAscStringReturns an URL to sort this list by this property ascending.
$header.sortlinkDescStringReturns an URL to sort this list by this property descending.
$header.sortorderStringCurrent sortorder of this property. Either "ASC" or "DESC"
$header.propertiesMapMap of the set custom properties for the column.
$component.filterobjectObjectObject for the currently used filter. May be used to display properties of the filter together with the filterlabel.
$component.filterlabelStringLabel of the sued filter.
$component.itemsListAll items (rows) of the current page.
$item in $component.itemsObjectItem object.
$item.propsListAll listed properties of the item (columns)
$item.contentObjectThe resolvable object of this item. This variable is DEPRECATED, use $item.object instead.
$item.content{.*}ObjectProperties of the object.
$item.objectObjectThe resolvable object of this item.
$item.object{.*}ObjectProperties of the object.
$prop IN $item.propsObjectProperty (column) of an item.
$prop.columnidStringId of the column.
$prop.valueStringValue of the itemproperty if the column shows a property of the item.
$prop.linkStringLink to trigger the action defined for the column. Is empty if no action was defined or if all defined actions are inactive due to their rules.
$prop.propertiesMapMap of the set custom properties for the column.
$prop.properties.[propertyid]StringValue of the property [propertyid].
$component.paging.sizeIntegerMaximum number of items to be shown on one page.
$component.paging.currentIntegerCurrent page number, starting with 1.
$component.paging.pagesListList of all available pages.
$page IN $component.paging.pagesObjectPage object.
$page.linkStringLink to activate this page.
$page.numberIntegerPage number.
$component.countIntegerTotal number of items within all pages.
$component.advancedsearchlinkStringLink to the advanced search (or null if no advancedsearch was configured)
$component.toggleselectionButtonComponentButton Container for Checkbox toggle actions, or null if not available.
$component.toggleselection.buttons.noneButtonButton to deselect all items.
$component.toggleselection.buttons.allButtonButton to select all items.
$component.toggleselection.buttons.toggleButtonButton to deselect all items if any is selected or to select all if there is currently no item selected.
$component.pagingsizeselectSelectComponentComponent to select paging size, or null if not available.

Table 4.58.  Component Properties for DatasourceListComponent

NameTypeDescription
itemsCollection Objects shown in the DatasourceListComponent. The returned items are dependent on set rule or filterrule and also on the currently set sorting, but not on the paging or the attributes shown in the list (the returned objects will not have any attributes prefilled, see below on more useful information about using this property). When the DatasourceListComponent has a datasource configured, this property is not changeable (since the DatasourceListComponent fetches the items itself). When the DatasourceListComponent is used to display data stored in a multivalue attribute, this property can be modified.
selectionCollection Currently selected objects. Remove the selection by setting this property to ""
filterruleString Rule that filters the shown items in the list. Can be set/unset to implement search functionality in the list.
pagingsizeInteger Allows setting and retrieving of the paging size (Items displayed per page).
currentpageInteger Will switch paging to the page number provided. Settings lower than 1 will result in displaying the first page, while settings which are higher than the actual number of pages will lead to the last page.
[Note]Note

When items are fetched from a DatasourceListComponent by reading the property items , it has to be taken into consideration that really all objects are fetched from the configured datasource that match the currently set rule and/or filterrule regardless of their total number (paging of the component is not used here). For very large datasets this will consume both cpu and memory ressources on the server and could even lead to OutOfMemoryExceptions. Also it has to be noted that the fetched objects will have no attributes prefilled. Accessing attributes for many (or all) of the objects without having them prefilled first could possibly create a high server load by accessing the underlying storage (database) for every single attribute.

DatasourceListComponent Example:

The example illustrates the usage of this component. 
Show example in
Gentics Portal.Node SDK
Show example in Gentics Portal.Node SDK
2.2.7.3.2. DatasourceTreeComponent

Component used to display object relations in a tree. The objects are selected by a rootrule (for filtering the objects shown in the first hierarchy level) and noderelations (attributes that link to other objects).

Example 4.25. Syntax DatasourceTreeComponent

<datasourcetreecomponent>
  <datasource></datasource>
  <idattribute></idattribute>
  <rootrule></rootrule>
  <noderule></noderule>
  <disableflapping></disableflapping>
  <hideclosednodes></hideclosednodes>
  <maxlevel></maxlevel>
  <nodeactions defaultaction="">
    <nodeaction id="">
      <label></label>
      <visible></visible>
      <enabled></enabled>
      <actions>
        ...
      </actions>
      <properties>
        <property id="...">...</property>
          ...
      </properties>
    </nodeaction>
    ...
  </nodeactions>
  <sortby></sortby>
  <sortorder></sortorder>
  <paging>
    <size></size>
    <current></current>
    <customsizes></customsizes>
  </paging>
  <relations>
    <relation attribute="" sortby="" sortorder="" reverseattribute="">
      <rule></rule>
    </relation>
    ...
  </relations>
  <idattribute></idattribute>
  <maxlevel></maxlevel>
  <hideclosednodes>[<prule></prule>]</hideclosednodes>
  <prefillattributes></prefillattributes>
</datasourcetreecomponent>

Table 4.59. Settings DatasourceTreeComponent

NameTypeDefaultDescription
datasourceStringdefault portlet datasourceId of the datasource to use. When not configured, the default datasource of the portlet is used.
idattributeStringcontentidName of the attribute of the resolvables loaded from the datasource, that uniquely identify the objects. This needs to be set correctly, otherwise the tree will not work like expected.
rootruleStringtrueRule to restrict the objects shown in the first hierarchy level of the tree. Resolves portal., views., view. and form. See Property Path.
noderuleStringtrueRule to further restrict all objects shown in the tree. Resolves portal., views., view. and form. See Property Path.
disableflappingBoolean or prulefalseWhether flapping is enabled or disabled. If true then $child.flappable will be false and $child.flappedOpen will be true for all children.
nodeactionsNodeNULLList of nodeactions defined for the tree.
nodeactions.defaultactionStringNULLThe id of the default action (will be supported by a direct link)
nodeaction.idString(required)Id of the nodeaction. Must be unique in the scope of the component.
nodeaction.labelStringNULLLabel of the nodeaction.
nodeaction.visibleBoolean or pruletrueWhether the action is visible. The rule may contain "object" as base object to match the currently shown treeobject.
nodeaction.enabledBoolean or pruletrueWhether the action is enabled. The rule may contain "object" as base object to match the currently shown treeobject.
nodeaction.actionsNodeNULLActions container holding pluggable action definitions. The treeobject will be available in the actions’ contexts as "data.object".
nodeaction.propertiesNodeNULLCustom properties of the nodeaction.
propertyNodeNULLA single custom property.
property.idString(required)Id of the custom property.
sortbyStringNULLName of the attribute by which the root objects are sorted.
sortorderStringASCOne of ASC or DESC. Sort order for the root objects.
pagingNodeNULLPaging settings
paging.sizeInteger(required)Number of objects shown on a single page. When this is set to 0, no paging is used.
paging.currentInteger1Initial value for the currently shown page.
paging.customsizesList of IntegersNULLSpace delimited list of Custom page sizes the user may select for the list. 0 would be shown as "all" in the pagesize selectbox.
relationsNodeNULLlist of relations to build the tree.
relation.attributeString(required)Name of the attribute defining the relation. The attribute should link to other objects.
relation.sortbyStringNULLname of the attribute by which objects linked to by this relation are sorted. NULL means no sorting.
relation.sortorderStringASCOne of ASC or DESC. Sort order (ascending or descending)
relation.ruleStringtrueDetermines whether the children of an object, related with this relation, should be shown. The mother object is matched against the rule.
relation.reverseattributeStringNULLName of the attribute that is the reverse of the relation attribute. This attribute must lead from any node to its parent node. When this property is set and a node is opened via setting the property openpath, all parent nodes of the opened node are also opened to ensure that the opened node is really visible.
idattributeStringcontentidName of the attribute that uniquely identify the Resolvables shown in the tree. Note that is is necessary to set this correctly, otherwise the component will fail to work. The default contentid works with datasources of type contentrepository .
maxlevelInteger-1Maximum number of levels to be shown in the tree. Set this to 0 to show only the root nodes or -1 for no level limit.
hideclosednodesBoolean or prulefalseWhether closed nodes shall be hidden from view. When this is true, only the open nodes (including all parent nodes) are rendered. Otherwise also closed nodes will be rendered.
prefillattributesStringNULLA comma-separated list of attributes that should be prefilled when loading the objects from the database (increases performance).

Table 4.60. Template Variables for DatasourceTreeComponent

NameTypeDescription
$component.treeObjectContains the root node of the Tree.
$component.tree.childrenListChildren of the root node.
$child IN $tree.childrenObjectContains one tree node.
  $child.childrenListContains the list of children of the tree node
  $child.nodeCountIntegerCalculates number of all direct children (non-recursive)
  $child.allNodeCountIntegerCalculates number of all subnodes (recursive)
  $child.getAllNodeCount( "rule" )IntegerCalculates number of all subnodes applying to the defined rule (recursive) - e.g.: "object.obj_type == 2"
  $child.visibleBooleanWhether the child is visible or not.
  $child.flappableBooleanWhether the node is flappable (has children).
  $child.flappedOpenBooleanWhether the node is flapped open.
  $child.flapLinkOpenStringURL to open this node.
  $child.flapLinkCloseStringURL to close this node.
  $child.flapLinkAllOpenStringURL to open this node and all nodes below.
  $child.flapLinkCloseStringURL to close this node and all nodes below.
  $child.userObjectObjectThe Data Object from the datasource. This variable is DEPRECATED, use $child.object instead.
  $child.userObject(.*)ObjectProperties of the object.
  $child.levelIntegerHierarchy level of the current node. Will be 0 for root nodes.
  $child.objectObjectThe resolvable object of this item.
  $child.object{.*}ObjectProperties of the object.
  $child.defaultActionLinkStringURL to activate the default action on this node, when such an action exists and is enabled.
  $child.firstBooleanTrue when the child is the first child of its parent
  $child.lastBooleanTrue when the child is the last child of its parent.
  $child.numberIntegerNumber of the child within all children of its parent, starting with 1.
$action in $child.nodeActionsObjectA configured nodeAction.
  $action.idStringThe ID of the action if it was specified.
  $action.enabledBooleanWhether the action is enabled.
  $action.visibleBooleanWhether the action is visible.
  $action.labelStringLabel of the action.
  $action.urlStringURL to activate this action.
  $action.propertiesMapCustom properties of the nodeaction.
  $action.properties.[propertyid]StringValue of the custom property [propertyid].

Table 4.61.  Component Properties for DatasourceTreeComponent

NameTypeDescription
openCollection of StringsCollection of the id's of the currently opened nodes. This property can also be modified to open/close nodes.
openpathCollection of StringsThis "property" is not readable but can be set to open a specific node (or some specific nodes) with all their respective parent nodes. Setting this property will not change other open nodes. For this property to work correctly, it is necessary to set relation.reverseattribute .
reloadBooleanThis "property" is not readable, you can use it to force the component to reload it's data. (E.g. when something referenced in the rule was modified which is unrelated to the component itself.)
sortbyStringAllows to set the 'sortby' setting of this component. Expects the name of the attribute.
sortorderStringAllows to set the 'sortorder' setting of this component. This is either "asc" or "desc"

DatasourceTreeComponent Example:

The example illustrates the usage of this component. 
Show example in
Gentics Portal.Node SDK
Show example in Gentics Portal.Node SDK
2.2.7.3.3. DownloadComponent

The download component can be used to provide binary data (files) for downloading to the user client. When placed inside a view, this component normally does not render any output (and therefore does not need a template). When a DownloadAction is processed that refers to this component, it will provide the binary data as download to the client. See Section 2.2.8.10, “DownloadAction” for details.

Example 4.26. Syntax DownloadComponent

<downloadcomponent>
</downloadcomponent>

Table 4.62. Settings DownloadComponent

NameTypeDefaultDescription
No Settings.

Table 4.63.  Component Properties for DownloadComponent

NameTypeDescription
contentvariousThe content the component shall provide as download. May be binary data, a string or stream
filenameStringFilename of the download.
disposition[attachment]|[inline]"Type" of the download. "Attachment" should be used for normal downloads (browser will ask whether to save or open the file). When set to "inline", the browser should try to open the file automatically.
contenttypeStringMimetype of the content to download.

DownloadComponent Example:

The example illustrates the usage of this component. 
Show example in
Gentics Portal.Node SDK
Show example in Gentics Portal.Node SDK
2.2.7.3.4. FeedbackComponent

Component used to display one-time messages (message will automatically be reset when rendered once). The messages are defined or set by actions.

[Note]Note

When using a FeedbackComponent to display one-time messages, you should avoid to render the same view more than once on the same portal page, because the feedback would only be visible in one of the view occurances (the one which is rendered first) and this behaviour might be unexpected.

Example 4.27. Syntax FeedbackComponent

<feedbackcomponent>
</feedbackcomponent>

Table 4.64. Settings FeedbackComponent

NameTypeDefaultDescription
No Settings.

Table 4.65. Template Variables for FeedbackComponent

NameTypeDescription
$component.textStringFeedback message.

FeedbackComponent Example:

The example illustrates the usage of this component. 
Show example in
Gentics Portal.Node SDK
Show example in Gentics Portal.Node SDK
2.2.7.3.5. InformationComponent

Component used to display data coming from other components in the same form.

Example 4.28. Syntax InformationComponent

							
<informationcomponent>
	<reference></reference>							
</informationcomponent>														

Table 4.66. Settings InformationComponent

NameTypeDefaultDescription
referenceString(required)Id of the referenced component. When the value of the component is an object, the reference could also contain a specific attribute of this object.

Table 4.67. Template Variables for InformationComponent

NameTypeDescription
$component.valueObjectValue of the referenced component.
2.2.7.3.6. LabelComponent

Example 4.29. Syntax LabelComponent

<labelcomponent>
	<text></text>
</labelcomponent>																

Table 4.68. Settings LabelComponent

NameTypeDefaultDescription
textStringNULLText to be shown in the label component. This should be an i18n key to an entry in the dictionaries.

Table 4.69. Template Variables for LabelComponent

NameTypeDescription
$component.textStringThe text to output.

Table 4.70.  Component Properties for LabelComponent

NameTypeDescription
textStringThe text to output.

LabelComponent Example

The example illustrates the usage of this component. 
Show example in
Gentics Portal.Node SDK
Show example in Gentics Portal.Node SDK
2.2.7.3.7. ListComponent

A container component for other components. Used to list components.

Example 4.30. Syntax ListComponent

<listcomponent>
	<content>...</content>
</listcomponent>																		

Table 4.71. Settings ListComponent

NameTypeDefaultDescription
contentNodeNULLNode holding the subcomponents.

Table 4.72. Template Variables for ListComponent

NameTypeDescription
$component.itemsListAll list items.
$item IN $component.itemsCollectionOne of the items in $component.items
$itemStringThe content of the subitem itself.
$item.*ObjectMain object of subcomponent for component properties.

ListComponent Example:

The example illustrates the usage of this component. 
Show example in
Gentics Portal.Node SDK
Show example in Gentics Portal.Node SDK
2.2.7.3.8. NestedFormComponent

Component used to implement a nested form inside another form. A NestedFormComponent can hold any combination of components as children, even other NestedFormComponents (so it is possible to generate a form in form in form in ... All inner components are prefixed with the id of the nestedformcomponent (prefix and component id separated by underscore _). Nested forms can be treated analogously to views, in the sense that the Form2ObjectAction, Object2FormAction and GeneralViewAction may refer to NestedFormComponents instead of a whole view.

See Section 2.2.8.13, “Form2ObjectAction” , Section 2.2.8.17, “Object2FormAction” and Section 2.2.8.14, “GeneralViewAction” for details.

Example 4.31. Syntax NestedFormComponent

<nestedformcomponent>
	<content>...</content>
	<exclusive></exclusive>
	<visibility></visibility>
	<openbuttonlabel></openbuttonlabel>
	<closebuttonlabel></closebuttonlabel>
	<closeon></closeon>
</nestedformcomponent>

Table 4.73. Settings NestedFormComponent

NameTypeDefaultDescription
contentNodeNULLContainer for inner components of the nested form
exclusiveBoolean or Rulefalsewhether the inner form shall be exclusive (when the visibility mode is "ondemand") when an exclusive nested form is opened, all surrounding components are disabled.
visibilityStringalwaysvisibility mode of the form in form: "always" to have the inner form always open, "ondemand" to have the inner form being opened and closed using default buttons (which will be autogenerated), "custom" when the opening and closing of the inner form is done through setting the open property or via PluggableActions.
openbuttonlabelStringOpenlabel of the open button (when the visibility mode is "ondemand")
closebuttonlabelStringCloselabel of the close button (when the visibility mode is "ondemand")
closeonList of StringsNULLspace delimited list of buttoncomponent id’s; defines the inner buttoncomponents, which will automatically close the form, when all actions defined for the button were successfully processed.

Table 4.74. Template Variables for NestedFormComponent

NameTypeDescription
$component.itemsListList of inner components
$component.buttonsComponentButton component holding the default buttons (for opening/closing the inner form when the visibility mode is "ondemand")

Table 4.75.  Component Properties for NestedFormComponent

NameTypeDescription
openBooleanWhether the form is open or closed. Can be used to open/close the inner form, when visibility is set to custom.

NestedFormComponent Example:

The example illustrates the usage of this component. 
Show example in
Gentics Portal.Node SDK
Show example in Gentics Portal.Node SDK
2.2.7.3.9. TabComponent

Example 4.32. Syntax TabComponent

<tabcomponent>
	<content>
		<tab>
			<label></label>
			<visible></visible>
			<enabled></enabled>
			<optional></optional>
			<properties></properties>
			<content>...</content>
		</tab>
		...
	</content>
	<activetab></activetab>
</tabcomponent>						

Table 4.76. Settings TabComponent

NameTypeDefaultDescription
contentNodeNULLNode holding the tabs
content.tabNodeNULLNode holding a tab. Many tabs may be defined.
tab.labelStringrequiredReadable label. The label should be the i18n key of the real labels in the dictionaries for multilanguage support.
tab.visibleBoolean or pruletrueWhether this tab is visible or not.
tab.enabledBoolean or pruletrueWhether this tab is enabled or not. Disabled tabs can not be activated or clicked.
activetabStringfirst tab definedId the the initial active tab.

Table 4.77. Template Variables for TabComponent

NameTypeDescription
$component.itemsListAll tabs
$item in $component.itemsObjectOne of the tabs in $component.items
$item.visibleBooleanVisibility of a tab.
$item.enabledBooleanFalse, if the tab is not available to the user.
$item.componentObjectGeneral variables of the component of the tab. Cannot render the tab-component
$item.activeBooleanTrue for the currently selected tab by the user.
$item.idStringThe id of a tab.
$item.nameStringThe name of a tab.
$item.taburlStringThe url to activate a tab.
$component.activetabStringId of the active tab.
$component.contentStringThe content of the active tab.

TabComponent Example:

The example illustrates the usage of this component. 
Show example in
Gentics Portal.Node SDK
Show example in Gentics Portal.Node SDK
2.2.7.3.10. VersionInformationComponent

Component used to display information about the version that is currently displayed or edited in a view. This component should be used together with the VersioningComponent (see Section 2.2.7.3.11, “VersioningComponent” ).

Example 4.33. Syntax VersionInformationComponent

<versioninformationcomponent>
</versioninformationcomponent>

Table 4.78. Settings VersionInformationComponent

NameTypeDefaultDescription
No Settings.

Table 4.79. Template Variables for VersionInformationComponent

NameTypeDescription
$component.versiontimestampIntegerTimestamp of the currently displayed or edited version. Will be set to -1 for the current version.
$component.currentBooleanWhether the version is the current version.
$component.pastBooleanWhether the version is the past version.
$component.futureBooleanWhether the version is the future version.

Table 4.80.  Component Properties for VersionInformationComponent

NameTypeDescription
versiontimestampIntegerTimestamp of the currently displayed or edited version. Will be set to -1 for the current version.
currentBooleanWhether the version is the current version.
pastBooleanWhether the version is the past version.
futureBooleanWhether the version is the future version.

VersionInformationComponent Example:

The example illustrates the usage of this component. 
Show example in
Gentics Portal.Node SDK
Show example in Gentics Portal.Node SDK
2.2.7.3.11. VersioningComponent

Component used to display and manage versions of the contentobject edited in the current form. This component can only be used when the datasource supports versioning. The VersioningComponent shows a list of all existing versions of an object. Since this list may be long and space consuming, it is recommended to place this component in an own tab of the TabComponent. To ensure that a user is aware of which version of an object is currently shown in a view, it is recommended to use a VersionInformationComponent (not as part of the TabComponent, but always visible). See Section 2.2.7.3.11, “VersioningComponent” and Section 2.2.7.3.9, “TabComponent” for detailed information.

Example 4.34. Syntax VersioningComponent

<versioningcomponent>
	<currentversionlabel></currentversionlabel>
	<versiondatelabel></versiondatelabel>
	<createversionlabel></createversionlabel>
	<viewpastobjects></viewpastobjects>
	<viewfutureobjects></viewfutureobjects>
	<editpastobjects></editpastobjects>
	<editfutureobjects></editfutureobjects>
</versioningcomponent>

Table 4.81. Settings VersioningComponent

NameTypeDefaultDescription
currentversionlabelStringcurrent versionLabel for the button to switch to the current version of an object
versiondatelabelStringnew version dateLabel for the DateComponent to enter the date for a new version
createversionlabelStringcreate versionLabel for the button to create a new version at the given date
viewpastobjectsBooleanfalseWhether viewing of past versions is allowed or not
viewfutureobjectsBooleanfalseWhether viewing of future versions is allowed or not
editpastobjectsBooleanfalseWhether editing of past versions is allowed or not
editfutureobjectsBooleanfalseWhether editing of future versions is allowed or not

Table 4.82. Template Variables for VersioningComponent

NameTypeDescription
$component.versionsListList of versions of the edited object.
$version IN $component.versionsObjectOne version of the edited object.
$version.dateDateDate of the version (when version was created.)
$version.diffcountInteger# of changed records in this version.
$version.restoreurlStringURL to restore the version (may be null if restoring is not allowed.)
$version.displayurlStringURL to display the version.
$version.newBooleanTrue if this version is new.
$version.shownVersionBooleanTrue if this version is currently shown.
$comopnent.dateDateComponentDate component for creation of new versions. (can be null)
$component.createButtonComponentButton component used to create new versions. (can be null)
$component.currentButtonComponentButton component used to switch to the current version.

VersioningComponent Example:

The example illustrates the usage of this component. 
Show example in
Gentics Portal.Node SDK
Show example in Gentics Portal.Node SDK

2.2.8. Pluggable Actions

2.2.8.1. Introduction

Pluggable Actions are small pieces of Java-Code that can be plugged into views. Pluggable actions can be triggered by button components (the code is executed when the button is clicked by the user) or some other components.

Some pluggable actions can be invoked "manually" by using the PluggableActionInvoker. See the CsvImportExample in the SDK Guide for an example.

2.2.8.2. Implementation

Example 4.35. Structure of pluggable action definitions.

<actions>
  <action id="" class="" feedback="">
    <prule>...</prule>
      <parameters>
      <parameter id="" mapped="" required="">[static value]</parameter>
        ...
      </parameters>
      <onsuccess message="..." proceedsequence="...">
        <actions/>
      </onsuccess>
      <onfailure message="..." proceedsequence="...">
        <actions/>
      </onfailure>
    </action>
    ...
</actions>
						

Table 4.83. General Action Attributes

NameTypeDefaultDescription
actionsContainerNULL Container of defined actions. May hold one or more actions (an action sequence), which are invoked in the given order. Normally all actions in the sequence are processed, but this can be controlled by setting proceedsequence to FALSE in any of the actions.
actionObject(required)Definition of one particular action
action.idStringNULL Id of the action. The id of actions is used for referencing the generated response objects of particular actions (e.g. in subsequent pluggable actions). Note that the id of the action does not necessarily need to be unique within the actions context. When multiple actions with the same id are invoked, the responses will be merged. When multiple actions with the same id generate response values with the same id, only the response value from the last action will be available.
action.classString(required) Java-class of the implementation of the action. For Pluggable Actions that are part of Portal.Node, the package name com.gentics.portalnode.genericmodules.object.actions may be omitted. Custom pluggable actions have to be defined with the full class name.
action.feedbackStringNULLId of the feedback component, the action may write messages to. When configured, there must be a feedback component in the view that holds this action.
action.pruleStringNULLRule to decide whether the pluggable action has to be invoked or not. When no rule is configured the action is always processed. If this rule does not match onsuccess/onfailure and the *.proceedsequence parameters are ignored and the next action in the sequence will always be executed.
action.parametersContainerNULLContainer for action parameters. Every specific implementation of a pluggable action will required or support a specific set of parameters that can or have to be defined.
action.parameters. parameterObjectNULLParticular parameter setting for the pluggable action. Parameters may be mapped from portal or view properties or may be defined static.
action.parameters. parameter.idString(required)Id (key) of the action-parameter
action.parameters. parameter.mappedStringNULL

Path to the value of the defined parameter. The path must be resolvable in the context of this pluggable action. This may also contain results of previous actions (via .actions.[actionid].*).

This may also be an expression with functions, operations, literals and resolvables. See “ExpressionParser” (Section 10) for further details.

action.parameters. parameter.requiredBooleanFALSEWhether the parameter is required for the action (value may not be empty)
action.onsuccessObjectNULLDefinition of what is to be done in case the action succeeds
action.onsuccess. messageStringNULLMessage to be writted into the feedback component when the action succeeds
action.onsuccess. proceedsequenceBooleanTRUEWhether actions in this sequence shall be proceeded when this action succeeds. When set to FALSE and this action succeeds, no other actions of this sequence are processed. This does NOT affect an eventually configured container in this onsuccess part.
action.onsuccess. actionsContainerNULLAction Container holding an action sequence that shall be processed when this action succeeds.
action.onfailureObjectNULLDefinition of what is to be done in case the action fails.
action.onfailure. messageStringNULLMessage to be writted into the feedback component when the action fails.
action.onfailure. proceedsequenceBooleanTRUEWhether actions in this sequence shall be proceeded when this action fails. When set to FALSE an this action fails, no other actions of this sequence are processed.
action.onfailure. actionsContainerNULLAction Container holding an action sequence that shall be processed when this action fails. This does NOT affect an eventually configured container in this onfailure part.
2.2.8.2.1. ActionContext

Each action has an ActionContext which is used in the following elements, and some specific actions:

  • action.prule

  • action.parameters.parameter.mapped

The ActionContext provides the following Portal Property Paths, see Section 8, “Portal Property Paths” for details.

  • views.*

  • view.*

  • portal.*

  • actions.*

  • data.* base object of context specific additional data, mostly provided by the enclosing component.

  • javax.request.*

2.2.8.3. BinaryCallableActionResponseAction

Returns binary data from a Callable Action.

Table 4.84. Parameters: BinaryCallableActionResponseAction

NameTypeDefaultDescription
dataByteArray or InputStream The data to return in the response
mimetypeStringbinary/octet-streamMimetype of the response.

Table 4.85. Response Objects: BinaryCallableActionResponseAction

NameTypeDescription
responseBinaryThe binary data that will be returned to the client.

Table 4.86. Action: BinaryCallableActionResponseAction - Return Values

TRUEWhen no error occurred.
FALSEIf an error occured.
2.2.8.4. BinaryToTextAction

This action transforms a binary input stream, like the filestream from a fileuploadcomponent, into a reader, using a given character encoding.

If the input data is not set, the output content parameter will also not be set. If the input is already text or a reader, the content is not modified. If an error occurs, an error message is set as feedback message.

Table 4.87. Parameters: BinaryToTextAction

NameTypeDefaultDescription
dataByteArray or InputStream The data to transform
encodingStringISO-8859-1The encoding used to transform the binary content into text. The is equal to the java character encoding names, like UTF-8 or UTF-16.

Table 4.88. Response Objects: BinaryToTextAction

NameTypeDescription
contentReaderThe converted data as text reader, or not set if the input data is not set.

Table 4.89. Action: BinaryToTextAction - Return Values

TRUEon success.
FALSEon error.
2.2.8.5. CheckErrorsAction

Allows you to start errorchecking on a form starting from the component provided via the component-parameter. As errorchecking won't involve nested forms by default you can use the CheckErrorsAction to accomplish this task. The action will return true if everything was fine or false if errors where encountered.

Table 4.90. Parameters: CheckErrorsAction

NameTypeDefaultDescription
componentString(required)

This is the id of the component where errorchecking will be started. All subsequent components will be checked for errors. Note that ids of components which reside inside of nested form components have to be prefixed with the nested form component's id and an underscore. It is possible to use multiple parameters with id component to do errorchecking starting with multiple components.

errors2feedbackBooleanfalse

When this is set to true, eventually found errors will not only be set for the components, but also set as feedback into the feedback component of this action (if any set).

errors2feedbackseparatorString(emptry String)

This parameter defines the separator between multiple component errors, when the errors are set as feedback (if the parameter errors2feedback is set to true).

No Response Objects.

Table 4.91. Action: CheckErrorsAction - Return Values

TRUENo errors encountered while checking components
FALSEComponent errors encountered or configuration error
2.2.8.6. CollectObjectsByRelationAction

Given an object this action follows the relationattribute of this object until it reaches all the leaves. If it did so it will create a collection of all the objects and return this collection.

Table 4.92. Parameters: CollectObjectsByRelationAction

NameTypeDefaultDescription
baseobjectObject(required)Starting Object.
relationattributeString(required)The attribute that describes the relation. This parameter may be given multiple times if more than one relation has to be followed.
includebaseBooleanTrueIf base object needs to be included in the collection as well.
failifemptyBooleanFalseWheter the action fails when the collection is empty.
ruleStringNULLAn additional rule to restrict the returned objects.

Table 4.93. Response Objects: CollectObjectsByRelationAction

NameTypeDescription
objectsList of ObjectsCollected objects as Collection (may be an empty Collection, but never null)
lastobjectObjectThe last object that was collected.

Table 4.94. Action: CollectObjectsByRelationAction - Return Values

TRUEon success.
FALSEon error.
2.2.8.7. CreateResolvablesAction

The CreateResolvablesAction can be used to create Resolvable objects from a given XML source. This XML source has to conform to a specific XML schema. If a WriteableDatasource is given it can be used to create and load objects from this datasource. (E.g. With a CNDatasource given an attribute 'contentid' would load this resolvable from the datasource.)

This can be very handy in combination with a “XSLTRenderAction” (Section 2.2.8.31) so you can transform e.g. a RSS feed into resolvables which are then displayed in a “DatasourceListComponent” (Section 2.2.7.3.1).

Example 4.36. Example XML input.

<?xml version="1.0" encoding="UTF-8"?>
<objects xmlns="http://www.gentics.com/create-resolvables">
  <object>
    <attribute name="title">My Title</attribute>
    <attribute name="description">Some description</attribute>
  </object>
  <object>
    ...
  </object>
</objects>

Table 4.95. Parameters: CreateResolvablesAction

NameTypeDefaultDescription
xmlString(required)

XML source describing the Resolvable objects which should be created.

datasourceStringNULL

This has to be the name for a WriteableDatasource which is used to create the resolvable objects.

Table 4.96. Response Objects: CreateResolvablesAction

NameTypeDescription
resultCollectionThe created Resolvables within a Collection. (Resolvables are either created by the given datasource, or MapResolvable's)

Table 4.97. Action: CreateResolvablesAction - Return Values

TRUEIf resolvables could be created successfully
FALSEOtherwise
2.2.8.8. CSVDataImportAction

This action reads data from a CSV (comma separated values) content and imports it into a contentrepository. A status message is returned as feedback message.

The first non-skipped line in the csv content is interpreted as header, which defines into which attributes the fields are imported. A new import always creates new objects and does not check for duplicate entries.

The import creates a log during the import. It also generates a list of all contentids which are created during the import, including newly created referenced objects. If a line contains invalid data, an error is created and the line is ignored. Even if an error occurs, successfully imported lines are NOT deleted.

2.2.8.8.1. CSV header format

Each column which should be imported must have a header in the following form:

<attributename>[:<foreignObjectNr>][.<referenceAttribute>][|<options>] 
						

Each header starts with the attributename of the attribute of the object matching the field.

There are three types of attributes:

  • Simple attributes like text or numbers do not require additional attributes.

    For binary attributes the option binary can be used. The field value is then interpreted as the filename of the file to import into the attribute. If the input parameter fileprefix is set, each filename is prefixed with the fileprefix.

    If the attribute is a date, the field must contain a timestamp in seconds since January 1, 1970 00:00:00 GMT.

  • References require an additional, dot-separated reference attribute name. This is the attribute name of the referenced object type, by which the referenced object is searched. If the option create is given, a new referenced object is created, if it is not found.

    For example, using the following header

    company.name|create

    the import action will search for companies by name using the values of the column fields and store the reference in the attribute company. If the company is not found, a new company by the given name is created.

  • If the attribute is a foreign link, a reference attribute name and a foreign object number must be given. The object number can be any number and is used to group columns.

    For each distinct object number, a new foreign object is created, if any of the columns in a row contains a value. Each attribute of the foreign object can itself be a simple attribute or a reference.

    For example, the following header

    job:1.name; job:1.category.name; job:2.name; job:2.category.name

    will create up to two foreign objects per row, each with an attribute name and category, which is itself a reference to a category object which is searched by the field name.

2.2.8.8.2. Skip line ranges

One or more ranges of lines can be specified which should be skipped when reading the content. There are three possible ranges:

  • A single line number <nr>

  • A range of lines with lower and upper bound <min>-<max>

  • An upper limit, <max>+

Ranges can be separated by semicolons.

For example, the following line

1;3-5;50+

skips the first line, lines 3 to 5, and all lines after the 50th line, including line 50. Therefore, the second line is interpreted as header, and lines 6 to 49 are imported.

Table 4.98. Parameters: CSVDataImportAction

NameTypeDefaultDescription
csvString or Reader(required)The CSV content to be imported.
objecttypeInteger(required)The object type id of the main objects to import.
delimiterString, 1 character"The text delimiter character.
separatorString, 1 character;The field separator character.
skiplinesString A list of ranges of lines to skip.
fileprefixString A path which is used to prefix binary file names.
loglevelStringinfoThe maximum log message level to include in the response. Possible values are 'error', 'warn' and 'info'.
datasourceString/WriteableDatasource The datasource to use to store objects, either the datasource itself or the id of the datasource. The datasource must be a WriteableDatasource on the contentrepository. If the parameter is not set, the default datasource for the current module is used.

Table 4.99. Response Objects: CSVDataImportAction

NameTypeDescription
createdidsArray of StringAn array of all contentids as Strings which were created during the import, including reference objects.
logmessagesStringThe detailed logmessages of the import as String.

Table 4.100. Action: CSVDataImportAction - Return Values

TRUEOn Success
FALSEIf any input parameter contains invalid data, or an error occured during the import. Modifications done by the import (like the creation of objects) are not reverted if an error occurs.

Example 4.37. Example import data

An example import csv file as well as a view using the pluggable action and a standalone commandline import example can be found in the sdk. For details see the CsvImportExample in the sdk guide.

2.2.8.9. DatasourceAction

The Datasource Action allows storage of objects to a WriteableDatasource and loading from a Datasource. It performs either "insert", "update", "save", "delete", "load" or "create". Where save is a method that will figure out if to insert or update itself, if possible.

Table 4.101. Parameters: DatasourceAction

NameTypeDefaultDescription
operationString(required)

Operation to be performed. One of:

  • update

    Used to update the values of an existing Object. (If object does not exist, it will result in an error)

  • insert

    Inserts a new object and saves it.

  • save

    Saves the object. - If it does not yet exist, an object will be created, otherwise the existing one will be updated.

  • delete

    Deletes the given object.

  • load

    Loads objects. You have to supply either a rule or the primary key as an additional parameter to successfully load an object. See Section 13, “Datasource” for details.

  • create

    Creates a new object but does not immediately save it.

  • clearcache

    Clear caches for the given objects in the datasource. Objects can either be given in parameters "object" or in "contentid" for contentrepository datasources.

datasourceStringdatasource of the portletId of the datasource to use for the action.
objectObjectNULLObject which has to be modified. Can also be a collection of objects. Required for operation "update", "insert", "save" and "delete".
ruleStringNULL Rule to load objects, may be empty to load objects by primary key ( contentid for datasources of type ContentRepository ).
sortbyStringNULLName of the sorted attribute when loading objects by rule. When not set, the objects are not sorted.
sortorderasc or descascSortorder, when objects are loaded by rule and sortby is set as well.
prefillStringNULL Name of an attribute that will be prefilled for objects loaded by rule. Prefilling attributes increases the performance when accessing them later. This parameter can be used multiple times for prefilling more than one attribute. Please note that prefilling attributes will only increase performance when handling large amounts of data. For example: when using prefill to retrieve 10 of the latest news items, you may experience performance drawbacks. On the other hand fetching the whole load of news items from the last two years will be a lot faster.
**NULLAny other request parameters are set to created objects as attributes.

Table 4.102. Response Objects: DatasourceAction

NameTypeDescription
objectsCollection loaded/created objects always as collection (even if no or only one object is returned). Empty collection when no object is returned.
objectObject First (or only) loaded/created object as single Resolvable, NULL when no object is returned

Table 4.103. Action: DatasourceAction - Return Values

TRUEif the action has been performed without errors.
FALSEif an exception was thrown.
2.2.8.10. DownloadAction

The download action can be used to initiate a file download via a DownloadComponent. See Section 2.2.7.3.3, “DownloadComponent” for details.

Table 4.104. Parameters: DownloadAction

NameTypeDefaultDescription
contentString, binary data or Stream{required}The content to download.
contenttypeStringNULLThe contenttype (mimetype) of the content to download.
componentString{required}Id of the DownloadComponent to use
disposition"attachment"|"inline"attachmentType of the download.
filenameStringNULLFilename to use for the download.

No Response Objects.

No Return values.

2.2.8.11. EchoAction

The EchoAction simply prints all its parameters into the logfiles. This can be used during development of pluggable actions for debugging purposes. The log messages are generated with the log-level INFO, but there is no need to reconfigure the logging since the log-level is temporarily set to INFO in the EchoAction which will enforce the output, no matter what loglevel is configured otherwise. The output consists of the name of the parameter, the String representation of its value and the java classname.

Table 4.105. Parameters: EchoAction

NameTypeDefaultDescription
**NULLAll parameters are just printed into the logfiles.

No Response Objects.

Table 4.106. Action: EchoAction - Return Values

TRUEThis Action always returns true
FALSEThis Action never returns false
2.2.8.12. Form2CNObjectAction
[Note]Note

This action is deprecated. The more general Form2ObjecAction ( Section 2.2.8.13, “Form2ObjectAction” ) should be used instead. Remember to correct the parameter from objecttype to obj_type when you upgrade to the new action.

This Action maps the content of a given form to a contentrepository object. the id's of the components must equal the objects attributenames. The form must have a contentid component (usually hidden) to recognize an existing contentobject. Otherwise a new ContentObject will be created.

Table 4.107. Parameters: Form2CNObjectAction

NameTypeDefaultDescription
objecttypeInteger(required)the contentrepository objecttype used for creating the object
datasourceStringportlet's default datasourcethe datasource where the given objecttype is located

Table 4.108. Response Objects: Form2CNObjectAction

NameTypeDescription
objectObjecta new contentrepository object created based on the form content.

Table 4.109. Action: Form2CNObjectAction - Return Values

TRUEon succesfull creation of ContentObject
FALSEon failure (e.g. datasource unavailable, unknown objecttype)
2.2.8.13. Form2ObjectAction

Action to transform the content of a view into an object for further processing like saving.

It takes a form and maps it to an object according to the given set of instructions. The created object will either be instanciated from the given objectclass or will be created from the given datasource, which must be a WriteableDatasource. One of them is required.

Depending on the type of created object, some additional parameters might be needed. When the object shall be created for a datasource of type contentrepository, the obj_type must be given to specify the object type, otherwise the creation would fail. Additionally if the object is created for an existing object in the repository, the contentid has to be provided, which is typically be done with a hidden component in the form.

Table 4.110. Parameters: Form2ObjectAction

NameTypeDefaultDescription
objectclassStringNULLClass the new object is instanciated from. The class has to implement Changeable and has to have a default Constructor.
datasourceStringDatasource of the portlet.Datasource for which the object shall be created (if no objectclass is given).
viewStringthe current viewId of the view which shall be filled into the object. This may also be the id of a NestedFormComponent in the form [viewid].[nestedformcomponentid]
**NULLAny other request object is set to the created object as attribute.
obj_typeStringrequired (ContentRepository objects only)The TypeId of the object to create.

Table 4.111. Response Objects: Form2ObjectAction

NameTypeDescription
objectObjectThe created object filled with the additional action parameters and the content from the view components.

Table 4.112. Action: Form2ObjectAction - Return Values

TRUEIf the object could be created and filled.
FALSEIf an Exception occurred during creation or filling.
2.2.8.14. GeneralViewAction

The GeneralViewAction can be used to perform several tasks on views or on the portal itself: It can clear a view, switch to another view and set view or portal properties.

Table 4.113. Parameters: GeneralViewAction

NameTypeDefaultDescription
clearview (multiple)StringNULL

Id of the view to be cleared. This may also be the id of a NestedFormComponent in the form. The full path notation provides the parameter module to specify a ViewPortlet. This is useful if you want to clear Views in other portlets. Wildcards are also possible. The calling ViewPortlet is that ViewPortlet that contains the View with the GeneralViewAction that invokes clearview. The short notation will only invoke clearview on the Views of the calling ViewPortlet

Syntax for the notation. The round brackets include an optional extension of the notation:

(portal.modules.[moduleid].plugins.viewplugin.views.)[viewid][*].[nestedformcomponentid][*] .
showviewStringNULLId of the view to be shown next. This may also be the id of a NestedFormComponent in the form [viewid].[nestedformcomponentid] .
hideview (multiple)StringNULLId of the NestedFormComponent to hide. Must be of the form [viewid].[nestedformcomponentid] .
set (multiple)StringNULL

Set command for modification of a property. See Section 7, “Property Setters” for details. If you want to modify eg. a text component's contents you can use it's data property to add your custom text: view.components.[componentid].data = "my custom text"

It is possible to resolve variables before the set is actually executed by using the syntax ${resolvable.path}. See Example 4.38, “GeneralViewAction Usage Example”. Using this syntax it is possible to resolve all properties from within the “ActionContext” (Section 2.2.8.2.1).

No Response Objects.

No Return values.

[Note]Note

Please pay special attention to the fact that action parameters are not bound to be processed as listed. In fact if you use two "set" parameters where the second depends on the first you have to use two General View Actions to maintain correct execution sequence.

Example 4.38. GeneralViewAction Usage Example

<action class="GeneralViewAction">
  <parameters>
    <parameter id="clearview">editview</parameter>
    <parameter id="showview">editview</parameter>
    <!-- Setting a static value -->
    <parameter id="set">views.editview.components.textfield.data =
          "Some static value"</parameter>
    
    <!-- Setting a variable value -->
    <parameter id="set">views.editview.components.textfield.data =
          portal.vars.now</parameter>
    
    <!-- Use some crazy way to set portal.vars.now 
                                  (containing the current date) -->
    <parameter id="set">views.editview.components.textfield.data =
          "now"</parameter>
    <!-- the textfield now contains the string 'now' so use 
                                this to resolve portal.vars.now -->
    <parameter id="set">views.editview.components.textfield.data =
          portal.vars.${views.editview.components.textfield.data}
    </parameter>

    <!-- 
         The above example is of course only for demonstration,
         in reality it is
         1.) completely useless and
         2.) not guaranteed to work because the order in which
             'set' commands are executed is undefined.
    -->

  </parameters>
</action>
						
2.2.8.15. ImpEncapsulateAction

This action can be used to call Imp methods as action. See Section 1, “Imps” for information about IMPs.

Table 4.114. Parameters: ImpEncapsulateAction

NameTypeDefaultDescription
impString(required)Id of the IMP to be used. - Can also be a direct reference to an Imp you've obtained through #getImp or #returnImp
methodString(required)Name of the method to call from the Imp. See the Documentation of the Imp you are calling for a description of methods.

There are two special methods #getImp and #returnImp - If you want to use an Imp which is not stateless and you need to call several methods on the same Imp instance you can use #getImp to get an imp (returned in the response object as 'imp') and #returnImp to return it (you always need to call #returnImp when you are done using an imp you obtained with #getImp).

param1 (param2,param3,..)Object (depending on imp method)NULLDepending on the imp method you want to invoke the number of param1 (param2,param3) and the type may differ.
paramCountInteger(optional)If you want to pass null values as parameters, you can set this to the number of parameters the method you want to call has. Otherwise all param1,2,3,.. values will be taken until the first null value.

Table 4.115. Response Objects: ImpEncapsulateAction

NameTypeDescription
resultObjectThe result returned by the invoked method.

Table 4.116. Action: ImpEncapsulateAction - Return Values

TRUEIf the method was invoked successfully
FALSEIf an error occured (e.g. an exception when invoking the method, or if the parameters couldn't be converted.

Example 4.39. Example Usage of ImpEncapsulateAction

<action class="ImpEncapsulateAction" id="regexpexample">
  <parameters>
    <parameter id="imp">string</parameter>
    <parameter id="method">regexp</parameter>
    <parameter id="param1">Hello Regexp</parameter>
    <parameter id="param2">Reg.*</parameter>
    <parameter id="param3">World</parameter>
  </parameters>
</action>

The above example uses the Section 1.5, “String Formatter” to rewrite the input 'Hello Regexp'. You can afterwards access the value of the action through actions.regexpexample.result within following action.

2.2.8.16. JsonCallableActionResponseAction

Returns JSON code from a Callable Action.

Table 4.117. Parameters: JsonCallableActionResponseAction

NameTypeDefaultDescription
*ObjectNULLThe content that should be returned to the client. The data is encoded as JSON.

Table 4.118. Response Objects: JsonCallableActionResponseAction

NameTypeDescription
responseStringThe JSON code that will be returned to the client.

Table 4.119. Action: JsonCallableActionResponseAction - Return Values

TRUEWhen no error occurred.
FALSEIf an error occured.
2.2.8.17. Object2FormAction

This Action will take a Resolvable Object and transfer it to the fiels of a form according to given set of instructions.

Table 4.120. Parameters: Object2FormAction

NameTypeDefaultDescription
objectObject(required)Object that will be displayed in the Form.
viewString(required)Id of the view that will be filled with data of the object. This may also be the id of a NestedFormComponent in the form [viewid].[nestedformcomponentid] .
activateviewBooleanfalseIf set to true the view will be activated after values have been successfully set.
clearviewBooleanfalseIf set to true the view will be cleared before values are filled.

No Response Objects.

Table 4.121. Action: Object2FormAction - Return Values

TRUEIf transfer worked.
FALSEIf an exception was thrown.
2.2.8.18. PDF2TextAction

Extracts the text content from PDF documents.

Table 4.122. Parameters: PDF2TextAction

NameTypeDefaultDescription
pdfInputStream or String(required)PDF document to be converted into a String.
maxpdffilesizeInteger10 MB Maximum allowed filesize of the PDF document in bytes. Note that this limit is not effective if it is larger than the overall upload limit for the portal.

Table 4.123. Response Objects: PDF2TextAction

NameTypeDescription
contentStringText that was extracted from the given PDF document.

Table 4.124. Action: PDF2TextAction - Return Values

TRUEWhen no error occurred.
FALSEWhen the pdf could not be converted to text.
2.2.8.19. PlainCallableActionResponseAction

Returns plain text from a Callable Action.

Table 4.125. Parameters: PlainCallableActionResponseAction

NameTypeDefaultDescription
*StringNULLThe content that should be returned to the client. If more that one parameter is specified, the contents of all parameters are simply concatenated.

Table 4.126. Response Objects: PlainCallableActionResponseAction

NameTypeDescription
responseStringText that will be returned to the client.

Table 4.127. Action: PlainCallableActionResponseAction - Return Values

TRUEWhen no error occurred.
FALSEIf an error occured.
2.2.8.20. RenderTemplateAction

Renders the given template source. Returns the render result and all objects in the template context after the template was rendered. This provides the possibility to generate objects in the template that can be used later. You can also use the RenderTemplateAction for scripting which may come in handy.

Table 4.128. Parameters: RenderTemplateAction

NameTypeDefaultDescription
templateString(required)Source of the template to be rendered. See Section 11.4, “TemplateEngine2” .
scriptEngineString(optional)Scriptengine to use. Options are "Velocity" or "JavaScript". Defaults to Velocity when undefined. The JSR-233 compliant JavaScript Engine requires Sun JDK 1.6 or higher. There is a Programmer's Guide as well.
**NULLAny other request object is provided in the template/script context under its name.

Table 4.129. Response Objects: RenderTemplateAction

NameTypeDescription
templateStringResult of the rendered Template.
**All objects from the template context. This also includes objects that were created during processing of the template.

Table 4.130. Action: RenderTemplateAction - Return Values

TRUEWhen no error occurred.
FALSEIf there was an error rendering the template.
2.2.8.21. Resolvable2MapAction

Resolves all specified paths for the given object into a map. Returns the generated map as result.

Table 4.131. Parameters: Resolvable2MapAction

NameTypeDefaultDescription
objectObject(required)The object from which the attributes shall be resolved.
attributeString  The name of the attribute that should be resolved from the object.

Table 4.132. Response Objects: Resolvable2MapAction

NameTypeDescription
resultMapThe map containing all resolved attributes.

Table 4.133. Action: Resolvable2MapAction - Return Values

TRUEWhen no error occurred.
FALSEIf an error occured.
2.2.8.22. RuleSearchAction

The RuleSearchAction restricts the objects shown in a DatasourceListComponent by setting the configured rule. When called the action will set the given searchrule for the DatasourceListComponent of the searchview. The searchrule will resolve the baseobject "data." to all additional request parameters given to the action. The values can be included directly (data.[name]) or converted into a search pattern for comparisons with LIKE (data.[name]_pattern). Finally the searchview is activated.

Table 4.134. Parameters: RuleSearchAction

NameTypeDefaultDescription
searchviewString(required)Id of the view holding a datasourcelistcomponent
componentStringNULLId of the datasourcelistcomponent in the searchview that will show the search results.
searchruleString(required)Rule that will be set as filterrule for the datasourcelistcomponent of the searchview.
**NULLany other request object can be used inside the searchrule as data.[parameterid] or data.[parameterid]_pattern

No Response Objects.

Table 4.135. Action: RuleSearchAction - Return Values

TRUEon success.
FALSEon error.
2.2.8.23. ScriptingAction

This Action is an alias for the Section 2.2.8.20, “RenderTemplateAction” . It can be used to execute scripting code and return created variables as well.

2.2.8.24. SendMailAction

The SendMailAction is used to send emails.

[Note]Note
All e-Mail adresses have to be formatted following the specification RFC 822 (see http://www.ietf.org/rfc/rfc822.txt).

Table 4.136. Parameters: SendMailAction

NameTypeDefaultDescription
mailhostString(required)Mail Host to be used to send mails.
toString, Object or List of Objects(required)Recipients of the mail.
toemailStringNULLName of the attribute holding the email address, when to is given as Object(s).
ccStringNULLCC of the mail.
bccStringNULLBBC of the mail.
fromString(required)Sender of the mail
subjectString(required)Subject of the mail. This may be a template and may contain all given action parameters under their respective names. See Section 11.4, “TemplateEngine2”
bodyString(required)Mail body. This may be a template and may contain all given action parameters under their respective names. See Section 11.4, “TemplateEngine2”
**NULLAny additional parameters are provided to the template contexts for subject and body.

No Response Objects.

Table 4.137. Action: SendMailAction - Return Values

TRUEon success
FALSEon error
[Tip]Tip

You can use Portal Properties (see Section 8.2.21, “Portal Properties” ) to configure properties like mailhost which are unlikely to differ among various SendMailActions.

2.2.8.25. SendRedirectAction

Sends a HTTP Redirect response to the client. (Can only be used for absolute URLs). Make sure you execute this action before the rendering starts, e.g. putting this action in the onview-section of a view will cause an error.

Table 4.138. Parameters: SendRedirectAction

NameTypeDefaultDescription
urlString(required)Absolute URL to redirect to.

No Response Objects.

Table 4.139. Action: SendRedirectAction - Return Values

TRUEIf redirect was set successfully.
FALSEOn Error.
2.2.8.26. StoreFileAction

Stores binary or String data into a file.

Table 4.140. Parameters: StoreFileAction

NameTypeDefaultDescription
contentStream, byte array or String(required)Content to store into the file.
filenameString(required)Name of the created file.
temporaryBooleanfalse Whether the file shall be a temporary file or not. Temporary files will internally get new filenames and will never overwrite existing files.
directoryString Session temporary path (or ${java.io.tmpdir} if not called within a portal session). Absolute path of the directory where to store the file.

Table 4.141. Response Objects: StoreFileAction

NameTypeDescription
filepathStringAbsolute path of the stored file.
fileinformationObject

FileInformation object holding additional data of the stored file. This object can be passed to a “FileUploadComponent” (Section 2.2.7.2.6) to provide download links for the stored file.

The FileInformation object has the following properties

  • fileSize: size of the file
  • contentType: content type (mime-type). e.g. image/gif, ...
  • fileName: name of the file (without path information)
  • filePath: absolute path of the file
  • inputStream: stream to load the data from the file

Table 4.142. Action: StoreFileAction - Return Values

TRUEWhen the file was successfully stored
FALSEOn error
2.2.8.27. TextDiffAction

Generates a word-based diff between two strings. All templates for rendering modifications support the following template variables:

  • $add: added content

  • $addsource: source code of the added content (special characters are html encoded)

  • $remove: removed content

  • $removesource: source code of the removed content (special characters are html encoded)

  • $before: content before the modification

  • $after: content after the modification

Table 4.143. Parameters: TextDiffAction

NameTypeDefaultDescription
text1String(required)Original version of the string.
text2String(required)Modified version of the string.
addtemplateString<ins class="diff">$add</ins>Template for rendering add text parts.
removetemplateString<del class="diff">$remove</del>Template for rendering removed text parts.
changetemplateString<del class="diff modified">$remove</del><ins class="diff modified">$add</ins>Template for rendering modified text parts.
showhtmlBooleanFALSEWhether to show html tags in the diff. When set to TRUE, the rendered output will show the html source code.
ignoreregexStringNULLRegular expression of text parts that shall be ignored when diffing (e.g. timestamps, ...).
wordsbeforeInteger10Number of words before a modified text part to be contained in the template variable $before.
wordsafterInteger10Number of words after a modified text part to be contained in the template variable $before.

Table 4.144. Response Objects: TextDiffAction

NameTypeDescription
diffStringRendered diff between the given contents.

Table 4.145. Action: TextDiffAction - Return Values

TRUEWhen the diff was successfully generated
FALSEOn error
2.2.8.28. TriggerEventAction

The TriggerEventAction triggers an event that can be caught in the module using the views. All configured parameters are set as event properties and can be used in the module.

Table 4.146. Parameters: TriggerEventAction

NameTypeDefaultDescription
eventString(required)

command of the event to be triggered. This will trigger the event portal.modules.[pnodeid].plugins.viewplugin.[event], where [pnodeid] is the id of the portlet's pnode and [event] is the event's name configured here.

**NULLAny additional parameters are set as event properties.

No Response Objects.

No Return values.

2.2.8.29. TriggerPortalEventAction

The TriggerPortalEventAction is an alternative of the TriggerEventAction, which allows full control of the event path.

Table 4.147. Parameters: TriggerPortalEventAction

NameTypeDefaultDescription
pathString(required)

Full path of the triggered event.

**NULLAny additional parameters are set as event properties.

No Response Objects.

No Return values.

2.2.8.30. URLLoaderAction

The URLLoaderAction loads a file from the given url. URL can be a file:///, http://, https:// or anything else supported by java. See the javadoc for the class URLConnection for more information.

Table 4.148. Parameters: URLLoaderAction

NameTypeDefaultDescription
urlString(required)The URL to be used to download the file.
methodStringGET(Only for HTTP URLs) Method to be used in the request (GET,POST,HEADER,etc.)
timeoutInteger10After how many seconds the action should give up trying to connect to the given URL.
readTimeoutInteger10After how many seconds the action should give up on downloading from the given URL.
postparametersString(not set)(Only for HTTP URLs) The POST parameters sent in the body of an HTTP request. (e.g.: key1=value1&key2=value2)
encodingStringDefault System Encoding or Content-Type when loading from HTTPCan be either any encoding supported by Java (e.g. UTF-8) or "binary" - if it is "binary" the response object "content" will contain a byte array instead of a String
headersCollection (String) or Map (String, String)(not set)Additional headers that will be sent with the request. Unless a Map (String, String) is specified, each entry must contain the name and value of the header, delimited by a colon (e.g. "x-device-type: Blackberry 9000").

Table 4.149. Response Objects: URLLoaderAction

NameTypeDescription
contentString or byte[]The content fetched from the URL - depending on 'encoding' either String or byte[] (for binary)
sizeIntegerSize of the content in characters
headersMap (String, Collection (String))(Only for HTTP URLs) The header properties of the response.
filenameString Name of the loaded file (either from the response header Content-Disposition or guessed from the URL).
contenttypeString Content type (mime-type) of the loader file (either from the response or guessed from the file name).

Table 4.150. Action: URLLoaderAction - Return Values

TRUEon success
FALSEon error (invalid URL syntax, timeout, etc.)
2.2.8.31. XSLTRenderAction

Transforms a given XML source string using a given XSLT.

Table 4.151. Parameters: XSLTRenderAction

NameTypeDefaultDescription
xmlsourceString(required)The XML source to be transformed using XSLT.
xsltString(required)XSLT used to transform the XML source string.

Table 4.152. Response Objects: XSLTRenderAction

NameTypeDescription
sizeIntegerSize of the transformed content string.
contentStringTransformed content.

Table 4.153. Action: XSLTRenderAction - Return Values

TRUEOn Success
FALSEOn Error (e.g. invalid XML/XSL syntax)

2.2.9. Callable Actions

2.2.9.1. Introduction

Callable Actions are actions that can be triggered by client AJAX requests. Each Callable Action can contain multiple Pluggable Actions (see Section 2.2.8, “Pluggable Actions”), which are used to perform the desired actions. By using specialized Pluggable Actions, namely the PlainCallableActionResponseAction (see Section 2.2.8.19, “PlainCallableActionResponseAction”) and the JsonCallableActionResponseAction (see Section 2.2.8.16, “JsonCallableActionResponseAction”), the response to the client is constructed.

<callableactions>
	<callableaction id="">
		<actions>
			...
		</actions>
	</callableaction>
</callableactions>
					
2.2.9.2. Template Variables

Callable Actions are accessible in view and component templates using $form.callableactions.[actionid]. The URL string of the Callable Action is provided as $form.callableactions.[actionid].url. You may prefer using a ResourceURL as object, which can be generated by using $form.callableactions.[actionid].resourceUrl. With the resourceurl object, it is possible to add additional parameters to the URL.

2.2.9.3. Input Parameters

Any URL parameters passed to the Callable Action are available as javax.portlet.request.parameters.* to the defined Pluggable Actions. Please note that since a URL parameter can have multiple values, the values have to be treated as arrays.