Author: julien(a)jboss.com
Date: 2007-02-27 21:40:22 -0500 (Tue, 27 Feb 2007)
New Revision: 6450
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/PreferenceAction.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/instances.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/nodeNavigation.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/pageNavigation.xhtml
trunk/faces/src/main/org/jboss/portal/faces/matrix/AbstractCellAction.java
Log:
visual tweaks + done most of the portlet instances stuff with correct design
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java
===================================================================
---
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java 2007-02-28
00:59:30 UTC (rev 6449)
+++
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java 2007-02-28
02:40:22 UTC (rev 6450)
@@ -888,40 +888,40 @@
public String getPreviewURL()
{
- try
- {
- //set up the root node
- PortalNode root = Navigation.getCurrentNode();
- for (; root.getParent() != null;)
- {
- root = root.getParent();
- }
-
- //obtain the path to our node
- PortalObjectImpl object = (PortalObjectImpl)getSelectedObject();
- String path = object.getObjectNode().getPath();
-
- //iterate to our point
- String[] nodes = path.split("\\.");
- PortalNode dest = root;
-
- for (int i = 0; i < nodes.length; i++)
- {
- String s = nodes[i];
- dest = dest.getChild(s);
- }
-
- //generate url
- JBossRenderResponse response =
(JBossRenderResponse)FacesContext.getCurrentInstance().getExternalContext().getResponse();
- String url = response.createRenderURL(dest).toString();
- return url;
- }
- catch (Exception e)
- {
- log.info("Failed to generate object preview link");
- e.printStackTrace();
- }
- //in case it fails let's point to some nice page ;)
+// try
+// {
+// //set up the root node
+// PortalNode root = Navigation.getCurrentNode();
+// for (; root.getParent() != null;)
+// {
+// root = root.getParent();
+// }
+//
+// //obtain the path to our node
+// PortalObjectImpl object = (PortalObjectImpl)getSelectedObject();
+// String path = object.getObjectNode().getPath();
+//
+// //iterate to our point
+// String[] nodes = path.split("\\.");
+// PortalNode dest = root;
+//
+// for (int i = 0; i < nodes.length; i++)
+// {
+// String s = nodes[i];
+// dest = dest.getChild(s);
+// }
+//
+// //generate url
+// JBossRenderResponse response =
(JBossRenderResponse)FacesContext.getCurrentInstance().getExternalContext().getResponse();
+// String url = response.createRenderURL(dest).toString();
+// return url;
+// }
+// catch (Exception e)
+// {
+// log.info("Failed to generate object preview link");
+// e.printStackTrace();
+// }
+// //in case it fails let's point to some nice page ;)
return "http://www.jboss.org";
}
}
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/PreferenceAction.java
===================================================================
---
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/PreferenceAction.java 2007-02-28
00:59:30 UTC (rev 6449)
+++
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/PreferenceAction.java 2007-02-28
02:40:22 UTC (rev 6450)
@@ -149,7 +149,7 @@
manager.setSelectedRow(new Integer(rowIndex));
}
- public void deleteRow(Row row)
+ public void deleteRow(int rowIndex)
{
try
{
@@ -157,6 +157,9 @@
Instance instance = manager.getSelectedInstance();
//
+ Row row = manager.getSelectedPreferences().getModel().getRow(rowIndex);
+
+ //
String key = row.getHandback();
//
@@ -173,7 +176,6 @@
{
int selectedRow = manager.getSelectedRow().intValue();
RowSetModel model = manager.getSelectedPreferences().getModel();
- Row row = model.getRow(selectedRow);
- return row;
+ return model.getRow(selectedRow);
}
}
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
00:59:30 UTC (rev 6449)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/common/editPreferences.xhtml 2007-02-28
02:40:22 UTC (rev 6450)
@@ -5,68 +5,68 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jstl/core">
-<h:form>
- <h:dataTable value="#{preferences.model}" var="row"
styleClass="tableList">
- <h:column>
- <f:facet name="header">
- <h:outputText value="Key"/>
- </f:facet>
- <h:outputText value="#{row.key}"/>
- </h:column>
- <h:column>
- <f:facet name="header">
- <h:outputText value="Name"/>
- </f:facet>
- <h:outputText value="#{row.name}"/>
- </h:column>
- <h:column>
- <f:facet name="header">
- <h:outputText value="ReadOnly"/>
- </f:facet>
- <h:outputText value="#{row.readOnly}"/>
- </h:column>
- <h:column>
- <f:facet name="header">
- <h:outputText value="Actions"/>
- </f:facet>
- <h:commandLink
- rendered="#{row.cell.value != null and preferences.model.mutable}"
- action="#{action.selectRow}">Edit</h:commandLink> |
- <h:commandLink
- rendered="#{row.cell.value != null and preferences.model.mutable}"
- action="#{action.deleteCell}">Reset</h:commandLink>
- </h:column>
- <h:column>
- <f:facet name="header">
- <h:outputText value="Value"/>
- </f:facet>
- <h:outputText value="#{row.cell.description}"/>
- </h:column>
- </h:dataTable>
-</h:form>
-
-<c:if test="#{preferences.selectedPreference != null}">
<h:form>
- <h:dataTable
- id="string_values"
- var="row"
- value="#{preferences.selectedPreference.valueIndices}">
- <h:column>
- <h:outputLabel for="value_#{row}">
- <h:outputText value="Value #{row}: "
styleClass="portlet-form-field-label"/>
- </h:outputLabel>
- <h:inputText
value="#{preferences.selectedPreference.value[row]}"
styleClass="portlet-form-input-field"/>
- <h:commandButton id="value_#{row}"
action="#{action.deleteLine}" value="Delete"
styleClass="portlet-form-button"/>
- </h:column>
- </h:dataTable>
- <h:commandButton action="#{action.updateCell}"
value="Update" styleClass="portlet-form-button"/>
+ <table width="100%" border="0" cellspacing="0"
class="portlet-table-body">
+ <thead class="portlet-section-header"
style="text-align:left;">
+ <tr>
+ <th>Key</th>
+ <th>Name</th>
+ <th>ReadOnly</th>
+ <th>Actions</th>
+ <th>Value</th>
+ </tr>
+ </thead>
+ <tbody>
+ <c:forEach items="#{preferences.model.wrappedData}"
var="row" varStatus="status">
+ <tr class="#{status.index % 2 == 0 ?
'portlet-section-body' : 'portlet-section-alternate'}">
+ <td>
+ <h:outputText value="#{row.key}"/>
+ </td>
+ <td>
+ <h:outputText value="#{row.name}"/>
+ </td>
+ <td>
+ <h:outputText value="#{row.readOnly}"/>
+ </td>
+ <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>
+ </c:forEach>
+ </tbody>
+ </table>
</h:form>
- <h:form>
- <h:outputLabel for="new_value">
- <h:outputText value="New value: "
styleClass="portlet-form-field-label"/>
- </h:outputLabel>
- <h:inputText id="new_value" value="#{action.appendedValue}"
styleClass="portlet-form-input-field"/>
- <h:commandButton action="#{action.appendLine}"
value="Append" styleClass="portlet-form-button"/>
- </h:form>
-</c:if>
+
+ <c:if test="#{preferences.selectedPreference != null}">
+ <h:form>
+ <h:dataTable
+ id="string_values"
+ var="row"
+ value="#{preferences.selectedPreference.valueIndices}">
+ <h:column>
+ <h:outputLabel for="value_#{row}">
+ <h:outputText value="Value #{row}: "
styleClass="portlet-form-field-label"/>
+ </h:outputLabel>
+ <h:inputText
value="#{preferences.selectedPreference.value[row]}"
styleClass="portlet-form-input-field"/>
+ <h:commandButton id="value_#{row}"
action="#{action.deleteLine}" value="Delete"
styleClass="portlet-form-button"/>
+ </h:column>
+ </h:dataTable>
+ <h:commandButton action="#{action.updateCell}"
value="Update" styleClass="portlet-form-button"/>
+ </h:form>
+ <h:form>
+ <h:outputLabel for="new_value">
+ <h:outputText value="New value: "
styleClass="portlet-form-field-label"/>
+ </h:outputLabel>
+ <h:inputText id="new_value"
value="#{action.appendedValue}"
styleClass="portlet-form-input-field"/>
+ <h:commandButton action="#{action.appendLine}"
value="Append" styleClass="portlet-form-button"/>
+ </h:form>
+ </c:if>
</div>
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/instances.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/instances.xhtml 2007-02-28
00:59:30 UTC (rev 6449)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/instances.xhtml 2007-02-28
02:40:22 UTC (rev 6450)
@@ -11,34 +11,43 @@
<ui:define name="content">
<h:form>
- <h:dataTable id="instancesTable2"
value="#{instancemgr.instances}" var="instance"
styleClass="tableList" rows="15" rendered="#{not empty
instancemgr.instances}">
- <h:column>
- <f:facet name="header">Id</f:facet>
- <h:commandLink action="#{instancemgr.selectInstance}">
- <h:outputText value="#{instance.id}"/>
- <f:param name="id" value="#{instance.id}"/>
- <f:param name="plugin" value="info"/>
- </h:commandLink>
- </h:column>
- <h:column>
- <f:facet name="header">Actions</f:facet>
- <h:commandLink action="#{instancemgr.selectInstance}">
- <h:outputText value="Preferences"/>
- <f:param name="id" value="#{instance.id}"/>
- <f:param name="plugin" value="preferences"/>
- </h:commandLink> |
- <h:commandLink action="#{instancemgr.selectInstance}">
- <h:outputText value="Security"/>
- <f:param name="id" value="#{instance.id}"/>
- <f:param name="plugin" value="security"/>
- </h:commandLink> |
- <h:commandLink action="#{instancemgr.deleteInstance}">
- <h:outputText value="Destroy"/>
- <f:param name="id" value="#{instance.id}"/>
- </h:commandLink>
- </h:column>
- </h:dataTable>
- <jbp:scroller for="instancesTable2"
styleClass="portlet-form-button"/>
+
+ <table id="instancesTable2" width="100%" border="0"
cellspacing="0" class="portlet-table-body">
+ <thead class="portlet-section-header"
style="text-align:left;">
+ <tr>
+ <th>Id</th>
+ <th>Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ <c:forEach items="#{instancemgr.instances}"
var="instance" varStatus="status">
+ <tr class="#{status.index % 2 == 0 ? 'portlet-section-body'
: 'portlet-section-alternate'}">
+ <td>
+ <h:commandLink
action="#{instancemgr.selectInstance}">
+ <h:outputText value="#{instance.id}"/>
+ <f:param name="id"
value="#{instance.id}"/>
+ <f:param name="plugin" value="info"/>
+ </h:commandLink>
+ </td>
+ <td>
+ <h:commandLink
action="#{instancemgr.selectInstance}">
+ <h:outputText value="Preferences"/>
+ <f:param name="id"
value="#{instance.id}"/>
+ <f:param name="plugin"
value="preferences"/>
+ </h:commandLink> | <h:commandLink
action="#{instancemgr.selectInstance}">
+ <h:outputText value="Security"/>
+ <f:param name="id"
value="#{instance.id}"/>
+ <f:param name="plugin"
value="security"/>
+ </h:commandLink> | <h:commandLink
action="#{instancemgr.deleteInstance}">
+ <h:outputText value="Destroy"/>
+ <f:param name="id"
value="#{instance.id}"/>
+ </h:commandLink>
+ </td>
+ </tr>
+ </c:forEach>
+ </tbody>
+ </table>
+
</h:form>
<c:if test="#{instancemgr.selectedPlugin != null}">
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/nodeNavigation.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/nodeNavigation.xhtml 2007-02-28
00:59:30 UTC (rev 6449)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/nodeNavigation.xhtml 2007-02-28
02:40:22 UTC (rev 6450)
@@ -1,82 +1,124 @@
<div
-
xmlns="http://www.w3.org/1999/xhtml"
-
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="http://www.w3.org/1999/xhtml"
+
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:pfc="http://www.jboss.com/portal/facelet/common"
+
xmlns:c="http://java.sun.com/jstl/core">
<h:form>
- <h:dataTable value="#{portalobjectmgr.portalNodes}"
var="portal" styleClass="tableList" rendered="#{not empty
portalobjectmgr.portalNodes}">
- <h:column>
- <f:facet name="header"><h:outputText
value="Portal"/></f:facet>
- <h:commandLink action="#{portalobjectmgr.selectObject}">
- <h:outputText value="#{portal.name}"/>
- <f:param name="id" value="#{portal.id}"/>
- </h:commandLink>
- </h:column>
- <h:column>
- <f:facet name="header"><h:outputText
value="Actions"/></f:facet>
- <h:commandLink action="editPortalPreferences"
actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Edit"/>
- <f:param name="id" value="#{portal.id}"/>
- </h:commandLink> | <h:commandLink action="editPortalSecurity"
actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Security"/>
- <f:param name="id" value="#{portal.id}"/>
- </h:commandLink> | <h:commandLink action="editPortalTheme"
actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Theme"/>
- <f:param name="id" value="#{portal.id}"/>
- </h:commandLink> | <h:commandLink action="portals"
actionListener="#{portalobjectmgr.destroyObject}">
- <h:outputText value="Destroy"/>
- <f:param name="id" value="#{portal.id}"/>
- </h:commandLink>
- </h:column>
- </h:dataTable>
- <h:dataTable value="#{portalobjectmgr.pageNodes}" var="page"
styleClass="tableList" rendered="#{not empty
portalobjectmgr.pageNodes}">
- <h:column>
- <f:facet name="header"><h:outputText
value="Page"/></f:facet>
- <h:commandLink action="#{portalobjectmgr.selectObject}">
- <h:outputText value="#{page.name}"/>
- <f:param name="id" value="#{page.id}"/>
- </h:commandLink>
- </h:column>
- <h:column>
- <f:facet name="header"><h:outputText
value="Actions"/></f:facet>
- <h:commandLink action="editPageLayout"
actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Layout"/>
- <f:param name="id" value="#{page.id}"/>
- </h:commandLink> | <h:commandLink action="editPageSecurity"
actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Security"/>
- <f:param name="id" value="#{page.id}"/>
- </h:commandLink> | <h:commandLink action="editPageTheme"
actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Theme"/>
- <f:param name="id" value="#{page.id}"/>
- </h:commandLink> | <h:commandLink action="pages"
actionListener="#{portalobjectmgr.destroyObject}">
- <h:outputText value="Destroy"/>
- <f:param name="id" value="#{page.id}"/>
- </h:commandLink>
- </h:column>
- </h:dataTable>
+ <c:if test="#{not empty portalobjectmgr.portalNodes}">
+ <table width="100%" border="0" cellspacing="0"
class="portlet-table-body">
+ <thead class="portlet-section-header"
style="text-align:left;">
+ <tr>
+ <th>Portal</th>
+ <th>Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ <c:forEach items="#{portalobjectmgr.portalNodes}"
var="object" varStatus="status">
+ <tr class="#{status.index % 2 == 0 ?
'portlet-section-body' : 'portlet-section-alternate'}">
+ <td>
+ <h:commandLink
action="#{portalobjectmgr.selectObject}">
+ <h:outputText value="#{object.name}"/>
+ <f:param name="id"
value="#{object.id}"/>
+ </h:commandLink>
+ </td>
+ <td>
+ <h:commandLink action="editPortalPreferences"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Edit"/>
+ <f:param name="id"
value="#{object.id}"/>
+ </h:commandLink> | <h:commandLink
action="editPortalSecurity"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Security"/>
+ <f:param name="id"
value="#{object.id}"/>
+ </h:commandLink> | <h:commandLink
action="editPortalTheme"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Theme"/>
+ <f:param name="id"
value="#{object.id}"/>
+ </h:commandLink> | <h:commandLink
action="portals"
actionListener="#{portalobjectmgr.destroyObject}">
+ <h:outputText value="Destroy"/>
+ <f:param name="id"
value="#{object.id}"/>
+ </h:commandLink>
+ </td>
+ </tr>
+ </c:forEach>
+ </tbody>
+ </table>
+ </c:if>
- <h:dataTable value="#{portalobjectmgr.windowNodes}"
var="window" styleClass="tableList" rendered="#{not empty
portalobjectmgr.windowNodes}">
- <h:column>
- <f:facet name="header"><h:outputText
value="Window"/></f:facet>
- <h:outputText value="#{window.name}"/>
- </h:column>
- <h:column>
- <f:facet name="header"><h:outputText
value="Actions"/></f:facet>
- <h:commandLink action="editWindowPreferences"
actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Edit"/>
- <f:param name="id" value="#{window.id}"/>
- </h:commandLink> | <h:commandLink action="editWindowTheme"
actionListener="#{portalobjectmgr.selectObject}">
- <h:outputText value="Theme"/>
- <f:param name="id" value="#{window.id}"/>
- </h:commandLink> | <h:commandLink action="windows"
actionListener="#{portalobjectmgr.destroyObject}">
- <h:outputText value="Destroy"/>
- <f:param name="id" value="#{window.id}"/>
- </h:commandLink>
- </h:column>
- </h:dataTable>
+ <c:if test="#{not empty portalobjectmgr.pageNodes}">
+ <table width="100%" border="0" cellspacing="0"
class="portlet-table-body">
+ <thead class="portlet-section-header"
style="text-align:left;">
+ <tr>
+ <th>Page</th>
+ <th>Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ <c:forEach items="#{portalobjectmgr.pageNodes}"
var="object" varStatus="status">
+ <tr class="#{status.index % 2 == 0 ?
'portlet-section-body' : 'portlet-section-alternate'}">
+ <td>
+ <h:commandLink
action="#{portalobjectmgr.selectObject}">
+ <h:outputText value="#{object.name}"/>
+ <f:param name="id"
value="#{object.id}"/>
+ </h:commandLink>
+ </td>
+ <td>
+ <h:commandLink action="editPageLayout"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Layout"/>
+ <f:param name="id"
value="#{object.id}"/>
+ </h:commandLink> | <h:commandLink
action="editPageSecurity"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Security"/>
+ <f:param name="id"
value="#{object.id}"/>
+ </h:commandLink> | <h:commandLink
action="editPageTheme"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Theme"/>
+ <f:param name="id"
value="#{object.id}"/>
+ </h:commandLink> | <h:commandLink
action="pages" actionListener="#{portalobjectmgr.destroyObject}">
+ <h:outputText value="Destroy"/>
+ <f:param name="id"
value="#{object.id}"/>
+ </h:commandLink>
+ </td>
+ </tr>
+ </c:forEach>
+ </tbody>
+ </table>
+ </c:if>
+ <c:if test="#{not empty portalobjectmgr.windowNodes}">
+ <table width="100%" border="0" cellspacing="0"
class="portlet-table-body">
+ <thead class="portlet-section-header"
style="text-align:left;">
+ <tr>
+ <th>Page</th>
+ <th>Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ <c:forEach items="#{portalobjectmgr.windowNodes}"
var="object" varStatus="status">
+ <tr class="#{status.index % 2 == 0 ?
'portlet-section-body' : 'portlet-section-alternate'}">
+ <td>
+ <h:commandLink
action="#{portalobjectmgr.selectObject}">
+ <h:outputText value="#{object.name}"/>
+ <f:param name="id"
value="#{object.id}"/>
+ </h:commandLink>
+ </td>
+ <td>
+ <h:commandLink action="editWindowPreferences"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Edit"/>
+ <f:param name="id"
value="#{object.id}"/>
+ </h:commandLink> | <h:commandLink
action="editWindowTheme"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Theme"/>
+ <f:param name="id"
value="#{object.id}"/>
+ </h:commandLink> | <h:commandLink
action="windows"
actionListener="#{portalobjectmgr.destroyObject}">
+ <h:outputText value="Destroy"/>
+ <f:param name="id"
value="#{object.id}"/>
+ </h:commandLink>
+ </td>
+ </tr>
+ </c:forEach>
+ </tbody>
+ </table>
+ </c:if>
+
</h:form>
</div>
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/pageNavigation.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/pageNavigation.xhtml 2007-02-28
00:59:30 UTC (rev 6449)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/pageNavigation.xhtml 2007-02-28
02:40:22 UTC (rev 6450)
@@ -13,10 +13,8 @@
<h:inputText id="name" value="#{addPageAction.pageName}"
validator="#{addPageAction.validatePageName}"
required="true"/>
- <h:commandButton action="#{addPageAction.execute}" value="Add
portal page" styleClass="portlet-form-button"/>
+ <h:commandButton action="#{addPageAction.execute}" value="Add
page" styleClass="portlet-form-button"/>
<h:message for="name" style="color: red"/>
</h:form>
- <h:outputLink value="#{portalobjectmgr.previewURL}" title="Preview
link" target="_blank">Preview link</h:outputLink>
-
</div>
Modified: trunk/faces/src/main/org/jboss/portal/faces/matrix/AbstractCellAction.java
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/matrix/AbstractCellAction.java 2007-02-28
00:59:30 UTC (rev 6449)
+++ trunk/faces/src/main/org/jboss/portal/faces/matrix/AbstractCellAction.java 2007-02-28
02:40:22 UTC (rev 6450)
@@ -24,6 +24,7 @@
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;
+import java.util.Map;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -72,21 +73,22 @@
public void selectRow()
{
FacesContext ctx = FacesContext.getCurrentInstance();
- ValueBinding vb1 = ctx.getApplication().createValueBinding("#{row}");
- Row row = (Row)vb1.getValue(ctx);
- int rowIndex = row.getIndex();
+ Map params = ctx.getExternalContext().getRequestParameterMap();
+ String rowString = (String)params.get("row");
+ int rowIndex = Integer.parseInt(rowString);
selectRow(rowIndex);
}
public void deleteCell()
{
FacesContext ctx = FacesContext.getCurrentInstance();
- ValueBinding vb1 = ctx.getApplication().createValueBinding("#{row}");
- Row row = (Row)vb1.getValue(ctx);
- deleteRow(row);
+ Map params = ctx.getExternalContext().getRequestParameterMap();
+ String rowString = (String)params.get("row");
+ int rowIndex = Integer.parseInt(rowString);
+ deleteRow(rowIndex);
}
- public abstract void deleteRow(Row row);
+ public abstract void deleteRow(int rowIndex);
public abstract void selectRow(int rowIndex);