Author: chris.laprun(a)jboss.com
Date: 2008-02-14 19:54:09 -0500 (Thu, 14 Feb 2008)
New Revision: 9979
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/portal/samples/RemoteControlResourcePortlet.java
Log:
- Added state to SF and Denver for consistency.
- Removed commented code.
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/portal/samples/RemoteControlResourcePortlet.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/portal/samples/RemoteControlResourcePortlet.java 2008-02-15
00:33:56 UTC (rev 9978)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/portal/samples/RemoteControlResourcePortlet.java 2008-02-15
00:54:09 UTC (rev 9979)
@@ -23,8 +23,6 @@
public class RemoteControlResourcePortlet extends GenericPortlet
{
private static final String ZIPCODE = "zipcode";
- private static int COLOR_INDEX = 0;
- private static final String[] COLORS = {"000", "f00",
"0f0", "00f", "ff0", "0ff", "f0f",
"fff"};
@Override
protected void doView(RenderRequest renderRequest, RenderResponse renderResponse)
throws PortletException, IOException
@@ -39,9 +37,6 @@
ResourceURL resource = renderResponse.createResourceURL();
printWriter.print(resource);
printWriter.print("')\">Open remote
control!</a></p>");
- /*String color = renderRequest.getPreferences().getValue("color",
"000");
- printWriter.print("<p>Preferred color: <span style='border: 1px
solid #aaa; background-color:#"
- + color + ";'> </span></p>");*/
}
@Override
@@ -50,7 +45,6 @@
resourceResponse.setContentType("text/html");
PrintWriter writer = resourceResponse.getWriter();
String namespace = resourceResponse.getNamespace();
-// resourceRequest.getPreferences().setValue("color", COLORS[COLOR_INDEX++
% 8]);
writer.print("<html><head><script
type='text/javascript'>function
openLinkInParent(url){window.open(url,'"
+ namespace + "_parent');}</script>\n<link
rel=\"stylesheet\" href='/simple-portal/css/master.css'
type=\"text/css\"/></head><body>");
PortletURL url = resourceResponse.createRenderURL();
@@ -66,9 +60,9 @@
writer.print("<br/><ul><li><b>'zipcode'</b>
public render parameter value: " + resourceRequest.getParameter(ZIPCODE) +
"<br/>");
writer.print("Set value of <b>'zipcode'</b> public render
parameter to:</li>");
url.setParameter(ZIPCODE, "80201");
- writer.print("<li><a href='#' onclick=\"" +
createParentURL(url) + "\">Denver</a>");
+ writer.print("<li><a href='#' onclick=\"" +
createParentURL(url) + "\">Denver, CO</a>");
url.setParameter(ZIPCODE, "94102");
- writer.print("<li><a href='#' onclick=\"" +
createParentURL(url) + "\">San Francisco</a>");
+ writer.print("<li><a href='#' onclick=\"" +
createParentURL(url) + "\">San Francisco, CA</a>");
url.setParameter(ZIPCODE, "20001");
writer.print("<li><a href='#' onclick=\"" +
createParentURL(url) + "\">Washington, DC</a>");
writer.print("</ul></div></body></html>");
Show replies by date