Author: julien(a)jboss.com
Date: 2007-02-14 09:35:31 -0500 (Wed, 14 Feb 2007)
New Revision: 6271
Modified:
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/CharsetPortlet.java
Log:
update charset portlet to test various use case with process action : textarea, text field
and portlet url parameter
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:30:58 UTC (rev 6270)
+++
trunk/core-samples/src/main/org/jboss/portal/core/portlet/test/CharsetPortlet.java 2007-02-14
14:35:31 UTC (rev 6271)
@@ -201,14 +201,26 @@
"</div>");
//
- if (same == Boolean.TRUE)
+ PortletURL url2 = resp.createActionURL();
+ url2.setParameter("text", text.toString());
+ url2.setParameter("from", "" + from);
+ url2.setParameter("to", "" + to);
+ writer.println("<div style=\"border-top:solid 1px\"><a
href=\"" + url2 + "\">Test</a> processAction() with a portlet
parameter:</div>");
+
+ //
+ if (same != null)
{
- writer.print("<div>Test result: The input matched the expected
result</div>");
+ writer.print("<div
style=\"color:red;margin-top:2em;margin-bottom:2em\">Test result: ");
+ if (same == Boolean.TRUE)
+ {
+ writer.print("The input matched the expected result");
+ }
+ else if (same == Boolean.FALSE)
+ {
+ writer.print("The input did not matched the expected result");
+ }
+ writer.print("</div>");
}
- else if (same == Boolean.FALSE)
- {
- writer.print("<div>Test result: The input did not matched the
expected result</div>");
- }
//
writer.close();
Show replies by date