Author: chris.laprun(a)jboss.com
Date: 2008-02-08 18:45:46 -0500 (Fri, 08 Feb 2008)
New Revision: 9878
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/RemoteControlResourcePortlet.java
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/jsp/error.jsp
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/tags/portal/portlet.tag
Log:
- Minor improvements.
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/RemoteControlResourcePortlet.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/RemoteControlResourcePortlet.java 2008-02-08
23:32:02 UTC (rev 9877)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/simple/samples/RemoteControlResourcePortlet.java 2008-02-08
23:45:46 UTC (rev 9878)
@@ -45,20 +45,20 @@
writer.print("<script type='text/javascript'>function
openLinkInParent(url){window.open(url,'jbp_parent');}</script>");
PortletURL url = resourceResponse.createRenderURL();
url.setWindowState(WindowState.MINIMIZED);
- writer.print("<ul><li><a href='#' onclick=\""
+ createParentURL(url) + "\">minimize</a></li>");
+ writer.print("<ul><li><a href='#' onclick=\""
+ createParentURL(url) + "\">minimize parent
portlet</a></li>");
url.setWindowState(WindowState.MAXIMIZED);
- writer.print("<li><a href='#' onclick=\"" +
createParentURL(url) + "\">maximize</a></li>");
+ writer.print("<li><a href='#' onclick=\"" +
createParentURL(url) + "\">maximize parent
portlet</a></li>");
url.setWindowState(WindowState.NORMAL);
- writer.print("<li><a href='#' onclick=\"" +
createParentURL(url) + "\">normal</a></li></ul>");
+ writer.print("<li><a href='#' onclick=\"" +
createParentURL(url) + "\">make parent portlet
normal</a></li></ul>");
writer.print("<p><b>'zipcode'</b> public render
parameter value: " + resourceRequest.getParameter(ZIPCODE) +
"<br/>");
- writer.print("<p>Set value of <b>'zipcode'</b>
public render parameter to:");
+ writer.print("Set value of <b>'zipcode'</b> public render
parameter to:</p>");
url.setParameter(ZIPCODE, "80201");
- writer.print("<li><a href='#' onclick=\"" +
createParentURL(url) + "\">Denver</a>");
+ writer.print("<ul><li><a href='#' onclick=\""
+ createParentURL(url) + "\">Denver</a>");
url.setParameter(ZIPCODE, "94102");
writer.print("<li><a href='#' onclick=\"" +
createParentURL(url) + "\">San Francisco</a>");
url.setParameter(ZIPCODE, "20001");
writer.print("<li><a href='#' onclick=\"" +
createParentURL(url) + "\">Washington, DC</a>");
- writer.print("</ul></p>");
+ writer.print("</ul>");
}
private String createParentURL(PortletURL url)
Modified:
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/jsp/error.jsp
===================================================================
---
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/jsp/error.jsp 2008-02-08
23:32:02 UTC (rev 9877)
+++
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/jsp/error.jsp 2008-02-08
23:45:46 UTC (rev 9878)
@@ -2,18 +2,20 @@
<div class="portlet">
<div class="portlet-frame">
- <div class="header full-width">
- <div class="header-layer full-width">
- <div class="title two-third-width
float-left"><h2>Error</h2></div>
- <div class="controls third-width float-right">
+ <div class="header full-width">
+ <div class="header-layer full-width">
+ <div class="title two-third-width float-left">
+ <h2><%=
request.getAttribute("org.jboss.portal.portlet.portal.error.portlet_name")%>
+ </h2>
+ </div>
</div>
</div>
+ <p style="font-weight: bold;">Portlet was not rendered</p>
+ <b>Error status:</b> <%=
request.getAttribute("org.jboss.portal.portlet.portal.error.status")%><br/>
+ <b>Portlet name:</b> <%=
request.getAttribute("org.jboss.portal.portlet.portal.error.portlet_name")%><br/>
+ <b>Portlet application
+ name:</b> <%=
request.getAttribute("org.jboss.portal.portlet.portal.error.application_name")%><br/>
+ <b>Exception:</b> <%=
request.getAttribute("org.jboss.portal.portlet.portal.error.exception")%><br/>
+ <b>Window id:</b> <%=
request.getAttribute("org.jboss.portal.portlet.portal.error.window_id")%><br/>
</div>
-<%=
request.getAttribute("org.jboss.portal.portlet.portal.error.status")%><br/>
-<%=
request.getAttribute("org.jboss.portal.portlet.portal.error.portlet_name")%><br/>
-<%=
request.getAttribute("org.jboss.portal.portlet.portal.error.application_name")%><br/>
-<%=
request.getAttribute("org.jboss.portal.portlet.portal.error.cause")%><br/>
-<%=
request.getAttribute("org.jboss.portal.portlet.portal.error.message")%><br/>
-<%=
request.getAttribute("org.jboss.portal.portlet.portal.error.window_id")%><br/>
</div>
-</div>
Modified:
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/tags/portal/portlet.tag
===================================================================
---
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/tags/portal/portlet.tag 2008-02-08
23:32:02 UTC (rev 9877)
+++
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/tags/portal/portlet.tag 2008-02-08
23:45:46 UTC (rev 9878)
@@ -1,38 +1,36 @@
<%@ tag body-content="scriptless" %>
<%@ attribute name="name" rtexprvalue="true"
required="true" %>
<%@ attribute name="applicationName" rtexprvalue="true"
required="true" %>
-<%@ attribute name="content" fragment="true"
required="false" %>
+<%@ attribute name="content" fragment="true"
required="false" %>
<%@ taglib uri="/WEB-INF/portal.tld" prefix="portal" %>
-<portal:portlet
- name="${name}"
- applicationName="${applicationName}"
- errorPage="/WEB-INF/jsp/error.jsp">
-<div class="portlet">
- <div class="portlet-frame">
- <div class="header full-width">
- <div class="header-layer full-width">
- <div class="title two-third-width
float-left"><h2><portal:portlettitle/></h2></div>
- <div class="controls third-width float-right">
- <span class="mode-button">
- <a href="<portal:portleturl
windowState='maximized'/>"><img
src="${pageContext.request.contextPath}/images/icon-maximize.gif"
alt=""/></a>
- </span>
- <span class="mode-button">
- <a href="<portal:portleturl
windowState='normal'/>"><img
src="${pageContext.request.contextPath}/images/icon-normal.gif"
alt=""/></a>
- </span>
- <span class="mode-button">
- <a href="<portal:portleturl
windowState='minimized'/>"><img
src="${pageContext.request.contextPath}/images/icon-minimize.gif"
alt=""/></a>
- </span>
- <span class="mode-button">
- <a title="Edit" href="<portal:portleturl
mode='edit'/>">Edit</a>
- </span>
+<portal:portlet name="${name}"
applicationName="${applicationName}"
errorPage="/WEB-INF/jsp/error.jsp">
+ <div class="portlet">
+ <div class="portlet-frame">
+ <div class="header full-width">
+ <div class="header-layer full-width">
+ <div class="title two-third-width
float-left"><h2><portal:portlettitle/></h2></div>
+ <div class="controls third-width float-right">
+ <span class="mode-button">
+ <a href="<portal:portleturl
windowState='maximized'/>"><img
+
src="${pageContext.request.contextPath}/images/icon-maximize.gif"
alt=""/></a>
+ </span>
+ <span class="mode-button">
+ <a href="<portal:portleturl
windowState='normal'/>"><img
+
src="${pageContext.request.contextPath}/images/icon-normal.gif"
alt=""/></a>
+ </span>
+ <span class="mode-button">
+ <a href="<portal:portleturl
windowState='minimized'/>"><img
+
src="${pageContext.request.contextPath}/images/icon-minimize.gif"
alt=""/></a>
+ </span>
+ <span class="mode-button">
+ <a title="Edit" href="<portal:portleturl
mode='edit'/>">Edit</a>
+ </span>
+ </div>
+ </div>
</div>
+ <portal:portletmarkup/>
+ <jsp:doBody/>
</div>
</div>
- <portal:portletmarkup/>
-
- <jsp:doBody/>
-
-</div>
-</div>
</portal:portlet>
Show replies by date