You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by wo...@apache.org on 2008/11/25 18:52:39 UTC
svn commit: r720551 - in
/portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF:
portlet.xml view/metadata-detail.jsp view/pam-detail.jsp
view/portlet-detail.jsp
Author: woonsan
Date: Tue Nov 25 09:52:38 2008
New Revision: 720551
URL: http://svn.apache.org/viewvc?rev=720551&view=rev
Log:
Fixed errors caused by new portlet apis. Now viewings works.
Some actions and portlet entity browser/editor portlets should be fixed more.
Modified:
portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF/portlet.xml
portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF/view/metadata-detail.jsp
portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF/view/pam-detail.jsp
portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF/view/portlet-detail.jsp
Modified: portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF/portlet.xml?rev=720551&r1=720550&r2=720551&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF/portlet.xml (original)
+++ portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF/portlet.xml Tue Nov 25 09:52:38 2008
@@ -1048,7 +1048,7 @@
<keywords>admin,profiler,profile</keywords>
</portlet-info>
</portlet>
-<!--
+
<portlet id="PortletEntityBrowserPortlet">
<description>Administrative portlet for browsing over all Portlet Entities by portlet. Place this portlet on the same page as the Portlet Entity Editor</description>
<description xml:lang="ja">ãã¼ãã¬ããã¨ã³ãã£ãã£ãä¸è¦§ããæ©è½ãæä¾ãã¾ãããã¼ãã¬ããã¨ã³ãã£ãã£ã¨ãã£ã¿ã¨åããã¼ã¸ã«ç½®ãã¦ãã ããã</description>
@@ -1114,7 +1114,7 @@
<keywords>admin,applications,apps,entity,manager</keywords>
</portlet-info>
</portlet>
- -->
+
<portlet id="StatisticsPortlet">
<description>Provides statistics about portal access hits by page, portlet, and by user. Statistical results are sorted by highest hit rate.</description>
<description xml:lang="ja">ãã¼ã¸ããã¼ãã¬ãããã¦ã¼ã¶ã¼ãã¨ã®ãã¼ã¿ã«ã¢ã¯ã»ã¹ã«ã¤ãã¦ã®çµ±è¨æ©è½ãæä¾ãã¾ããçµ±è¨çµæã¯ããããå²åãé«ãé ã«ã½ã¼ãããã¾ãã</description>
Modified: portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF/view/metadata-detail.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF/view/metadata-detail.jsp?rev=720551&r1=720550&r2=720551&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF/view/metadata-detail.jsp (original)
+++ portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF/view/metadata-detail.jsp Tue Nov 25 09:52:38 2008
@@ -24,7 +24,7 @@
<c:forEach var="field" items="${md.fields}">
<tr>
<td class="portlet-section-body">
- <input type="checkbox" name="metadata_id" value="<c:out value="${field.id}"/>"/>
+ <input type="checkbox" name="metadata_id" value="<c:out value="${field.name}"/>"/>
</td>
<td class="portlet-section-body">
<c:out value="${field.name}"/>
@@ -35,7 +35,7 @@
</td>
<td class="portlet-section-body">
<%--TODO: value needs to escaped, or use textarea--%>
- <input type="text" name="<c:out value="${field.id}"/>:value" value="<c:out value="${field.value}"/>" size="50"/>
+ <input type="text" name="<c:out value="${field.name}"/>:value" value="<c:out value="${field.value}"/>" size="50"/>
</td>
</tr>
</c:forEach>
Modified: portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF/view/pam-detail.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF/view/pam-detail.jsp?rev=720551&r1=720550&r2=720551&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF/view/pam-detail.jsp (original)
+++ portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF/view/pam-detail.jsp Tue Nov 25 09:52:38 2008
@@ -16,9 +16,8 @@
<%@ page import="javax.portlet.*" %>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.portals.bridges.beans.TabBean" %>
-<%@ page import="org.apache.jetspeed.om.common.preference.*" %>
<%@ page import="org.apache.jetspeed.om.common.*" %>
-<%@ page import="org.apache.jetspeed.om.common.portlet.*" %>
+<%@ page import="org.apache.jetspeed.om.portlet.*" %>
<%@ taglib uri='/WEB-INF/portlet.tld' prefix='portlet'%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
@@ -77,8 +76,7 @@
<div id="portlets">
<portlet:actionURL var="select_portlet_link" >
- <%--<portlet:param name="select_portlet" value="<%= pdefName %>" />--%>
- </portlet:actionURL>
+ </portlet:actionURL>
<form action="<c:out value="${select_portlet_link}"/>" method="post">
<select name="select_portlet" onChange="this.form.submit();" class="portlet-form-field">
@@ -86,20 +84,16 @@
<fmt:message key="pam.details.choose_portlet"/>
</option>
- <c:forEach var="portletDef" items="${pa.portletDefinitions}">
- <c:set var="pdefName" value="${portletDef.name}"/>
-
+ <c:forEach var="portletDef" items="${pa.portletDefinitionList}">
<%--We must do this since portlet taglib doesn't support expressions--%>
- <% String pdefName = (String) pageContext.getAttribute("pdefName"); %>
+ <%
+ String pdefUniqueName = ((PortletDefinition) pageContext.getAttribute("portletDef")).getUniqueName();
+ String pdefDisplayName = ((PortletDefinition) pageContext.getAttribute("portletDef")).getDisplayName(renderRequest.getLocale()).getDisplayName();
+ %>
- <option value="<c:out value="${portletDef.name}"/>" <c:if test="${selectedPDef.name == portletDef.name}">selected="true"</c:if>>
- <c:out value="${portletDef.name}"/>
+ <option value="<%=pdefUniqueName%>" <c:if test="${selectedPDef.uniqueName == portletDef.uniqueName}">selected="true"</c:if>>
+ <%=pdefDisplayName%>
</option>
- <%--
- <a href="<c:out value="${select_portlet_link}"/>">
- <c:out value="${portletDef.name}" /><br />
- </a>
- --%>
</c:forEach>
</select>
@@ -225,7 +219,7 @@
<fmt:message key="pam.details.description"/>
</td>
<td class="portlet-section-body">
- <c:out value="${pa.description}"/>
+ <%=((PortletApplication) pageContext.getAttribute("pa")).getDescription(renderRequest.getLocale())%>
</td>
</tr>
<tr>
Modified: portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF/view/portlet-detail.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF/view/portlet-detail.jsp?rev=720551&r1=720550&r2=720551&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF/view/portlet-detail.jsp (original)
+++ portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/webapp/WEB-INF/view/portlet-detail.jsp Tue Nov 25 09:52:38 2008
@@ -22,9 +22,7 @@
</tr>
<tr>
<td class="portlet-menu">
- <div class="portlet-menu-item">
-<c:out value="${selectedPDef.name}"/>
- </div>
+ <div class="portlet-menu-item"><%=((PortletDefinition) pageContext.getAttribute("selectedPDef")).getDisplayName(renderRequest.getLocale()).getDisplayName()%></div>
</td>
</tr>
</table>
@@ -55,14 +53,6 @@
</tr>
</tr>
<td class="portlet-section-alternate">
- <fmt:message key="pam.details.id"/>
- </td>
- <td class="portlet-section-body">
- <c:out value="${selectedPDef.portletIdentifier}"/>
- </td>
- </tr>
- </tr>
- <td class="portlet-section-alternate">
<fmt:message key="pam.details.unique_name"/>
</td>
<td class="portlet-section-body">
@@ -82,7 +72,7 @@
<fmt:message key="pam.details.class_name"/>
</td>
<td class="portlet-section-body">
- <c:out value="${selectedPDef.className}"/>
+ <c:out value="${selectedPDef.portletClass}"/>
</td>
</tr>
<tr>
@@ -92,10 +82,10 @@
<td class="portlet-section-body">
<table>
<%
- PortletDefinitionComposite portlet = (PortletDefinitionComposite)pageContext.findAttribute("selectedPDef");
- pageContext.setAttribute("displayNameSet", portlet.getDisplayNameSet());
+ PortletDefinition portlet = (PortletDefinition)pageContext.findAttribute("selectedPDef");
+ pageContext.setAttribute("displayNames", portlet.getDisplayNames());
%>
- <c:forEach var="displayName" items="${displayNameSet.innerCollection}" varStatus="displayNameStatus">
+ <c:forEach var="displayName" items="${displayNames}" varStatus="displayNameStatus">
<tr>
<td class="portlet-section-alternate"><c:out value="${displayName.locale}"/></td>
@@ -153,11 +143,11 @@
</c:if>
<c:if test="${selectedPortletTab.id == 'pd_preferences'}">
- <c:set var="prefSet" value="${selectedPDef.preferenceSet}"/>
+ <c:set var="prefs" value="${selectedPDef.portletPreferences}"/>
<%
- PreferenceSetComposite comp = (PreferenceSetComposite)pageContext.findAttribute("prefSet");
- Iterator prefIter = comp.iterator();
- pageContext.setAttribute("prefIter", prefIter);
+ Preferences prefs = (Preferences)pageContext.findAttribute("prefs");
+ List prefsList = prefs.getPortletPreferences();
+ pageContext.setAttribute("prefsList", prefsList);
%>
<portlet:actionURL var="edit_preferenece_link" >
@@ -171,7 +161,7 @@
<th class="portlet-section-header"><fmt:message key="pam.details.name"/></th>
<th class="portlet-section-header"><fmt:message key="pam.details.value"/></th>
</tr>
- <c:forEach var="pref" items="${prefIter}">
+ <c:forEach var="pref" items="${prefsList}">
<tr>
<td class="portlet-section-body">
<input type="checkbox" name="pref_remove_id" value="<c:out value="${pref.name}"/>"/>
@@ -241,7 +231,7 @@
</c:if>
<c:if test="${selectedPortletTab.id == 'pd_languages'}">
- <c:set var="langSet" value="${selectedPDef.languageSet}"/>
+ <c:set var="languages" value="${selectedPDef.languages}"/>
<portlet:actionURL var="edit_language_link" >
</portlet:actionURL>
@@ -256,7 +246,7 @@
<th class="portlet-section-header"><fmt:message key="pam.details.keyword"/></th>
<th class="portlet-section-header"><fmt:message key="pam.details.locale"/></th>
</tr>
- <c:forEach var="lang" items="${langSet.innerCollection}" varStatus="status">
+ <c:forEach var="lang" items="${languages}" varStatus="status">
<tr>
<td class="portlet-section-body">
<input type="checkbox" name="language_remove_id" value="<c:out value="${status.index}"/>"/>
@@ -348,7 +338,7 @@
</c:if>
<c:if test="${selectedPortletTab.id == 'pd_parameters'}">
- <c:set var="paramSet" value="${selectedPDef.initParameterSet}"/>
+ <c:set var="initParams" value="${selectedPDef.initParams}"/>
<portlet:actionURL var="edit_parameter_link" >
</portlet:actionURL>
@@ -368,28 +358,28 @@
<th class="portlet-section-header"><fmt:message key="pam.details.value"/></th>
<th class="portlet-section-header"><fmt:message key="pam.details.locale"/> / <fmt:message key="pam.details.description"/></th>
</tr>
- <c:forEach var="theparam" items="${paramSet.innerCollection}">
+ <c:forEach var="theparam" items="${initParams}">
<tr>
<td class="portlet-section-body">
- <input type="checkbox" name="parameter_remove_id" value="<c:out value="${theparam.name}"/>" />
+ <input type="checkbox" name="parameter_remove_id" value="<c:out value="${theparam.paramName}"/>" />
</td>
<td class="portlet-section-body">
- <input type="hidden" name="parameter_edit_id" value="<c:out value="${theparam.name}"/>" />
- <c:out value="${theparam.name}"/>
+ <input type="hidden" name="parameter_edit_id" value="<c:out value="${theparam.paramName}"/>" />
+ <c:out value="${theparam.paramName}"/>
</td>
<td class="portlet-section-body">
- <input type="text" name="<c:out value="${theparam.name}"/>:value" value="<c:out value="${theparam.value}"/>" class="portlet-form-field-label"/>
+ <input type="text" name="<c:out value="${theparam.paramName}"/>:value" value="<c:out value="${theparam.paramValue}"/>" class="portlet-form-field-label"/>
</td>
<td class="portlet-section-body">
- <c:set var="descSet" value="${theparam.descriptionSet}"/>
+ <c:set var="descriptions" value="${theparam.descriptions}"/>
<table>
- <c:forEach var="description" items="${descSet.innerCollection}" varStatus="descStatus">
+ <c:forEach var="description" items="${descriptions}" varStatus="descStatus">
<tr>
<td class="portlet-section-alternate">
<c:out value="${description.locale}"/>
</td>
<td class="portlet-section-body">
- <input type="text" name="<c:out value="${theparam.name}"/>:description:<c:out value="${descStatus.index}"/>"
+ <input type="text" name="<c:out value="${theparam.paramName}"/>:description:<c:out value="${descStatus.index}"/>"
value="<c:out value="${description.description}"/>" class="portlet-form-field-label"/>
</td>
</tr>
@@ -458,12 +448,12 @@
</c:if>
<c:if test="${selectedPortletTab.id == 'pd_security'}">
- <c:set var="roleSet" value="${selectedPDef.initSecurityRoleRefSet}"/>
+ <c:set var="roleRefs" value="${selectedPDef.securityRoleRefs}"/>
<portlet:actionURL var="edit_security_link" >
</portlet:actionURL>
- <c:if test="${! empty roleSet.innerCollection}">
+ <c:if test="${! empty roleRefs}">
<form action="<c:out value="${edit_security_link}"/>" method="post">
<input type="hidden" name="portlet_action" value=""/>
@@ -474,7 +464,7 @@
<th class="portlet-section-header"><fmt:message key="pam.details.role_link"/></th>
<th class="portlet-section-header"><fmt:message key="pam.details.locale"/> / <fmt:message key="pam.details.description"/></th>
</tr>
- <c:forEach var="therole" items="${roleSet.innerCollection}">
+ <c:forEach var="therole" items="${roleRefs}">
<tr>
<td class="portlet-section-body">
<input type="checkbox" name="security_remove_id" value="<c:out value="${therole.roleName}"/>"/>
@@ -487,9 +477,9 @@
<input type="text" name="<c:out value="${therole.roleName}"/>:link" value="<c:out value="${therole.roleLink}"/>" class="portlet-form-field-label"/>
</td>
<td class="portlet-section-body">
- <c:set var="descSet" value="${therole.descriptionSet}"/>
+ <c:set var="descriptions" value="${therole.descriptions}"/>
<table>
- <c:forEach var="description" items="${descSet.innerCollection}" varStatus="descStatus">
+ <c:forEach var="description" items="${descriptions}" varStatus="descStatus">
<tr>
<td class="portlet-section-alternate">
<c:out value="${description.locale}"/>
@@ -589,12 +579,12 @@
</c:if>
<c:if test="${selectedPortletTab.id == 'pd_content_type'}">
- <c:set var="contentTypeSet" value="${selectedPDef.contentTypeSet}"/>
+ <c:set var="supports" value="${selectedPDef.supports}"/>
<portlet:actionURL var="edit_content_type_link" >
</portlet:actionURL>
- <c:if test="${! empty contentTypeSet.innerCollection}">
+ <c:if test="${! empty supports}">
<form action="<c:out value="${edit_content_type_link}"/>" method="post">
<input type="hidden" name="portlet_action" value=""/>
<table border="0">
@@ -603,13 +593,13 @@
<th class="portlet-section-header"><fmt:message key="pam.details.content_type"/></th>
<th class="portlet-section-header"><fmt:message key="pam.details.modes"/></th>
</tr>
- <c:forEach var="contentType" items="${contentTypeSet.innerCollection}">
+ <c:forEach var="support" items="${supports}">
<tr>
<td class="portlet-section-body">
- <input type="checkbox" name="content_type_remove_id" value="<c:out value="${contentType.contentType}"/>"/>
+ <input type="checkbox" name="content_type_remove_id" value="<c:out value="${contentType.mimeType}"/>"/>
</td>
<td class="portlet-section-body">
- <c:out value="${contentType.contentType}"/>
+ <c:out value="${contentType.mimeType}"/>
</td>
<td class="portlet-section-body">
<c:forEach var="mode" items="${contentType.portletModes}">
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org