Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 912

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
ColdFusion Portlets
Portlet modes
Portal servers typically allow three portlet modes: View, Edit, and Help.
The View mode is the default state when rendering a portlet. The portlet window has links in the title bar that enable
you to change the mode to Help or Edit.
To add a Help mode view, add the
To support the edit mode create the
More Help topics
"Common methods used in
Portlet window states
Most portal servers support three window states (normal, minimized, and maximized). You can obtain the current
window state by calling the
getWindowState()
Portlet title
To set the portlet title, add a method to the CFC called
<cffunction name="getTitle" returntype="string" output="false" access="public">
<cfargument name="renderRequest" type="any" required="true" hint="A
javax.portlet.RenderRequest java object">
<cfreturn "My ColdFusion Portlet">
</cffunction>
Portlet scope
The ColdFusion portlet toolkit defines the variable
request.portlet.parameters - Parameters of the Portlet Request
request.portlet.attributes - attributes of the Portlet Request
request.portlet.properties - properties of the Portlet Request
These variables are defined for convenience and convention.
Create portlet parameters
To create different page views within your portlet you can configure the render parameters such as
For example, to set the
renderURL
1
Create a
parameter
renderURL
<cfset params = StructNew()>
<cfset params.page = "somepage">
<cfoutput><a href="#createRenderURL(params)#">Link to somepage</a>
Check for parameter in the page and render conditionally:
2
with the same signature as the
doHelp()
.
doEdit()
portlet.cfc" on page 906
method of the
getTitle
request.portlet
parameter:
Last updated 1/20/2012
function.
doView()
base component.
ColdFusionPortlet
as follows:
. It contains the following structures:
907
.
renderURL

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents