+

Search Tips   |   Advanced Search


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

Appending remote actions to a URL is not supported with the JSR 286 Web Content Viewer.


Remote action types

A remote action is triggered using the query string parameter ?wcmAuthoringAction=action, where action is one of the following:

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

new

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

  • ?wcmAuthoringAction=new&type=com.ibm.workplace.wcm.api.WCM_Content

The following type parameters can be used:

  • com.ibm.workplace.wcm.api.WCM_AuthoringTemplate

  • com.ibm.workplace.wcm.api.WCM_Category

  • com.ibm.workplace.wcm.api.WCM_Content

  • com.ibm.workplace.wcm.api.WCM_DateComponent

  • com.ibm.workplace.wcm.api.WCM_FileComponent

  • com.ibm.workplace.wcm.api.WCM_HTMLComponent

  • com.ibm.workplace.wcm.api.WCM_ImageComponent

  • com.ibm.workplace.wcm.api.WCM_NumericComponent

  • com.ibm.workplace.wcm.api.WCM_PresentationTemplate

  • com.ibm.workplace.wcm.api.WCM_RichTextComponent

  • com.ibm.workplace.wcm.api.WCM_ShortTextComponent

  • com.ibm.workplace.wcm.api.WCM_Site

  • com.ibm.workplace.wcm.api.WCM_SiteArea

  • com.ibm.workplace.wcm.api.WCM_Taxonomy

  • com.ibm.workplace.wcm.api.WCM_TextComponent

  • com.ibm.workplace.wcm.api.WCM_Workflow

  • com.ibm.workplace.wcm.api.WCM_WorkflowStage

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:

  • ?wcmAuthoringAction=new&type=com.ibm.workplace.wcm.api.WCM_Content&atid=com.ibm.workplace.wcm.api.WCM_AuthoringTemplate/ID1

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:

  • ?wcmAuthoringAction=new&type=com.ibm.workplace.wcm.api.WCM_Content&pid=com.ibm.workplace.wcm.api.WCM_SiteArea/ID

  • ?wcmAuthoringAction=new&type=com.ibm.workplace.wcm.api.WCM_SiteArea&pid=com.ibm.workplace.wcm.api.WCM_Site/ID

  • ?wcmAuthoringAction=new&type=com.ibm.workplace.wcm.api.WCM_Category&pid=com.ibm.workplace.wcm.api.WCM_Taxonomy/ID

When creating site areas you can specify the position of the new site area using an &position parameter.

You can specify to save the new site area at the start or end relative to any existing site areas. If not specified, the new site area will be saved at the start relative to any existing site areas:

  • ?wcmAuthoringAction=new&type=com.ibm.workplace.wcm.api.WCM_SiteArea&position=start

  • ?wcmAuthoringAction=new&type=com.ibm.workplace.wcm.api.WCM_SiteArea&position=end

delete

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

  • ?wcmAuthoringAction=delete&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1

You can also use the following parameters when deleting:

  • ?isdraft=true

    This will indicate that you are deleting the draft of an item.

edit

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

  • ?wcmAuthoringAction=edit&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1

You can also use the following parameters when editing:

  • ?isdraft=true

    This will indicate that you are editing the draft of an item.

read

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

  • ?wcmAuthoringAction=read&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1

You can also use the following parameters when opening an item in read-only mode:

  • ?isdraft=true

    This will indicate that you are opening the draft of an item in read-only mode.

openmainview

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

  • ?wcmAuthoringAction=openmainview&view=contentbysitearea

The following view parameters can be used:

  • contentbysitearea

  • contentbytitle

  • myrecent

  • mydraft

  • mypendingapproval

  • mypublished

  • myexpired

  • mydeleted

  • alldraftitems

  • allexpireditems

  • allpublisheditems

  • alldeleteditems

  • componentsbytype

move

This is used to move a site area or content item.

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

  • ?wcmAuthoringAction=move&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1

A move direction is specified as "1" for up and "-1" for down.

For example, to move a content item up one position:

  • ?wcmAuthoringAction=move&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1&pid=com.ibm.workplace.wcm.api.WCM_SiteArea/ID1&moveDirection=1

link

This will link a content item to a site area.

For example:

  • ?wcmAuthoringAction=link&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1&pid=com.ibm.workplace.wcm.api.WCM_SiteArea/ID2

copy

This is used to make a copy of an item.

For example, to copy a content item to a new site area:

  • ?wcmAuthoringAction=copy&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1&pid=com.ibm.workplace.wcm.api.WCM_SiteArea/ID2

You can use the following additional parameters when copying:

  • ?copyAsDraft=true

    This will restart the workflow of the copy being creating. In most cases this would result in the copy being created with a status of draft.

  • ?wid=workflowname

    Use this to specify a different workflow to use when creating the copy. This will also restart the workflow of the copy being creating. In most cases this would result in the copy being created with a status of draft.

  • ?position=start

    This will create the copy as the first item under the specified parent item. If not specified the item will be copied as the last child of the specified parent item.

approve

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

  • ?wcmAuthoringAction=approve&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1

You can also use the following parameters when approving:

  • ?isdraft=true

    This will indicate that you are approving the draft of an item within a workflow.

decline

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

  • ?wcmAuthoringAction=decline&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1

viewversions

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

  • ?wcmAuthoringAction=viewversions&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1

viewhistory

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

  • ?wcmAuthoringAction=viewhistory&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1


Populating fields when creating or editing content

When using the "new" or "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 when creating or editing content:

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 12: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, 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:

&wcmfield.element.[elementname].useReferenceLinkText=true

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

&wcmfield.element.[elementname].linkImage=imagecomponentID

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

&wcmfield.element.[elementname].linkText=text

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

&wcmfield.element.[elementname].linkDescription=text

Specifying a link target, add this to the URL:

&wcmfield.element.[elementname].linkTarget=

  • _blank

  • _parent

  • _self

  • _top

  • targetname


Save actions

autoSave

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

  • &wcmfield.autosave=true

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:

  • &wcmfield.saveValidate=false


Add comments to the item history

You can add a comment to the item history by adding &comment=comment to the URL.

For example:

http://<host>/wps/myportal/wcmAuthoring?wcmAuthoringAction=edit&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1&createDraft=true&comment=comment


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

To edit a content item and create a draft on the edit and set the history log comment: http://<host>/wps/myportal/wcmAuthoring?wcmAuthoringAction=edit&docid=com.ibm.workplace.wcm.api.WCM_Content/ID1&createDraft=true&comment=comment


Parent topic:

Extending Web Content Management


Related concepts


Custom authoring interfaces
Creating a custom launch page