Author: julien(a)jboss.com
Date: 2007-02-14 09:40:50 -0500 (Wed, 14 Feb 2007)
New Revision: 6272
Modified:
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/CharsetPortlet.java
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet.xml
Log:
added help mode support in the charset portlet
Modified:
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/CharsetPortlet.java
===================================================================
---
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/CharsetPortlet.java 2007-02-14
14:35:31 UTC (rev 6271)
+++
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/CharsetPortlet.java 2007-02-14
14:40:50 UTC (rev 6272)
@@ -93,6 +93,17 @@
}
}
+
+ protected void doHelp(RenderRequest req, RenderResponse resp) throws PortletException,
PortletSecurityException, IOException
+ {
+ //
+ resp.setContentType("text/html");
+ PrintWriter writer = resp.getWriter();
+
+ //
+ writer.print("This portlet shows different ways to properly display and submit
unicode text");
+ }
+
protected void doView(RenderRequest req, RenderResponse resp) throws PortletException,
PortletSecurityException, IOException
{
String sameString = req.getParameter("same");
@@ -129,9 +140,6 @@
}
//
- resp.setContentType("text/html");
- PrintWriter writer = resp.getWriter();
-
StringBuffer escapedText = new StringBuffer();
StringBuffer text = new StringBuffer();
for (int i = from; i < to; i++)
@@ -153,6 +161,10 @@
}
//
+ resp.setContentType("text/html");
+ PrintWriter writer = resp.getWriter();
+
+ //
writer.println("<div style=\"border-top:solid 1px\">Testing
range:</div>");
writer.print(
"<div>" +
Modified: trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet.xml
===================================================================
--- trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet.xml 2007-02-14
14:35:31 UTC (rev 6271)
+++ trunk/core-samples/src/resources/portal-samples-war/WEB-INF/portlet.xml 2007-02-14
14:40:50 UTC (rev 6272)
@@ -181,14 +181,14 @@
</portlet-info>
</portlet>
<portlet>
- <description>Portlet for testing charset</description>
+ <description>Portlet showing different ways to properly display and submit
unicode text</description>
<portlet-name>CharsetPortlet</portlet-name>
<display-name>Charset Portlet</display-name>
-
<portlet-class>org.jboss.portal.core.portlet.test.CharsetPortlet</portlet-class>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>HELP</portlet-mode>
</supports>
<portlet-info>
<title>Test charset</title>
Show replies by date