weaver 2003/10/19 20:32:05
Modified: applications/demo/src/java/org/apache/jetspeed/demo/preferences
PreferencePortlet.java
Log:
Changed pref-view.jsp to comply with the way ActionRequests communicate
to RenderRequest parameters.
Revision Changes Path
1.6 +5 -11
jakarta-jetspeed-2/applications/demo/src/java/org/apache/jetspeed/demo/preferences/PreferencePortlet.java
Index: PreferencePortlet.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/applications/demo/src/java/org/apache/jetspeed/demo/preferences/PreferencePortlet.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- PreferencePortlet.java 8 Oct 2003 04:36:39 -0000 1.5
+++ PreferencePortlet.java 20 Oct 2003 03:32:05 -0000 1.6
@@ -82,14 +82,8 @@
*/
protected void doView(RenderRequest request, RenderResponse response) throws
PortletException, IOException
{
- PortletContext context = getPortletContext();
- String attribute = (String) request.getAttribute("invokeMessage");
- if (attribute != null)
- {
- System.out.println("+++ Got the attribute: " + attribute);
- response.setContentType("text/html");
- response.getWriter().println("Got attribute set in ACTION: " +
attribute + "<br/>");
- }
+ PortletContext context = getPortletContext();
+
request.setAttribute("viewMessage", "My Mode is view.");
PortletRequestDispatcher rd =
context.getRequestDispatcher("/WEB-INF/demo/preference/pref-view.jsp");
@@ -119,9 +113,9 @@
int count = iCount.intValue();
count++;
- request.setAttribute("org.apache.jetspeed.invocationCount", new
Integer(count));
+ response.setRenderParameter("invocationCount", String.valueOf(count));
- request.setAttribute("invokeMessage", "I was invoked " + count + " times!");
+ response.setRenderParameter("invokeMessage", "processAction() I was invoked
" + count + " times!");
System.out.println("--------------------------- I was
invoked!!!---------------------------------");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]