Portlet Page Editor Tags for Adaptive Layout
Tag portletjs


Generates the javascript functions required for portlet preview and invitation. These tags are only available on the Portlet Selection layout, which applies to the DHTML flyout for adding portlets to a page.

Example:
<pt:portletpageeditor.portletjs pt:add='addPortlet' pt:remove='removePortlet' pt:preview='previewPortlet' pt:invitation='invite'/>


Tag Information
Tag Nameportletjs

Attributes
NameTypeRequiredDefault ValueDescription
addstringfalseN/AUsed to insert a javascript function to add a portlet to the page. If this attribute is not present, the javascript will not be displayed. The value of this attribute will be the name of the javascript function. The function has one argument: portlet ID. In order to change the state of a portlet from added to removed and vice-versa, the portlet div needs to have the current type in the class attribute (i.e. ali-edit-portlets-narrow) and the other type in the swapclass attribute (i.e. ali-edit-portlets-chosen). The add and remove portlet links both need to be displayed on the page with the style attribute being 'display:none;' or 'display:visible;', depending on which link is supposed to be shown. The preview portlet link needs to have an onpage attribute with a value of 'true' or 'false' depending on whether or not the portlet is on the page. The portlet div and add and remove portlet links and preview portlet link all need to have ids of 'portletxx', 'add-portletxx', 'remove-portletxx', and 'preview-portletxx' where 'xx' is the id of the portlet.
removestringfalseN/AUsed to insert a javascript function to remove a portlet from the page. If this attribute is not present, the javascript will not be displayed. The value of this attribute will be the name of the javascript function. The function has one argument: portlet ID. In order to change the state of a portlet from added to removed and vice-versa, the portlet div needs to have the current type in the class attribute (i.e. ali-edit-portlets-narrow) and the other type in the swapclass attribute (i.e. ali-edit-portlets-chosen). The add and remove portlet links both need to be displayed on the page with the style attribute being 'display:none;' or 'display:visible;', depending on which link is supposed to be shown. The preview portlet link needs to have an onpage attribute with a value of 'true' or 'false' depending on whether or not the portlet is on the page. The portlet div and add and remove portlet links and preview portlet link all need to have ids of 'portletxx', 'add-portletxx', 'remove-portletxx', and 'preview-portletxx' where 'xx' is the id of the portlet.
previewstringfalseN/AUsed to insert a javascript function to preview a portlet. If this attribute is not present, the javascript will not be displayed. The value of this attribute will be the name of the javascript function. The function has three arguments: portlet ID, portlet type (narrow and wide), and whether or not the portlet is on the page (i.e. this.attributes.onpage.nodeValue).
invitationstringfalseN/AUsed to insert a javascript function to display a popup with an invitation link to the portlet. If this attribute is not present, the javascript will not be displayed. The value of this attribute will be the name of the javascript function. The function has one argument: portlet invitation ID.
addbundlestringfalseN/AUsed to insert a javascript function to add a portlet bundle to the page. If this attribute is not present, the javascript will not be displayed. The value of this attribute will be the name of the javascript function. The function has one argument: portlet bundle ID.
openbundlestringfalseN/AUsed to insert a javascript function to display a popup to open a portlet bundle. If this attribute is not present, the javascript will not be displayed. The value of this attribute will be the name of the javascript function. The function has one argument: portlet bundle ID.
orderbypropstringfalseN/AUsed to insert a javascript function to send a request tosort portlets by a specific property. If this attribute is not present, the javascript will not be displayed. The value of this attribute will be the name of the javascript function. The function has one argument: property ID.
renamehandlerstringfalseN/AUsed to insert a javascript function with flyout specific handling of page rename.
flyoutIDstringtruenullSpecifies the ID of the div that will have the flyout effect.


Copyright 2005 Plumtree Software, Inc.