orionsmith.com

  • Increase font size
  • Default font size
  • Decrease font size
Home Category Blog Basic ALUI Hello World Portlet

Basic ALUI Hello World Portlet

E-mail Print PDF

ALUIHelloWorld.jsp

 

<%@ page language="java" import="com.plumtree.remote.portlet.*,java.util.Date" %>

You refreshed at <b> <%= new Date().toString()%>   </b> <br/>

<%
//get the idk
IPortletContext portletContext = PortletContextFactory.createPortletContext(request, response);
IPortletRequest portletRequest = portletContext.getRequest();
String settingKey                   = "PortletEntry";

String settingValue = portletRequest.getSettingValue(SettingType.Portlet, settingKey);

//if the entry has already been set, display it here
if (null != settingValue)
{
%>
<br/><b> Preference value is <%=settingValue%></b>!<br/>
<%


//form to enter the preference
%>
<P>Enter your preference - the value will be saved in a field named PortletEntry :
<form METHOD="post" ACTION="setPrefs.jsp" name="form1">
<input type="text" name="<%=settingKey%>">
<br/>
<input type="submit" name="Submit" value="Submit">
</form>

 

 

 

 SetPrefs.JSP

 

<%@ page language="java" import="com.plumtree.remote.portlet.*" %>

<%
//set the cache control so we don't get a cached page
response.setHeader("Cache-control", "max-age=0");

//get the idk
IPortletContext portletContext = PortletContextFactory.createPortletContext(request, response); 

//get IPortletResponse to set preferences and redirect back to the portal
IPortletResponse portletResponse = portletContext.getResponse();

//get the setting value from the servlet request
String settingKey = "PortletEntry";
String settingValue = request.getParameter(settingKey);

//set the setting value
portletResponse.setSettingValue(SettingType.Portlet, settingKey, settingValue);

//redirect back to the portal
portletResponse.returnToPortal();

%>

Last Updated on Tuesday, 23 June 2009 21:53  

RSS Feed

Oracle Discussion Forums: Message List - WebCenter - Interaction
Most recent forum messages

Contact Orion Smith

For Information Contact:
Orion Smith
Tel:281-257-8907
info@orionsmith.com


Read more...

 

 

Newsflash 1

Orion Smith - 10 Years of Outstanding Service!!

Read more...

 

 

Newsflash 2

The one thing about a Web site, it always changes! A CMS makes it easy to add Articles, content, images, videos, and more. Site administrators can edit and manage content 'in-context' by clicking the 'Edit' link. Webmasters can also edit content through a graphical Control Panel that gives you complete control over your site.

Read more...

 

 


Newsflash

Documentum Upgrade services provided through Orion Smith Inc.  We have consultants with at least 10 years Documentum experience.