Author: julien(a)jboss.com
Date: 2007-02-28 07:09:49 -0500 (Wed, 28 Feb 2007)
New Revision: 6453
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortletManagerBean.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/common/editPreferences.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portlets.xhtml
Log:
started to work on the portlet manager
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortletManagerBean.java
===================================================================
---
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortletManagerBean.java 2007-02-28
05:24:40 UTC (rev 6452)
+++
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortletManagerBean.java 2007-02-28
12:09:49 UTC (rev 6453)
@@ -93,6 +93,7 @@
/** . */
private FederatingPortletInvoker federatingPortletInvoker;
+ /** . */
private String sortColumn;
private boolean sortAscending;
@@ -265,17 +266,10 @@
{
FacesContext ctx = FacesContext.getCurrentInstance();
selectedPortletId =
(String)ctx.getExternalContext().getRequestParameterMap().get("id");
- selectedPlugin = "manager";
+ selectedPlugin =
(String)ctx.getExternalContext().getRequestParameterMap().get("plugin");
return "portlets";
}
- public void selectPlugin()
- {
- // Get id
- Map pmap =
FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
- selectedPlugin = (String)pmap.get("plugin");
- }
-
public PreferencesBean getSelectedPreferences()
{
return selectedPreferences;
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/common/editPreferences.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/common/editPreferences.xhtml 2007-02-28
05:24:40 UTC (rev 6452)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/common/editPreferences.xhtml 2007-02-28
12:09:49 UTC (rev 6453)
@@ -12,7 +12,9 @@
<th>Key</th>
<th>Name</th>
<th>ReadOnly</th>
- <th>Actions</th>
+ <c:if test="#{action != null}">
+ <th>Actions</th>
+ </c:if>
<th>Value</th>
</tr>
</thead>
@@ -28,15 +30,17 @@
<td>
<h:outputText value="#{row.readOnly}"/>
</td>
+ <c:if test="#{action != null}">
+ <td>
+ <h:commandLink
+ rendered="#{row.cell.value != null and
preferences.model.mutable}"
+ action="#{action.selectRow}"><f:param
name="row" value="#{status.index}"/>Edit</h:commandLink> |
+ <h:commandLink
+ rendered="#{row.cell.value != null and
preferences.model.mutable}"
+ action="#{action.deleteCell}"><f:param
name="row" value="#{status.index}"/>Reset</h:commandLink>
+ </td>
+ </c:if>
<td>
- <h:commandLink
- rendered="#{row.cell.value != null and
preferences.model.mutable}"
- action="#{action.selectRow}"><f:param
name="row" value="#{status.index}"/>Edit</h:commandLink> |
- <h:commandLink
- rendered="#{row.cell.value != null and
preferences.model.mutable}"
- action="#{action.deleteCell}"><f:param
name="row" value="#{status.index}"/>Reset</h:commandLink>
- </td>
- <td>
<h:outputText value="#{row.cell.description}"/>
</td>
</tr>
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portlets.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portlets.xhtml 2007-02-28
05:24:40 UTC (rev 6452)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/portlets.xhtml 2007-02-28
12:09:49 UTC (rev 6453)
@@ -3,121 +3,82 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:jbp="http://www.jboss.com/portal">
+
xmlns:jbp="http://www.jboss.com/portal"
+
xmlns:c="http://java.sun.com/jstl/core"
+
xmlns:pfc="http://www.jboss.com/portal/facelet/common">
<ui:composition
template="/WEB-INF/jsp/management/definitionsTemplate.xhtml">
<ui:define name="content">
-<h:panelGrid
- id="federateddropdown">
+ <h:panelGrid id="federateddropdown">
<h:form>
- <h:selectOneMenu
- id="menu"
- value="#{portletmgr.selectedFederatedId}">
+ <h:selectOneMenu id="menu"
value="#{portletmgr.selectedFederatedId}">
<f:selectItems value="#{portletmgr.federatedIds}"/>
</h:selectOneMenu>
<h:commandButton value="Change portlet provider"/>
</h:form>
-</h:panelGrid>
-<h:panelGrid
- id="thepanel"
- columns="3"
- rowClasses="vertTop"
- columnClasses="menu,,content">
-<h:panelGroup
- id="panel1">
-<h:form>
- <h:dataTable
- id="portletsTable"
- var="portlet"
- value="#{portletmgr.portlets}"
- rows="10">
- <h:column>
- <f:facet name="header">
- <h:outputText value="Id"/>
- </f:facet>
- <h:commandLink
- action="#{portletmgr.selectPortlet}">
- <f:param
- name="id"
- value="#{portlet.context.id}"/>
- <h:outputText value="#{portlet.context.id}"/>
- </h:commandLink>
- </h:column>
- <h:column>
- <f:facet name="header">
- <h:outputText value="Name"/>
- </f:facet>
- <h:outputText value="#{portlet.name}"/>
- </h:column>
- <h:column>
- <f:facet name="header">
- <h:outputText value="Remote"/>
- </f:facet>
- <h:selectBooleanCheckbox disabled="true"
value="#{portlet.remote}"/>
- </h:column>
- <h:column>
- <f:facet name="header">
- <h:outputText value="Remotable"/>
- </f:facet>
- <h:selectBooleanCheckbox disabled="true"
value="#{portlet.remotable}"/>
- </h:column>
- <h:column>
- <f:facet name="header">
- <h:outputText value="Description"/>
- </f:facet>
- <h:outputText value="#{portlet.description}"/>
- </h:column>
- </h:dataTable>
-
- <jbp:scroller for="portletsTable"
styleClass="portlet-form-button"/>
-
-</h:form>
-</h:panelGroup>
-<h:panelGroup id="splitter">
- <h:graphicImage value="/images/management/line-trunk.gif"
height="100%" width="3"/>
-</h:panelGroup>
-<h:panelGroup id="pg2">
- <div align="center">
- <h:form id="plugin_nav">
- <h:panelGrid id="pg3" columns="3" border="0"
cellspacing="0" cellpadding="0" rowClasses="vertTop">
- <h:commandLink
- action="#{portletmgr.selectPlugin}"
- style="#{portletmgr.selectedPlugin == 'manager' ?
'font-weight:bold' : ''}">
- <h:graphicImage value="/images/management/manage.png"
style="vertical-align:middle;border-width:1"/>
- <h:outputText> </h:outputText>
- <h:outputText value="Manager"/>
- <f:param name="plugin" value="manager"/>
- </h:commandLink>
- <h:outputText>   </h:outputText>
- <h:commandLink
- action="#{portletmgr.selectPlugin}"
- style="#{portletmgr.selectedPlugin == 'preferences' ?
'font-weight:bold' : ''}">
- <h:graphicImage value="/images/management/preferences.png"
style="vertical-align:middle"/>
- <h:outputText> </h:outputText>
- <h:outputText value="Preferences"/>
- <f:param name="plugin" value="preferences"/>
- </h:commandLink>
- </h:panelGrid>
- </h:form>
- </div>
- <h:panelGroup
- id="pg4"
- rendered="#{portletmgr.selectedPortlet != null}">
- <h:panelGroup
- rendered="#{portletmgr.selectedPlugin == 'manager'}">
- <ui:include
src="/WEB-INF/jsp/management/plugins/portlet/manager.xhtml"/>
- </h:panelGroup>
- <h:panelGroup
- rendered="#{portletmgr.selectedPlugin == 'preferences'}">
- <ui:include
src="/WEB-INF/jsp/management/plugins/preferences.xhtml">
- <ui:param name="preferences"
value="#{portletmgr.selectedPreferences}"/>
- </ui:include>
- </h:panelGroup>
- </h:panelGroup>
-</h:panelGroup>
-</h:panelGrid>
+ </h:panelGrid>
+
+ <h:form>
+
+ <table width="100%" border="0" cellspacing="0"
class="portlet-table-body">
+ <thead class="portlet-section-header"
style="text-align:left;">
+ <tr>
+ <th>Id</th>
+ <th>Name</th>
+ <th>Remote</th>
+ <th>Remotable</th>
+ <th>Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ <c:forEach items="#{portletmgr.portlets}" var="portlet"
varStatus="status">
+ <tr class="#{status.index % 2 == 0 ? 'portlet-section-body'
: 'portlet-section-alternate'}">
+ <td>
+ <h:commandLink
+ action="#{portletmgr.selectPortlet}">
+ <f:param name="id"
value="#{portlet.context.id}"/>
+ <f:param name="plugin"
value="manager"/>
+ #{portlet.context.id}
+ </h:commandLink>
+ </td>
+ <td>#{portlet.name}</td>
+ <td><h:selectBooleanCheckbox disabled="true"
value="#{portlet.remote}"/></td>
+ <td><h:selectBooleanCheckbox disabled="true"
value="#{portlet.remotable}"/></td>
+ <td>
+ <h:commandLink action="#{portletmgr.selectPortlet}">
+ <f:param name="id"
value="#{portlet.context.id}"/>
+ <f:param name="plugin"
value="manager"/>
+ Info
+ </h:commandLink> | <h:commandLink
action="#{portletmgr.selectPortlet}">
+ <f:param name="id"
value="#{portlet.context.id}"/>
+ <f:param name="plugin"
value="preferences"/>
+ Preferences
+ </h:commandLink>
+ </td>
+ </tr>
+ </c:forEach>
+ </tbody>
+ </table>
+
+ </h:form>
+
+ <h:panelGroup
+ id="pg4"
+ rendered="#{portletmgr.selectedPortlet != null}">
+ <h:panelGroup
+ rendered="#{portletmgr.selectedPlugin == 'manager'}">
+ <ui:include
src="/WEB-INF/jsp/management/plugins/portlet/manager.xhtml"/>
+ </h:panelGroup>
+ <h:panelGroup
+ rendered="#{portletmgr.selectedPlugin == 'preferences'}">
+ <ui:include
src="/WEB-INF/jsp/management/common/editPreferences.xhtml">
+ <ui:param name="preferences"
value="#{portletmgr.selectedPreferences}"/>
+ </ui:include>
+ </h:panelGroup>
+ </h:panelGroup>
+
</ui:define>
</ui:composition>
</div>