WebSphere Portal, Express Beta Version 6.1
Operating systems: i5/OS, Linux,Windows


 

Using remote actions

Remote actions are used in the query string of a URL to trigger actions from the IBM® Lotus Web Content Management™ application.

Remote actions are appended to the URL of an authoring portlet. For example:
http://[host]/wps/myportal/wcmAuthoring?wcmAuthoringAction=action
You can also append remote actions to the URL of a local Web Content Viewer portlet. This can be useful in sites that feature inline editing of content items.

 

Remote action types

A remote action is triggered using the query string parameter ?wcmAuthoringAction=action, where action is one of the following:Note: Each document can be identified by a DocumentId. The "docid" can be retrieved using the Web content API. In the following examples, the value of the "docid" parameter should be the DocumentId as retrieved by using the API. A document ID consists of a document type and a unique ID. The "docid" values provided in the examples are placeholders for real document IDs. For example, com.ibm.workplace.wcm.api.WCM_Content/ID1

approve

Used to approve an item in a workflow. You must also specify the "docid" of the item.For example:

decline

Used to decline an item in a workflow. You must also specify the "docid" of the item.For example:

delete

Used to delete an item. You must also specify the "docid" of the item.For example:

edit

Used to open an item form in edit mode. You must also specify the "docid" of the item.For example:

read

Used to open an item form in read-only mode. You must also specify the "docid" of the item.For example:

openmainview

Used to open a view within an authoring portlet. You must also specify a "view" parameter.For example:

The following view parameters can be used:

new

Used to open new item form. You must also specify a "type" parameter.For example:

The following type parameters can be used:

When creating a new content item, you can specify a default authoring template by providing the document ID of the authoring template in the "atid" parameter:

When creating site areas, content items and categories, you can specify the document ID of the parent item to save the new item under. Specify this ID in the "pid" parameter:

move

Used to move a site area or content item. For example, to open the move dialog for a content item or site area:

A move direction is specified as "1" for up and "-1" for down. For example, to move a content item up one position:

viewversions

Used to open the versions dialog for an item. You must also specify the "docid" of the item.For example:

viewhistory

Used to open the history dialog for an item. You must also specify the "docid" of the item.For example:

 

Populating fields during content creation

When using the new and edit parameters with content items, you can also add data to different fields in the content item using a URL.

For example, to add "newcontent" as the name of the content item, you would use this URL:

The following parameters can be used to populate fields during content creation:

When populating fields that can include more than one value (authors, owners, categories, keywords) you can specify multiple values:

When populating fields with user ids your must use this format:

When populating date fields, the date format must be US English. Either a date and time, or just a date can be specified. If only a date is specified, the time used will be 00:00:00 AM. For example:

The date and time set here are based on the server's timezone, not the timezone of the user's computer. When populating a JSP element, you need to specify the path to the JSP file:

When populating a component reference element, you specify the component to reference. For example:

When populating an option selection element, you specify each selection option. For example:

When populating a user selection element, you specify each user. For example:

When populating a Link element, you can specify the following parameters:

Adding a link to a content item:

&wcmfield.element.[elementname].type=content&wcmfield.element.[elementname].id=contentID

Adding a link to a link component:

&wcmfield.element.[elementname].type=link&wcmfield.element.[elementname].id=linkcomponentID

Adding a link to an image or file resource component:

&wcmfield.element.[elementname].type=resource&wcmfield.element.[elementname].id=componentID

Adding a link to a URL:

&wcmfield.element.[elementname].type=external&wcmfield.element.[elementname].externalReference=myurl

To specify whether to use the name of the item you are linking to as the link text, add this to the URL:

&useReferenceLinkText=true

Specifying an image to display as the link, add this to the URL:

&linkImage=imagecomponentID

Specifying the text of the link, add this to the URL:

&linkText=text

Specifying the description of the link, add this to the URL:

&linkDescription=text

Specifying a link target, add this to the URL:

&linkTarget=

 

Save actions

autoSave

This is used to save a controllable. This happens in the background and is not displayed to users.For example:

saveValidate

This parameter determines if warning and error messages resulting from the autosave will be displayed to the user. If set to "true", warning and error messages will be displayed to the user. If set to false, messages are suppressed. The default is true.For example:

 

Examples

Open the versions view for an item: http://<host>/wps/myportal/wcmAuthoring?wcmAuthoringAction=viewversions&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1

Open the history view for an item: http://<host>/wps/myportal/wcmAuthoring?wcmAuthoringAction=viewhistory&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1

Open a content item in read mode: http://<host>/wps/myportal/wcmAuthoring?wcmAuthoringAction=read&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1

Open a content item in edit mode: http://<host>/wps/myportal/wcmAuthoring?wcmAuthoringAction=edit&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1

Move a content item up: http://<host>/wps/myportal/wcmAuthoring?wcmAuthoringAction=move&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1&moveDirection=1&pid=com.ibm.workplace.wcm.api.WCM_SiteArea/ID1

Move a site area down: http://<host>/wps/myportal/wcmAuthoring?wcmAuthoringAction=move&docid=com.ibm.workplace.wcm.api.WCM_SiteArea/ID1&moveDirection=-1&pid=com.ibm.workplace.wcm.api.WCM_SiteArea/ID1

Create a new content item with title of 'newcontent': http://<host>/wps/myportal/wcmAuthoring?wcmAuthoringAction=new&type=com.ibm.workplace.wcm.api.WCM_Content&wcmfield.content.title=newcontent

To open a content item in edit mode and automatically change keywords: http://<host>/wps/myportal/wcmAuthoring?wcmAuthoringAction=edit&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1&wcmfield.content.keywords=keyword1&wcmfield.content.keywords=keyword2

To edit a content item, automatically change the keywords and use autosave to automatically save the content (no dialog opens): http://<host>/wps/myportal/wcmAuthoring?wcmAuthoringAction=edit&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1&wcmfield.content.keywords=keyword1&wcmfield.content.keywords=keyword2&wcmfield.autosave=true

To edit a content item, automatically save the item and prevent any validation exception from being displayed, use autosave with saveValidate=false: http://<host>/wps/myportal/wcmAuthoring?wcmAuthoringAction=edit&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1&wcmfield.content.keywords=keyword1&wcmfield.autosave=true&wcmfield.saveValidate=false

To create content item, set the name and use autosave to automatically save the content (no dialog opens). The authoring template used by the content item must have a workflow pre-selected: http://<host>/wps/myportal/wcmAuthoring?wcmAuthoringAction=new&type=com.ibm.workplace.wcm.api.WCM_Content&atid=com.aptrix.pluto.presentation.Template/ID1&pid=com.ibm.workplace.wcm.api.WCM_SiteArea/ID2&wcmfield.content.name=newcontent&wcmfield.autosave=true&wcmfield.saveValidate=true

Parent topic: Extending Web Content Management
Library | Support | Terms of use |