• Home
  • Contact
blog.biernacki.ca

Kuba's Online Workshop

  • Home
  • Contact

How to change the page title from within a Coldfusion 9 Portlet

08/05/2010 Coldfusion How To No Comments

So in an earlier post I described the process to get started with a very basic portlet running under JBOSS / Coldfusion 9 / Liferay 6.  This post assumes that you actually are developing portlets, and have already setup the underlying structure to host said portlets.

This is a simple piece of code that allows you to set the Liferay page title of wherever your CF9 portlet is housed.

I turned it into a quick function that I could call (or house inside of a cfcomponent for re-use)

<cffunction name="core_setPageTitle" access="public" hint="Use this function to set the HTML Page Title" output="false" returntype="void">
	<cfargument name="title" default="" required="true" hint="Need the text for page title" />

	<!--- INCLUDE JAVA OBJECT TO SET PAGE TITLE --->
	<cfset portalUtil = CreateObject("java", "com.liferay.portal.util.PortalUtil")>
	<cfset httpServletRequest = portalUtil.getHttpServletRequest(getPortletRequest())>
	<cfset portalUtil.setPageTitle(arguments.title, httpServletRequest)> 
		
</cffunction>
Coldfusion 9Coldfusion Portletsliferay 6

Liferay and Coldfusion 9 Portlets... yes you can!

Auto Industry's Fastest Processor Is 128Mhz

Categories
  • Android
  • Apple
  • Coldfusion
  • Cool Apps
  • CSS
  • GitHub
  • Hardware
  • How To
  • In the News
  • Javascript
  • Linux
  • PHP
  • RC Hobby
  • Reviews
  • SysAdmin
  • Thoughts & Rants
  • Tinkering
Recent Comments
  • Jim on Fixing ONKYO RC-710m Remote volume issues
  • Tony on Fixing ONKYO RC-710m Remote volume issues
  • Robert Lawrence on Fixing ONKYO RC-710m Remote volume issues
  • Dasen on Fixing ONKYO RC-710m Remote volume issues
  • Ahmed on Fixing ONKYO RC-710m Remote volume issues
RollmyBlog
  • Twitter
  • WebMojo Design
  • Windsor Ultimate
Archives
  • June 2020
  • January 2015
  • June 2014
  • February 2014
  • January 2014
  • December 2013
  • May 2013
  • February 2013
  • July 2012
  • June 2012
  • February 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • April 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • August 2010
  • July 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • November 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • June 2008
  • October 2007
  • September 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • January 2007
Proudly powered by WordPress | Theme: Doo by ThemeVS.