JBoss Portal SVN: r7520 - in trunk: core-admin/src/main/org/jboss/portal/core/admin/ui/actions and 4 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-06-24 18:30:34 -0400 (Sun, 24 Jun 2007)
New Revision: 7520
Added:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ThemeBean.java
Removed:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/ThemePropertyAction.java
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editTheme.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editWindowTheme.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboards.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPageTheme.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPortalTheme.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editWindowTheme.xhtml
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaWindowRenderer.java
Log:
- renamed ThemeProperyAction -> ThemeBean
- attached the ThemeBean to PortalObjectManager
- use the editTheme for editing the default theme values of the dashboards
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-06-24 21:17:49 UTC (rev 7519)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-06-24 22:30:34 UTC (rev 7520)
@@ -149,6 +149,9 @@
private PortletInvoker portletDefinitionInvoker;
/** . */
+ private ThemeBean theme;
+
+ /** . */
public PageManagerBean pageManager;
// Wired services
@@ -343,6 +346,11 @@
return selectedProperties;
}
+ public ThemeBean getTheme()
+ {
+ return theme;
+ }
+
// UI operations
public void selectObject(PortalObject po)
@@ -487,6 +495,7 @@
selectedObject = null;
selectedProperties = null;
controlProperties = null;
+ theme = null;
//
if (selectedId == null)
@@ -513,6 +522,9 @@
propertyAction = new PropertyAction(this);
//
+ theme = new ThemeBean(selectedObject);
+
+ //
Collection pages = getSelectedObject().getChildren(PortalObject.PAGE_MASK);
ArrayList list = new ArrayList(pages.size() + 1);
for (Iterator iterator = pages.iterator(); iterator.hasNext();)
Copied: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ThemeBean.java (from rev 7515, trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/ThemePropertyAction.java)
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ThemeBean.java (rev 0)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ThemeBean.java 2007-06-24 22:30:34 UTC (rev 7520)
@@ -0,0 +1,192 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.core.admin.ui;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.AbortProcessingException;
+
+import org.jboss.portal.core.model.portal.PortalObject;
+import org.jboss.portal.theme.ThemeConstants;
+
+/**
+ * @author <a href="mailto:mholzner@novell.com">Martin Holzner</a>
+ * @version $Revision: 5448 $
+ */
+public class ThemeBean
+{
+
+ /** . */
+ private final PortalObject portalObject;
+
+ /** . */
+ private String layoutName;
+
+ /** . */
+ private String themeName;
+
+ /** . */
+ private String renderSetName;
+
+ /** . */
+ private String windowRendererName;
+
+ /** . */
+ private String decorationRendererName;
+
+ /** . */
+ private String portletRendererName;
+
+
+ public ThemeBean(PortalObject portalObject)
+ {
+ this.portalObject = portalObject;
+ this.layoutName = portalObject.getDeclaredProperty(ThemeConstants.PORTAL_PROP_LAYOUT);
+ this.themeName = portalObject.getDeclaredProperty(ThemeConstants.PORTAL_PROP_THEME);
+ this.renderSetName = portalObject.getDeclaredProperty(ThemeConstants.PORTAL_PROP_RENDERSET);
+ this.windowRendererName = portalObject.getDeclaredProperty(ThemeConstants.PORTAL_PROP_WINDOW_RENDERER);
+ this.decorationRendererName = portalObject.getDeclaredProperty(ThemeConstants.PORTAL_PROP_DECORATION_RENDERER);
+ this.portletRendererName = portalObject.getDeclaredProperty(ThemeConstants.PORTAL_PROP_PORTLET_RENDERER);
+ }
+
+ public PortalObject getPortalObject()
+ {
+ return portalObject;
+ }
+
+ public String getLayoutName()
+ {
+ return layoutName;
+ }
+
+ public void setLayoutName(String layoutName)
+ {
+ this.layoutName = "".equals(layoutName) ? null : layoutName;
+ }
+
+ public String getThemeName()
+ {
+ return themeName;
+ }
+
+ public void setThemeName(String themeName)
+ {
+ this.themeName = "".equals(themeName) ? null : themeName;
+ }
+
+ public String getRenderSetName()
+ {
+ return renderSetName;
+ }
+
+ public void setRenderSetName(String renderSetName)
+ {
+ this.renderSetName = "".equals(renderSetName) ? null : renderSetName;
+ }
+
+ public String getWindowRendererName()
+ {
+ return windowRendererName;
+ }
+
+ public void setWindowRendererName(String windowRendererName)
+ {
+ this.windowRendererName = "".equals(windowRendererName) ? null : windowRendererName;
+ }
+
+ public String getDecorationRendererName()
+ {
+ return decorationRendererName;
+ }
+
+ public void setDecorationRendererName(String decorationRendererName)
+ {
+ this.decorationRendererName = "".equals(decorationRendererName) ? null : decorationRendererName;
+ }
+
+ public String getPortletRendererName()
+ {
+ return portletRendererName;
+ }
+
+ public void setPortletRendererName(String portletRendererName)
+ {
+ this.portletRendererName = "".equals(portletRendererName) ? null : portletRendererName;
+ }
+
+ public void execute(ActionEvent actionEvent) throws AbortProcessingException
+ {
+ boolean successful = true;
+
+ //
+ switch(portalObject.getType())
+ {
+ case PortalObject.TYPE_CONTEXT:
+ case PortalObject.TYPE_PORTAL:
+ case PortalObject.TYPE_PAGE:
+ portalObject.setDeclaredProperty(ThemeConstants.PORTAL_PROP_LAYOUT, this.layoutName);
+ portalObject.setDeclaredProperty(ThemeConstants.PORTAL_PROP_THEME, this.themeName);
+ portalObject.setDeclaredProperty(ThemeConstants.PORTAL_PROP_RENDERSET, this.renderSetName);
+ break;
+ case PortalObject.TYPE_WINDOW:
+ portalObject.setDeclaredProperty(ThemeConstants.PORTAL_PROP_WINDOW_RENDERER, this.windowRendererName);
+ portalObject.setDeclaredProperty(ThemeConstants.PORTAL_PROP_DECORATION_RENDERER, this.decorationRendererName);
+ portalObject.setDeclaredProperty(ThemeConstants.PORTAL_PROP_PORTLET_RENDERER, this.portletRendererName);
+ break;
+ default:
+ successful = false;
+ }
+
+ //
+ if (successful)
+ {
+ String stringMessage = null;
+ switch(this.portalObject.getType())
+ {
+ case PortalObject.TYPE_PORTAL:
+ stringMessage = "Theme has been correctly updated on the portal named: " + portalObject.getName();
+ break;
+ case PortalObject.TYPE_PAGE:
+ stringMessage = "Theme has been correctly updated on the page named: " + portalObject.getName();
+ break;
+ case PortalObject.TYPE_WINDOW:
+ stringMessage = "Theme has been correctly updated on the window named: " + portalObject.getName();
+ break;
+ }
+
+ //
+ if (stringMessage != null)
+ {
+ FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, stringMessage, stringMessage);
+ FacesContext.getCurrentInstance().addMessage("status", message);
+ }
+ }
+ else
+ {
+ String stringMessage = "Unknown object type, please file a Jira issue: http://jira.jboss.org";
+ FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, stringMessage, stringMessage);
+ FacesContext.getCurrentInstance().addMessage("error", message);
+ }
+ }
+}
Property changes on: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ThemeBean.java
___________________________________________________________________
Name: svn:executable
+ *
Deleted: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/ThemePropertyAction.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/ThemePropertyAction.java 2007-06-24 21:17:49 UTC (rev 7519)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/ThemePropertyAction.java 2007-06-24 22:30:34 UTC (rev 7520)
@@ -1,191 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.core.admin.ui.actions;
-
-import javax.faces.application.FacesMessage;
-import javax.faces.context.FacesContext;
-
-import org.jboss.portal.core.model.portal.PortalObject;
-import org.jboss.portal.theme.ThemeConstants;
-
-/**
- * @author <a href="mailto:mholzner@novell.com">Martin Holzner</a>
- * @version $Revision: 5448 $
- */
-public class ThemePropertyAction
-{
-
- /** . */
- private PortalObject portalObject;
-
- /** . */
- private String layoutName;
-
- /** . */
- private String themeName;
-
- /** . */
- private String renderSetName;
-
- /** . */
- private String windowRendererName;
-
- /** . */
- private String decorationRendererName;
-
- /** . */
- private String portletRendererName;
-
-
- public PortalObject getPortalObject()
- {
- return portalObject;
- }
-
- public void setPortalObject(PortalObject portalObject)
- {
- this.portalObject = portalObject;
- this.layoutName = portalObject.getDeclaredProperty(ThemeConstants.PORTAL_PROP_LAYOUT);
- this.themeName = portalObject.getDeclaredProperty(ThemeConstants.PORTAL_PROP_THEME);
- this.renderSetName = portalObject.getDeclaredProperty(ThemeConstants.PORTAL_PROP_RENDERSET);
- this.windowRendererName = portalObject.getDeclaredProperty(ThemeConstants.PORTAL_PROP_WINDOW_RENDERER);
- this.decorationRendererName = portalObject.getDeclaredProperty(ThemeConstants.PORTAL_PROP_DECORATION_RENDERER);
- this.portletRendererName = portalObject.getDeclaredProperty(ThemeConstants.PORTAL_PROP_PORTLET_RENDERER);
- }
-
- public String getLayoutName()
- {
- return layoutName;
- }
-
- public String getThemeName()
- {
- return themeName;
- }
-
- public String getRenderSetName()
- {
- return renderSetName;
- }
-
- public String getWindowRendererName()
- {
- return windowRendererName;
- }
-
- public String getDecorationRendererName()
- {
- return decorationRendererName;
- }
-
- public String getPortletRendererName()
- {
- return portletRendererName;
- }
-
- public void setLayoutName(String layoutName)
- {
- this.layoutName = "".equals(layoutName) ? null : layoutName;
- }
-
- public void setThemeName(String themeName)
- {
- this.themeName = "".equals(themeName) ? null : themeName;
- }
-
- public void setRenderSetName(String renderSetName)
- {
- this.renderSetName = "".equals(renderSetName) ? null : renderSetName;
- }
-
- public void setWindowRendererName(String windowRendererName)
- {
- this.windowRendererName = "".equals(windowRendererName) ? null : windowRendererName;
- }
-
- public void setDecorationRendererName(String decorationRendererName)
- {
- this.decorationRendererName = "".equals(decorationRendererName) ? null : decorationRendererName;
- }
-
- public void setPortletRendererName(String portletRendererName)
- {
- this.portletRendererName = "".equals(portletRendererName) ? null : portletRendererName;
- }
-
- public String execute()
- {
- boolean successful = true;
-
- //
- switch(portalObject.getType())
- {
- case PortalObject.TYPE_PORTAL:
- case PortalObject.TYPE_PAGE:
- portalObject.setDeclaredProperty(ThemeConstants.PORTAL_PROP_LAYOUT, this.layoutName);
- portalObject.setDeclaredProperty(ThemeConstants.PORTAL_PROP_THEME, this.themeName);
- portalObject.setDeclaredProperty(ThemeConstants.PORTAL_PROP_RENDERSET, this.renderSetName);
- break;
- case PortalObject.TYPE_WINDOW:
- portalObject.setDeclaredProperty(ThemeConstants.PORTAL_PROP_WINDOW_RENDERER, this.windowRendererName);
- portalObject.setDeclaredProperty(ThemeConstants.PORTAL_PROP_DECORATION_RENDERER, this.decorationRendererName);
- portalObject.setDeclaredProperty(ThemeConstants.PORTAL_PROP_PORTLET_RENDERER, this.portletRendererName);
- break;
- default:
- successful = false;
- }
-
- //
- if (successful)
- {
- String stringMessage = null;
- switch(this.portalObject.getType())
- {
- case PortalObject.TYPE_PORTAL:
- stringMessage = "Theme has been correctly updated on the portal named: " + portalObject.getName();
- break;
- case PortalObject.TYPE_PAGE:
- stringMessage = "Theme has been correctly updated on the page named: " + portalObject.getName();
- break;
- case PortalObject.TYPE_WINDOW:
- stringMessage = "Theme has been correctly updated on the window named: " + portalObject.getName();
- break;
- }
-
- //
- if (stringMessage != null)
- {
- FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, stringMessage, stringMessage);
- FacesContext.getCurrentInstance().addMessage("status", message);
- }
- }
- else
- {
- String stringMessage = "Unknown object type, please file a Jira issue: http://jira.jboss.org";
- FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, stringMessage, stringMessage);
- FacesContext.getCurrentInstance().addMessage("error", message);
- }
-
- return "objects";
- }
-}
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-06-24 21:17:49 UTC (rev 7519)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-06-24 22:30:34 UTC (rev 7520)
@@ -103,15 +103,6 @@
</managed-property>
</managed-bean>
<managed-bean>
- <managed-bean-name>themePropertyAction</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.admin.ui.actions.ThemePropertyAction</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- <managed-property>
- <property-name>portalObject</property-name>
- <value>#{sessionScope.portalobjectmgr.selectedObject}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
<managed-bean-name>assignContentToWindowAction</managed-bean-name>
<managed-bean-class>org.jboss.portal.core.admin.ui.actions.AssignContentToWindowAction</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editTheme.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editTheme.xhtml 2007-06-24 21:17:49 UTC (rev 7519)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editTheme.xhtml 2007-06-24 22:30:34 UTC (rev 7520)
@@ -13,7 +13,7 @@
<h:outputLabel for="layout">Layout:</h:outputLabel>
</td>
<td>
- <h:selectOneMenu id="layout" styleClass="portlet-form-field" value="#{themePropertyAction.layoutName}">
+ <h:selectOneMenu id="layout" styleClass="portlet-form-field" value="#{theme.layoutName}">
<f:selectItems value="#{applicationScope.LayoutService.layoutItems}"/>
</h:selectOneMenu>
</td>
@@ -23,7 +23,7 @@
<h:outputLabel for="theme">Theme:</h:outputLabel>
</td>
<td>
- <h:selectOneMenu id="theme" styleClass="portlet-form-field" value="#{themePropertyAction.themeName}">
+ <h:selectOneMenu id="theme" styleClass="portlet-form-field" value="#{theme.themeName}">
<f:selectItems value="#{applicationScope.ThemeService.themeItems}"/>
</h:selectOneMenu>
</td>
@@ -33,17 +33,17 @@
<h:outputLabel for="renderSet">RenderSet:</h:outputLabel>
</td>
<td>
- <h:selectOneMenu id="renderSet" styleClass="portlet-form-field" value="#{themePropertyAction.renderSetName}">
+ <h:selectOneMenu id="renderSet" styleClass="portlet-form-field" value="#{theme.renderSetName}">
<f:selectItems value="#{applicationScope.LayoutService.renderSetItems}"/>
</h:selectOneMenu>
</td>
</tr>
</tbody>
</table>
-
+
<br />
<ui:insert name="form_submit"/>
</h:form>
-</h:panelGroup>
+ </h:panelGroup>
</div>
\ No newline at end of file
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editWindowTheme.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editWindowTheme.xhtml 2007-06-24 21:17:49 UTC (rev 7519)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editWindowTheme.xhtml 2007-06-24 22:30:34 UTC (rev 7520)
@@ -14,7 +14,7 @@
<td class="portlet-form-field-label"><label class="portlet-form-field-label">Window Renderer:</label>
</td>
<td>
- <h:selectOneMenu styleClass="portlet-form-field" value="#{themePropertyAction.windowRendererName}">
+ <h:selectOneMenu styleClass="portlet-form-field" value="#{theme.windowRendererName}">
<f:selectItems value="#{applicationScope.LayoutService.renderSetItems}"/>
</h:selectOneMenu>
</td>
@@ -23,7 +23,7 @@
<td class="portlet-form-field-label"><label class="portlet-form-field-label">Decoration Renderer:</label>
</td>
<td>
- <h:selectOneMenu styleClass="portlet-form-field" value="#{themePropertyAction.decorationRendererName}">
+ <h:selectOneMenu styleClass="portlet-form-field" value="#{theme.decorationRendererName}">
<f:selectItems value="#{applicationScope.LayoutService.renderSetItems}"/>
</h:selectOneMenu>
</td>
@@ -32,7 +32,7 @@
<td class="portlet-form-field-label"><label class="portlet-form-field-label">Portlet Renderer:</label>
</td>
<td>
- <h:selectOneMenu styleClass="portlet-form-field" value="#{themePropertyAction.portletRendererName}">
+ <h:selectOneMenu styleClass="portlet-form-field" value="#{theme.portletRendererName}">
<f:selectItems value="#{applicationScope.LayoutService.renderSetItems}"/>
</h:selectOneMenu>
</td>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboards.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboards.xhtml 2007-06-24 21:17:49 UTC (rev 7519)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboards.xhtml 2007-06-24 22:30:34 UTC (rev 7520)
@@ -16,6 +16,13 @@
<ui:param name="properties" value="#{dashboardmgr.controlProperties}"/>
</ui:include>
+ <ui:decorate template="common/editTheme.xhtml">
+ <ui:param name="theme" value="#{dashboardmgr.theme}"/>
+ <ui:define name="form_submit">
+ <h:commandButton value="Update" actionListener="#{dashboardmgr.theme.execute}" styleClass="portlet-form-button"/>
+ </ui:define>
+ </ui:decorate>
+
</ui:define>
</ui:composition>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPageTheme.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPageTheme.xhtml 2007-06-24 21:17:49 UTC (rev 7519)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPageTheme.xhtml 2007-06-24 22:30:34 UTC (rev 7520)
@@ -7,8 +7,9 @@
<ui:define name="content">
<h3>Page theme properties:</h3>
<ui:decorate template="common/editTheme.xhtml">
+ <ui:param name="theme" value="#{portalobjectmgr.theme}"/>
<ui:define name="form_submit">
- <h:commandButton value="Update" action="#{themePropertyAction.execute}" styleClass="portlet-form-button"/>
+ <h:commandButton value="Update" action="objects" actionListener="#{portalobjectmgr.theme.execute}" styleClass="portlet-form-button"/>
<h:commandButton value="Cancel" action="#{portalobjectmgr.selectObject}" styleClass="portlet-form-button">
<f:param name="id" value="#{node.id}"/>
</h:commandButton>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPortalTheme.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPortalTheme.xhtml 2007-06-24 21:17:49 UTC (rev 7519)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPortalTheme.xhtml 2007-06-24 22:30:34 UTC (rev 7520)
@@ -11,8 +11,9 @@
<p>The settings defined here will be applied to the whole portal including all the pages and windows unless they have been assigned with different settings</p>
<br/>
<ui:decorate template="common/editTheme.xhtml">
+ <ui:param name="theme" value="#{portalobjectmgr.theme}"/>
<ui:define name="form_submit">
- <h:commandButton value="Update" action="#{themePropertyAction.execute}" styleClass="portlet-form-button"/>
+ <h:commandButton value="Update" action="objects" actionListener="#{portalobjectmgr.theme.execute}" styleClass="portlet-form-button"/>
<h:commandButton value="Cancel" action="#{portalobjectmgr.selectObject}" styleClass="portlet-form-button">
<f:param name="id" value="#{node.id}"/>
</h:commandButton>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editWindowTheme.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editWindowTheme.xhtml 2007-06-24 21:17:49 UTC (rev 7519)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editWindowTheme.xhtml 2007-06-24 22:30:34 UTC (rev 7520)
@@ -7,8 +7,9 @@
<ui:define name="content">
<h3>Window theme properties:</h3>
<ui:decorate template="common/editWindowTheme.xhtml">
+ <ui:param name="theme" value="#{portalobjectmgr.theme}"/>
<ui:define name="form_submit">
- <h:commandButton value="Update" action="#{themePropertyAction.execute}" styleClass="portlet-form-button"/>
+ <h:commandButton value="Update" action="objects" actionListener="#{portalobjectmgr.theme.execute}" styleClass="portlet-form-button"/>
<h:commandButton value="Cancel" action="#{portalobjectmgr.selectObject}" styleClass="portlet-form-button">
<f:param name="id" value="#{node.id}"/>
</h:commandButton>
Modified: trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaWindowRenderer.java
===================================================================
--- trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaWindowRenderer.java 2007-06-24 21:17:49 UTC (rev 7519)
+++ trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaWindowRenderer.java 2007-06-24 22:30:34 UTC (rev 7520)
@@ -57,8 +57,15 @@
/** @see org.jboss.portal.theme.render.renderer.WindowRenderer#render */
public void render(RendererContext rendererContext, WindowRendererContext wrc) throws RenderException
{
- final DynaRenderOptions regionOptions = (DynaRenderOptions)rendererContext.getAttribute(DynaConstants.RENDER_OPTIONS);
+ // Get render options
+ DynaRenderOptions parentOptions = (DynaRenderOptions)rendererContext.getAttribute(DynaConstants.RENDER_OPTIONS);
+ // It could be null if the parent renderers are not dyna renderers
+ if (parentOptions == null)
+ {
+ parentOptions = DynaRenderOptions.NO_AJAX;
+ }
+
//
try
{
@@ -67,14 +74,14 @@
DynaRenderOptions windowOptions = DynaRenderOptions.getOptions(dndValue, partialRefreshValue);
//
- DynaRenderOptions options = DynaMergeBehavior.mergeForWindow(regionOptions, windowOptions);
+ DynaRenderOptions options = DynaMergeBehavior.mergeForWindow(parentOptions, windowOptions);
rendererContext.setAttribute(DynaConstants.RENDER_OPTIONS, options);
//
PrintWriter out = rendererContext.getWriter();
//
- if (!DynaRenderOptions.NO_AJAX.equals(regionOptions))
+ if (!DynaRenderOptions.NO_AJAX.equals(parentOptions))
{
out.print("<div class=\"dyna-window\">");
out.print("<div id=\"");
@@ -118,7 +125,7 @@
}
finally
{
- rendererContext.setAttribute(DynaConstants.RENDER_OPTIONS, regionOptions);
+ rendererContext.setAttribute(DynaConstants.RENDER_OPTIONS, parentOptions);
}
}
}
18 years, 10 months
JBoss Portal SVN: r7519 - in trunk/core-admin/src: main/org/jboss/portal/core/admin/ui/actions and 2 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-06-24 17:17:49 -0400 (Sun, 24 Jun 2007)
New Revision: 7519
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyInfo.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PropertyAction.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml
Log:
- make the PropertyAction bean lifecycle managed by the PortalObjectManager in order to get it attached to the right POMGR and have the capability to edit dashboard properties
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-06-23 22:23:07 UTC (rev 7518)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-06-24 21:17:49 UTC (rev 7519)
@@ -39,6 +39,7 @@
import javax.faces.model.SelectItem;
import org.jboss.portal.core.admin.ui.actions.AddPageAction;
+import org.jboss.portal.core.admin.ui.actions.PropertyAction;
import org.jboss.portal.core.admin.ui.common.PageManagerBean;
import org.jboss.portal.core.admin.ui.portlet.PortletDefinitionInvoker;
import org.jboss.portal.core.impl.model.content.ContentProviderRegistryService;
@@ -139,6 +140,9 @@
private PropertiesBean selectedProperties;
/** . */
+ PropertyAction propertyAction;
+
+ /** . */
private ControlPropertiesBean controlProperties;
/** . */
@@ -182,11 +186,6 @@
return types;
}
-// public ContentEditorRegistry getContentEditors()
-// {
-// return ContentEditorRegistry.getInstance();
-// }
-
public String getSelectedContentEditorInstance()
{
if (selectedContentType != null)
@@ -481,6 +480,7 @@
public void refresh()
{
+ propertyAction = null;
instanceItems = null;
portalPageItems = null;
selectedObjectPath = null;
@@ -509,9 +509,8 @@
//
selectedProperties = new PropertiesBean(this);
-
- //
controlProperties = new ControlPropertiesBean(this);
+ propertyAction = new PropertyAction(this);
//
Collection pages = getSelectedObject().getChildren(PortalObject.PAGE_MASK);
@@ -706,5 +705,4 @@
{
return controlProperties;
}
-
}
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java 2007-06-23 22:23:07 UTC (rev 7518)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java 2007-06-24 21:17:49 UTC (rev 7519)
@@ -23,8 +23,11 @@
package org.jboss.portal.core.admin.ui;
import org.jboss.portal.core.model.portal.PortalObject;
+import org.jboss.portal.core.admin.ui.actions.PropertyAction;
import javax.faces.model.SelectItem;
+import javax.faces.context.FacesContext;
+import javax.faces.el.VariableResolver;
import java.util.ArrayList;
import java.util.List;
import java.util.Iterator;
@@ -44,17 +47,20 @@
private final SortedMap entryMap;
/** . */
- final PortalObjectManagerBean pomgr;
+ private final PortalObjectManagerBean pomgr;
/** . */
private final PropertiesInfo info;
/** . */
- int selectedIndex;
+ private int selectedIndex;
/** . */
private List items;
+ /** . */
+ private String propertyActionRef;
+
public PropertiesBean(PortalObjectManagerBean pomgr)
{
// Get the selected object
@@ -153,4 +159,9 @@
{
return pomgr.getSelectedObject();
}
+
+ public PropertyAction getAction()
+ {
+ return pomgr.propertyAction;
+ }
}
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyInfo.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyInfo.java 2007-06-23 22:23:07 UTC (rev 7518)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyInfo.java 2007-06-24 21:17:49 UTC (rev 7519)
@@ -47,22 +47,22 @@
public static final int READ_WRITE_ACCESS_MODE = 1;
/** . */
- private String name;
+ private final String name;
/** . */
- private int accessMode;
+ private final int accessMode;
/** . */
- private String type;
+ private final String type;
/** . */
- private LocalizedString displayName;
+ private final LocalizedString displayName;
/** . */
- private LocalizedString description;
+ private final LocalizedString description;
/** . */
- private int scope;
+ private final int scope;
public PropertyInfo(String name, LocalizedString displayName, LocalizedString description, String type, int accessMode, int scope)
{
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PropertyAction.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PropertyAction.java 2007-06-23 22:23:07 UTC (rev 7518)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/PropertyAction.java 2007-06-24 21:17:49 UTC (rev 7519)
@@ -56,16 +56,11 @@
/** . */
private static final String ERROR_EMPTY_NAME = "Property name cannot be blank!";
- public PortalObjectManagerBean getPortalObjectManager()
+ public PropertyAction(PortalObjectManagerBean pomgr)
{
- return pomgr;
+ this.pomgr = pomgr;
}
- public void setPortalObjectManager(PortalObjectManagerBean portalObjectManager)
- {
- this.pomgr = portalObjectManager;
- }
-
public String getSelectedProperty()
{
return selectedProperty;
@@ -107,7 +102,7 @@
{
Map pmap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
String name = (String)pmap.get("name");
- ((PortalObjectImpl)getPortalObjectManager().getSelectedObject()).getDeclaredPropertyMap().remove(name);
+ ((PortalObjectImpl)pomgr.getSelectedObject()).getDeclaredPropertyMap().remove(name);
}
public void updateProperty()
@@ -128,7 +123,7 @@
{
value = "";
}
- getPortalObjectManager().getSelectedObject().setDeclaredProperty(propertyName, value);
+ pomgr.getSelectedObject().setDeclaredProperty(propertyName, value);
}
}
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-06-23 22:23:07 UTC (rev 7518)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-06-24 21:17:49 UTC (rev 7519)
@@ -249,16 +249,6 @@
</managed-property>
</managed-bean>
- <managed-bean>
- <managed-bean-name>propertyAction</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.admin.ui.actions.PropertyAction</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- <managed-property>
- <property-name>portalObjectManager</property-name>
- <value>#{sessionScope.portalobjectmgr}</value>
- </managed-property>
- </managed-bean>
-
<!--
| Dashboard beans
-->
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml 2007-06-23 22:23:07 UTC (rev 7518)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml 2007-06-24 21:17:49 UTC (rev 7519)
@@ -39,7 +39,7 @@
</c:choose>
</td>
<td>
- <h:commandLink action="#{propertyAction.removeProperty}" rendered="#{!prop.inherited}">
+ <h:commandLink action="#{properties.action.removeProperty}" rendered="#{!prop.inherited}">
<h:outputText value="Delete"/>
<f:param name="name" value="#{prop.name}"/>
</h:commandLink>
@@ -66,7 +66,7 @@
<h:outputLabel for="predefinedProperty" styleClass="portlet-form-field-label">Select a predefined property: </h:outputLabel>
</td>
<td>
- <h:selectOneMenu id="predefinedProperty" styleClass="portlet-form-field" value="#{propertyAction.selectedProperty}">
+ <h:selectOneMenu id="predefinedProperty" styleClass="portlet-form-field" value="#{properties.action.selectedProperty}">
<f:selectItems value="#{properties.propertyItems}"/>
</h:selectOneMenu>
</td>
@@ -76,13 +76,13 @@
<h:outputLabel for="property" styleClass="portlet-form-field-label">Or enter a property name: </h:outputLabel>
</td>
<td>
- <h:inputText id="property" styleClass="portlet-form-input-field" value="#{propertyAction.otherPropertyName}" />
+ <h:inputText id="property" styleClass="portlet-form-input-field" value="#{properties.action.otherPropertyName}" />
</td>
</tr>
</tbody>
</table>
- <h:commandButton value="Add property" styleClass="portlet-form-button" action="#{propertyAction.updateProperty}"/>
+ <h:commandButton value="Add property" styleClass="portlet-form-button" action="#{properties.action.updateProperty}"/>
</h:form>
18 years, 10 months
JBoss Portal SVN: r7518 - trunk/core-admin/src/main/org/jboss/portal/core/admin/ui.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-06-23 18:23:07 -0400 (Sat, 23 Jun 2007)
New Revision: 7518
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBean.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyInfo.java
Log:
- sort entries in PropertiesBean otherwise it leads to update a wrong property since the update rely on the order in the iteration
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java 2007-06-23 21:59:43 UTC (rev 7517)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java 2007-06-23 22:23:07 UTC (rev 7518)
@@ -28,8 +28,8 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Iterator;
-import java.util.Map;
-import java.util.HashMap;
+import java.util.SortedMap;
+import java.util.TreeMap;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -41,21 +41,18 @@
{
/** . */
- List entryList;
+ private final SortedMap entryMap;
/** . */
- Map entryMap;
-
- /** . */
- int selectedIndex;
-
- /** . */
final PortalObjectManagerBean pomgr;
/** . */
private final PropertiesInfo info;
/** . */
+ int selectedIndex;
+
+ /** . */
private List items;
public PropertiesBean(PortalObjectManagerBean pomgr)
@@ -67,8 +64,7 @@
PropertiesInfo info = new PropertiesInfo(selectedObject);
//
- List entryList = new ArrayList(info.getNames().size());
- Map entryMap = new HashMap(info.getNames().size());
+ SortedMap entryMap = new TreeMap();
//
boolean inheritable = selectedObject.getType() != PortalObject.TYPE_CONTEXT;
@@ -86,17 +82,13 @@
if (propertyInfo != null && propertyInfo.getScope() == PropertyInfo.PUBLIC_SCOPE)
{
PropertyBean propertyBean = new PropertyBean(this, propertyInfo, inherited, inheritable, propertyValue);
- entryList.add(propertyBean);
entryMap.put(propertyName, propertyBean);
}
}
- //initiate control
-
//
this.info = info;
this.pomgr = pomgr;
- this.entryList = entryList;
this.entryMap = entryMap;
this.selectedIndex = -1;
}
@@ -108,7 +100,7 @@
public void setSelectedIndex(int selectedIndex)
{
- if (selectedIndex < 0 || selectedIndex >= entryList.size())
+ if (selectedIndex < 0 || selectedIndex >= entryMap.size())
{
throw new IllegalArgumentException();
}
@@ -120,23 +112,14 @@
selectedIndex = -1;
}
- public PreferenceBean getSelectedEntry()
- {
- if (selectedIndex < 0 || selectedIndex >= entryList.size())
- {
- return null;
- }
- return (PreferenceBean)entryList.get(selectedIndex);
- }
-
public List getEntries()
{
- return entryList;
+ return new ArrayList(entryMap.values());
}
public int getSize()
{
- return entryList.size();
+ return entryMap.size();
}
public SelectItem[] getPropertyItems()
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBean.java 2007-06-23 21:59:43 UTC (rev 7517)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBean.java 2007-06-23 22:23:07 UTC (rev 7518)
@@ -135,4 +135,9 @@
{
return PropertiesInfo.isControlProperty(info.getName());
}
+
+ public String toString()
+ {
+ return "PropertyBean[name=" + info.getName() + ",value=" + value + "]";
+ }
}
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyInfo.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyInfo.java 2007-06-23 21:59:43 UTC (rev 7517)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyInfo.java 2007-06-23 22:23:07 UTC (rev 7518)
@@ -103,4 +103,9 @@
{
return scope;
}
+
+ public String toString()
+ {
+ return "PropertyInfo[" + name + "]";
+ }
}
18 years, 10 months
JBoss Portal SVN: r7517 - trunk/core-admin/src/main/org/jboss/portal/core/admin/ui.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-06-23 17:59:43 -0400 (Sat, 23 Jun 2007)
New Revision: 7517
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesInfo.java
Log:
- added DND as a property updatable by the administrator
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesInfo.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesInfo.java 2007-06-23 21:33:29 UTC (rev 7516)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesInfo.java 2007-06-23 21:59:43 UTC (rev 7517)
@@ -53,6 +53,7 @@
//
public static final PropertyInfo AJAX_PARTIAL_REFRESH = new PropertyInfo(DynaRenderOptions.PARTIAL_REFRESH_ENABLED, new LocalizedString("Partial refresh"), new LocalizedString("Enable partial refresh for portlets"), "java.lang.Boolean", PropertyInfo.READ_WRITE_ACCESS_MODE, PropertyInfo.PUBLIC_SCOPE);
+ public static final PropertyInfo AJAX_DND = new PropertyInfo(DynaRenderOptions.DND_ENABLED, new LocalizedString("Drag and drop"), new LocalizedString("Enable window drag and drop"), "java.lang.Boolean", PropertyInfo.READ_WRITE_ACCESS_MODE, PropertyInfo.PUBLIC_SCOPE);
//
@@ -80,98 +81,110 @@
/** . */
- private static final Map CONTEXT_PROPERTIES = new HashMap();
+ private static final PropertyInfoSet CONTEXT_PROPERTIES = new PropertyInfoSet();
/** . */
- private static final Map PORTAL_PROPERTIES = new HashMap();
+ private static final PropertyInfoSet PORTAL_PROPERTIES = new PropertyInfoSet();
/** . */
- private static final Map PAGE_PROPERTIES = new HashMap();
+ private static final PropertyInfoSet PAGE_PROPERTIES = new PropertyInfoSet();
/** . */
- private static final Map WINDOW_PROPERTIES = new HashMap();
+ private static final PropertyInfoSet WINDOW_PROPERTIES = new PropertyInfoSet();
/** . */
- private static final Map CONTROL_PROPERTIES = new HashMap();
+ private static final PropertyInfoSet CONTROL_PROPERTIES = new PropertyInfoSet();
/** . */
- private static final Map CONTROL_PAGE_PROPERTIES = new HashMap();
+ private static final PropertyInfoSet CONTROL_PAGE_PROPERTIES = new PropertyInfoSet();
/** . */
- private static final Map CONTROL_PORTAL_PROPERTIES = new HashMap();
+ private static final PropertyInfoSet CONTROL_PORTAL_PROPERTIES = new PropertyInfoSet();
/** . */
- private static final Map ALL_PROPERTIES = new HashMap();
+ private static final PropertyInfoSet ALL_PROPERTIES = new PropertyInfoSet();
+ /**
+ * Just avoid to write put(propertyInfo.getName(), propertyInfo).
+ */
+ private static class PropertyInfoSet extends HashMap
+ {
+ public void add(PropertyInfo propertyInfo)
+ {
+ put(propertyInfo.getName(), propertyInfo);
+ }
+ }
+
static
{
- CONTEXT_PROPERTIES.put(AJAX_PARTIAL_REFRESH.getName(), AJAX_PARTIAL_REFRESH);
- CONTEXT_PROPERTIES.put(CONTROL_POLICY_PORTAL_ACCESS_DENIED.getName(), CONTROL_POLICY_PORTAL_ACCESS_DENIED);
- CONTEXT_PROPERTIES.put(CONTROL_POLICY_PORTAL_UNAVAILABLE.getName(), CONTROL_POLICY_PORTAL_UNAVAILABLE);
- CONTEXT_PROPERTIES.put(CONTROL_POLICY_PORTAL_ERROR.getName(), CONTROL_POLICY_PORTAL_ERROR);
- CONTEXT_PROPERTIES.put(CONTROL_POLICY_PORTAL_INTERNAL_ERROR.getName(), CONTROL_POLICY_PORTAL_INTERNAL_ERROR);
- CONTEXT_PROPERTIES.put(CONTROL_POLICY_PORTAL_NOT_FOUND.getName(), CONTROL_POLICY_PORTAL_NOT_FOUND);
- CONTEXT_PROPERTIES.put(CONTROL_POLICY_PORTAL_RESOURCE_URI.getName(), CONTROL_POLICY_PORTAL_RESOURCE_URI);
- CONTEXT_PROPERTIES.put(CONTROL_POLICY_PAGE_ACCESS_DENIED.getName(), CONTROL_POLICY_PAGE_ACCESS_DENIED);
- CONTEXT_PROPERTIES.put(CONTROL_POLICY_PAGE_UNAVAILABLE.getName(), CONTROL_POLICY_PAGE_UNAVAILABLE);
- CONTEXT_PROPERTIES.put(CONTROL_POLICY_PAGE_ERROR.getName(), CONTROL_POLICY_PAGE_ERROR);
- CONTEXT_PROPERTIES.put(CONTROL_POLICY_PAGE_INTERNAL_ERROR.getName(), CONTROL_POLICY_PAGE_INTERNAL_ERROR);
- CONTEXT_PROPERTIES.put(CONTROL_POLICY_PAGE_NOT_FOUND.getName(), CONTROL_POLICY_PAGE_NOT_FOUND);
- CONTEXT_PROPERTIES.put(CONTROL_POLICY_PAGE_RESOURCE_URI.getName(), CONTROL_POLICY_PAGE_RESOURCE_URI);
+ CONTEXT_PROPERTIES.add(AJAX_PARTIAL_REFRESH);
+ CONTEXT_PROPERTIES.add(AJAX_DND);
+ CONTEXT_PROPERTIES.add(CONTROL_POLICY_PORTAL_ACCESS_DENIED);
+ CONTEXT_PROPERTIES.add(CONTROL_POLICY_PORTAL_UNAVAILABLE);
+ CONTEXT_PROPERTIES.add(CONTROL_POLICY_PORTAL_ERROR);
+ CONTEXT_PROPERTIES.add(CONTROL_POLICY_PORTAL_INTERNAL_ERROR);
+ CONTEXT_PROPERTIES.add(CONTROL_POLICY_PORTAL_NOT_FOUND);
+ CONTEXT_PROPERTIES.add(CONTROL_POLICY_PORTAL_RESOURCE_URI);
+ CONTEXT_PROPERTIES.add(CONTROL_POLICY_PAGE_ACCESS_DENIED);
+ CONTEXT_PROPERTIES.add(CONTROL_POLICY_PAGE_UNAVAILABLE);
+ CONTEXT_PROPERTIES.add(CONTROL_POLICY_PAGE_ERROR);
+ CONTEXT_PROPERTIES.add(CONTROL_POLICY_PAGE_INTERNAL_ERROR);
+ CONTEXT_PROPERTIES.add(CONTROL_POLICY_PAGE_NOT_FOUND);
+ CONTEXT_PROPERTIES.add(CONTROL_POLICY_PAGE_RESOURCE_URI);
//
- PORTAL_PROPERTIES.put(THEME_LAYOUT_ID.getName(), THEME_LAYOUT_ID);
- PORTAL_PROPERTIES.put(THEME_THEME_ID.getName(), THEME_THEME_ID);
- PORTAL_PROPERTIES.put(THEME_RENDER_SET_ID.getName(), THEME_RENDER_SET_ID);
- PORTAL_PROPERTIES.put(DEFAULT_CHILD_NAME.getName(), DEFAULT_CHILD_NAME);
- PORTAL_PROPERTIES.put(AJAX_PARTIAL_REFRESH.getName(), AJAX_PARTIAL_REFRESH);
- PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_ACCESS_DENIED.getName(), CONTROL_POLICY_PORTAL_ACCESS_DENIED);
- PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_UNAVAILABLE.getName(), CONTROL_POLICY_PORTAL_UNAVAILABLE);
- PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_ERROR.getName(), CONTROL_POLICY_PORTAL_ERROR);
- PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_INTERNAL_ERROR.getName(), CONTROL_POLICY_PORTAL_INTERNAL_ERROR);
- PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_NOT_FOUND.getName(), CONTROL_POLICY_PORTAL_NOT_FOUND);
- PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_RESOURCE_URI.getName(), CONTROL_POLICY_PORTAL_RESOURCE_URI);
- PORTAL_PROPERTIES.put(CONTROL_POLICY_PAGE_ACCESS_DENIED.getName(), CONTROL_POLICY_PAGE_ACCESS_DENIED);
- PORTAL_PROPERTIES.put(CONTROL_POLICY_PAGE_UNAVAILABLE.getName(), CONTROL_POLICY_PAGE_UNAVAILABLE);
- PORTAL_PROPERTIES.put(CONTROL_POLICY_PAGE_ERROR.getName(), CONTROL_POLICY_PAGE_ERROR);
- PORTAL_PROPERTIES.put(CONTROL_POLICY_PAGE_INTERNAL_ERROR.getName(), CONTROL_POLICY_PAGE_INTERNAL_ERROR);
- PORTAL_PROPERTIES.put(CONTROL_POLICY_PAGE_NOT_FOUND.getName(), CONTROL_POLICY_PAGE_NOT_FOUND);
- PORTAL_PROPERTIES.put(CONTROL_POLICY_PAGE_RESOURCE_URI.getName(), CONTROL_POLICY_PAGE_RESOURCE_URI);
+ PORTAL_PROPERTIES.add(THEME_LAYOUT_ID);
+ PORTAL_PROPERTIES.add(THEME_THEME_ID);
+ PORTAL_PROPERTIES.add(THEME_RENDER_SET_ID);
+ PORTAL_PROPERTIES.add(DEFAULT_CHILD_NAME);
+ PORTAL_PROPERTIES.add(AJAX_PARTIAL_REFRESH);
+ PORTAL_PROPERTIES.add(CONTROL_POLICY_PORTAL_ACCESS_DENIED);
+ PORTAL_PROPERTIES.add(CONTROL_POLICY_PORTAL_UNAVAILABLE);
+ PORTAL_PROPERTIES.add(CONTROL_POLICY_PORTAL_ERROR);
+ PORTAL_PROPERTIES.add(CONTROL_POLICY_PORTAL_INTERNAL_ERROR);
+ PORTAL_PROPERTIES.add(CONTROL_POLICY_PORTAL_NOT_FOUND);
+ PORTAL_PROPERTIES.add(CONTROL_POLICY_PORTAL_RESOURCE_URI);
+ PORTAL_PROPERTIES.add(CONTROL_POLICY_PAGE_ACCESS_DENIED);
+ PORTAL_PROPERTIES.add(CONTROL_POLICY_PAGE_UNAVAILABLE);
+ PORTAL_PROPERTIES.add(CONTROL_POLICY_PAGE_ERROR);
+ PORTAL_PROPERTIES.add(CONTROL_POLICY_PAGE_INTERNAL_ERROR);
+ PORTAL_PROPERTIES.add(CONTROL_POLICY_PAGE_NOT_FOUND);
+ PORTAL_PROPERTIES.add(CONTROL_POLICY_PAGE_RESOURCE_URI);
//
- PAGE_PROPERTIES.put(THEME_LAYOUT_ID.getName(), THEME_LAYOUT_ID);
- PAGE_PROPERTIES.put(THEME_THEME_ID.getName(), THEME_THEME_ID);
- PAGE_PROPERTIES.put(THEME_RENDER_SET_ID.getName(), THEME_RENDER_SET_ID);
- PAGE_PROPERTIES.put(DEFAULT_CHILD_NAME.getName(), DEFAULT_CHILD_NAME);
- PAGE_PROPERTIES.put(PAGE_ORDER.getName(), PAGE_ORDER);
- PAGE_PROPERTIES.put(AJAX_PARTIAL_REFRESH.getName(), AJAX_PARTIAL_REFRESH);
- PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_ACCESS_DENIED.getName(), CONTROL_POLICY_PAGE_ACCESS_DENIED);
- PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_UNAVAILABLE.getName(), CONTROL_POLICY_PAGE_UNAVAILABLE);
- PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_ERROR.getName(), CONTROL_POLICY_PAGE_ERROR);
- PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_INTERNAL_ERROR.getName(), CONTROL_POLICY_PAGE_INTERNAL_ERROR);
- PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_NOT_FOUND.getName(), CONTROL_POLICY_PAGE_NOT_FOUND);
- PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_RESOURCE_URI.getName(), CONTROL_POLICY_PAGE_RESOURCE_URI);
+ PAGE_PROPERTIES.add(THEME_LAYOUT_ID);
+ PAGE_PROPERTIES.add(THEME_THEME_ID);
+ PAGE_PROPERTIES.add(THEME_RENDER_SET_ID);
+ PAGE_PROPERTIES.add(DEFAULT_CHILD_NAME);
+ PAGE_PROPERTIES.add(PAGE_ORDER);
+ PAGE_PROPERTIES.add(AJAX_PARTIAL_REFRESH);
+ PAGE_PROPERTIES.add(CONTROL_POLICY_PAGE_ACCESS_DENIED);
+ PAGE_PROPERTIES.add(CONTROL_POLICY_PAGE_UNAVAILABLE);
+ PAGE_PROPERTIES.add(CONTROL_POLICY_PAGE_ERROR);
+ PAGE_PROPERTIES.add(CONTROL_POLICY_PAGE_INTERNAL_ERROR);
+ PAGE_PROPERTIES.add(CONTROL_POLICY_PAGE_NOT_FOUND);
+ PAGE_PROPERTIES.add(CONTROL_POLICY_PAGE_RESOURCE_URI);
//
- WINDOW_PROPERTIES.put(AJAX_PARTIAL_REFRESH.getName(), AJAX_PARTIAL_REFRESH);
- WINDOW_PROPERTIES.put(THEME_RENDER_REGION_ID.getName(), THEME_RENDER_REGION_ID);
- WINDOW_PROPERTIES.put(THEME_RENDER_REGION_ORDER.getName(), THEME_RENDER_REGION_ORDER);
- WINDOW_PROPERTIES.put(WINDOW_CONTENT_TYPE.getName(), WINDOW_CONTENT_TYPE);
+ WINDOW_PROPERTIES.add(AJAX_PARTIAL_REFRESH);
+ WINDOW_PROPERTIES.add(THEME_RENDER_REGION_ID);
+ WINDOW_PROPERTIES.add(THEME_RENDER_REGION_ORDER);
+ WINDOW_PROPERTIES.add(WINDOW_CONTENT_TYPE);
//
- CONTROL_PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_ACCESS_DENIED.getName(), CONTROL_POLICY_PAGE_ACCESS_DENIED);
- CONTROL_PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_ERROR.getName(), CONTROL_POLICY_PAGE_ERROR);
- CONTROL_PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_INTERNAL_ERROR.getName(), CONTROL_POLICY_PAGE_INTERNAL_ERROR);
- CONTROL_PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_NOT_FOUND.getName(), CONTROL_POLICY_PAGE_NOT_FOUND);
- CONTROL_PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_UNAVAILABLE.getName(), CONTROL_POLICY_PAGE_UNAVAILABLE);
- CONTROL_PAGE_PROPERTIES.put(CONTROL_POLICY_PAGE_RESOURCE_URI.getName(), CONTROL_POLICY_PAGE_RESOURCE_URI);
+ CONTROL_PAGE_PROPERTIES.add(CONTROL_POLICY_PAGE_ACCESS_DENIED);
+ CONTROL_PAGE_PROPERTIES.add(CONTROL_POLICY_PAGE_ERROR);
+ CONTROL_PAGE_PROPERTIES.add(CONTROL_POLICY_PAGE_INTERNAL_ERROR);
+ CONTROL_PAGE_PROPERTIES.add(CONTROL_POLICY_PAGE_NOT_FOUND);
+ CONTROL_PAGE_PROPERTIES.add(CONTROL_POLICY_PAGE_UNAVAILABLE);
+ CONTROL_PAGE_PROPERTIES.add(CONTROL_POLICY_PAGE_RESOURCE_URI);
//
- CONTROL_PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_ACCESS_DENIED.getName(), CONTROL_POLICY_PORTAL_ACCESS_DENIED);
- CONTROL_PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_ERROR.getName(), CONTROL_POLICY_PORTAL_ERROR);
- CONTROL_PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_INTERNAL_ERROR.getName(), CONTROL_POLICY_PORTAL_INTERNAL_ERROR);
- CONTROL_PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_NOT_FOUND.getName(), CONTROL_POLICY_PORTAL_NOT_FOUND);
- CONTROL_PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_UNAVAILABLE.getName(), CONTROL_POLICY_PORTAL_UNAVAILABLE);
- CONTROL_PORTAL_PROPERTIES.put(CONTROL_POLICY_PORTAL_RESOURCE_URI.getName(), CONTROL_POLICY_PORTAL_RESOURCE_URI);
+ CONTROL_PORTAL_PROPERTIES.add(CONTROL_POLICY_PORTAL_ACCESS_DENIED);
+ CONTROL_PORTAL_PROPERTIES.add(CONTROL_POLICY_PORTAL_ERROR);
+ CONTROL_PORTAL_PROPERTIES.add(CONTROL_POLICY_PORTAL_INTERNAL_ERROR);
+ CONTROL_PORTAL_PROPERTIES.add(CONTROL_POLICY_PORTAL_NOT_FOUND);
+ CONTROL_PORTAL_PROPERTIES.add(CONTROL_POLICY_PORTAL_UNAVAILABLE);
+ CONTROL_PORTAL_PROPERTIES.add(CONTROL_POLICY_PORTAL_RESOURCE_URI);
//
CONTROL_PROPERTIES.putAll(CONTROL_PORTAL_PROPERTIES);
18 years, 10 months
JBoss Portal SVN: r7516 - trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-06-23 17:33:29 -0400 (Sat, 23 Jun 2007)
New Revision: 7516
Added:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboards.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboardsTemplate.xhtml
Log:
added dashboards facelets
Added: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboards.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboards.xhtml (rev 0)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboards.xhtml 2007-06-23 21:33:29 UTC (rev 7516)
@@ -0,0 +1,23 @@
+<div
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html">
+
+ <ui:composition template="dashboardsTemplate.xhtml">
+
+ <ui:define name="content">
+
+ <ui:include src="common/editProperties.xhtml">
+ <ui:param name="properties" value="#{dashboardmgr.selectedProperties}"/>
+ </ui:include>
+
+ <ui:include src="common/editErrorHandling.xhtml">
+ <ui:param name="properties" value="#{dashboardmgr.controlProperties}"/>
+ </ui:include>
+
+ </ui:define>
+
+ </ui:composition>
+
+</div>
Added: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboardsTemplate.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboardsTemplate.xhtml (rev 0)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboardsTemplate.xhtml 2007-06-23 21:33:29 UTC (rev 7516)
@@ -0,0 +1,31 @@
+<div
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:c="http://java.sun.com/jstl/core"
+ class="admin-ui">
+
+ <!-- Common nav -->
+ <h:form>
+ <ul class="topnav">
+ <li>
+ <h:commandLink value="Portal Objects" action="objects" actionListener="#{portalobjectmgr.selectRootObject}"/>
+ </li>
+ <li>
+ <h:commandLink value="Portlet Instances" action="instances"/>
+ </li>
+ <li>
+ <h:commandLink value="Portlet Definitions" action="portlets"/>
+ </li>
+ <li id="currentTab">Dashboard</li>
+ </ul>
+ </h:form>
+
+ <!-- Status message -->
+ <h:message id="status" for="status" infoClass="portlet-msg-success" errorClass="portlet-msg-error" fatalClass="portlet-msg-error" warnClass="portlet-msg-alert"/>
+
+ <!-- Content -->
+ <ui:insert name="content">Content</ui:insert>
+
+</div>
18 years, 10 months
JBoss Portal SVN: r7515 - in trunk: core-admin/src/resources/portal-admin-war/WEB-INF and 3 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-06-23 17:15:49 -0400 (Sat, 23 Jun 2007)
New Revision: 7515
Added:
trunk/faces/src/main/org/jboss/portal/faces/util/
trunk/faces/src/main/org/jboss/portal/faces/util/ActionEventDispatcher.java
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-portlet.xml
trunk/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java
Log:
- update ui:portlet component to take in account the view state id part of the context required by SunRI
- make page layout work with SunRI
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java 2007-06-22 21:13:55 UTC (rev 7514)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java 2007-06-23 21:15:49 UTC (rev 7515)
@@ -329,7 +329,11 @@
Map actionParams = actionEvent.getParameterMap();
// Keep window name and region defined
- setWindowName(((String[])actionParams.get("windowName"))[0]);
+ String[] windowNames = ((String[])actionParams.get("windowName"));
+ if (windowNames != null && windowNames.length > 0)
+ {
+ setWindowName(windowNames[0]);
+ }
//
if (actionParams.get(CONTENT_ACTION_SELECT) != null)
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-portlet.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-portlet.xml 2007-06-22 21:13:55 UTC (rev 7514)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-portlet.xml 2007-06-23 21:15:49 UTC (rev 7515)
@@ -28,6 +28,9 @@
<portlet-app>
<portlet>
<portlet-name>AdminPortlet</portlet-name>
+ <ajax>
+ <partial-refresh>false</partial-refresh>
+ </ajax>
<transaction>
<trans-attribute>Required</trans-attribute>
</transaction>
@@ -37,6 +40,9 @@
</portlet>
<portlet>
<portlet-name>DashboardConfigPortlet</portlet-name>
+ <ajax>
+ <partial-refresh>false</partial-refresh>
+ </ajax>
<transaction>
<trans-attribute>Required</trans-attribute>
</transaction>
Modified: trunk/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java 2007-06-22 21:13:55 UTC (rev 7514)
+++ trunk/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java 2007-06-23 21:15:49 UTC (rev 7515)
@@ -33,6 +33,8 @@
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
+import org.jboss.portal.faces.util.ActionEventDispatcher;
+import org.jboss.portal.common.util.Tools;
import javax.faces.component.UICommand;
import javax.faces.context.FacesContext;
@@ -43,11 +45,14 @@
import javax.faces.event.FacesEvent;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.PhaseId;
+import javax.faces.event.ActionListener;
+import javax.faces.event.ActionEvent;
import java.io.IOException;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;
+import java.util.ArrayList;
/**
* @todo:
@@ -70,6 +75,9 @@
public class UIPortlet extends UICommand
{
+ /** . */
+ private final ActionEventDispatcher dispatcher = new ActionEventDispatcher(this);
+
/** The portlet invoker. */
private PortletInvoker portletInvoker;
@@ -359,32 +367,15 @@
{
if (event instanceof PortletEvent)
{
+ PortletEvent pevent = (PortletEvent)event;
+
+ //
FacesContext faces = getFacesContext();
//
- MethodBinding listener = getActionListener();
- if (listener != null)
- {
- try
- {
- listener.invoke(faces, new Object[] {event});
- }
- catch (EvaluationException e)
- {
- Throwable cause = e.getCause();
- if (cause != null && cause instanceof AbortProcessingException)
- {
- throw (AbortProcessingException)cause;
- }
- else
- {
- throw e;
- }
- }
- }
+ dispatcher.dispatch(faces, pevent);
//
- PortletEvent pevent = (PortletEvent)event;
pevent.execute(faces);
}
else
@@ -571,10 +562,10 @@
" }\n" +
// Temporary hack for Sun RI which encodes contextual state on the page
-// " var viewStateId = document.getElementById('javax.faces.ViewState')\n" +
-// " if (viewStateId != null) {\n" +
-// " this.params['javax.faces.ViewState'] = viewStateId\n" +
-// " }\n" +
+ " var viewStateId = document.getElementById('javax.faces.ViewState')\n" +
+ " if (viewStateId != null) {\n" +
+ " this.params['javax.faces.ViewState'] = viewStateId.value\n" +
+ " }\n" +
"}\n" +
Added: trunk/faces/src/main/org/jboss/portal/faces/util/ActionEventDispatcher.java
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/util/ActionEventDispatcher.java (rev 0)
+++ trunk/faces/src/main/org/jboss/portal/faces/util/ActionEventDispatcher.java 2007-06-23 21:15:49 UTC (rev 7515)
@@ -0,0 +1,111 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.faces.util;
+
+import org.jboss.portal.common.util.Tools;
+import org.apache.log4j.Logger;
+
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ActionListener;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.component.UICommand;
+import javax.faces.el.MethodBinding;
+import javax.faces.el.EvaluationException;
+import javax.faces.context.FacesContext;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+
+/**
+ * The purpose of this class is to dispatch an event to the action listeners attached to an instance of
+ * <code>UICommand</code> object. It will iterate the set of listeners returned by the method
+ * <code>UICommand.getActionListeners()</code> (SunRI) and the listener evaluated by the method binding returned
+ * by the method <code>getActionListener()</code> (MyFaces). So overally we try to encapsulate the delivery of an
+ * action event in a portable way accross JSF implementations.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ActionEventDispatcher
+{
+
+ /** . */
+ private static final ActionListener[] EMPTY_LISTENERS = new ActionListener[0];
+
+ /** . */
+ private static final Logger log = Logger.getLogger(ActionEventDispatcher.class);
+
+ /** . */
+ private final UICommand command;
+
+ public ActionEventDispatcher(UICommand command)
+ {
+ this.command = command;
+ }
+
+ public void dispatch(final FacesContext faces, final ActionEvent event) throws AbortProcessingException
+ {
+ //
+ ArrayList listeners = new ArrayList();
+
+ if (command.getActionListeners() != null)
+ {
+ listeners.addAll(Arrays.asList(command.getActionListeners()));
+ }
+
+ //
+ if (command.getActionListener() != null)
+ {
+ ActionListener listener = new ActionListener()
+ {
+ public void processAction(ActionEvent actionEvent) throws AbortProcessingException
+ {
+ try
+ {
+ command.getActionListener().invoke(faces, new Object[] {event});
+ }
+ catch (EvaluationException e)
+ {
+ Throwable cause = e.getCause();
+ if (cause != null && cause instanceof AbortProcessingException)
+ {
+ throw (AbortProcessingException)cause;
+ }
+ else
+ {
+ log.error("Was not able to evaluate the method binding", e);
+ }
+ }
+ }
+ };
+ listeners.add(listener);
+ }
+
+ //
+ for (Iterator i = listeners.iterator(); i.hasNext();)
+ {
+ ActionListener listener = (ActionListener)i.next();
+ listener.processAction(event);
+ }
+ }
+}
18 years, 10 months
JBoss Portal SVN: r7514 - trunk/build.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-06-22 17:13:55 -0400 (Fri, 22 Jun 2007)
New Revision: 7514
Modified:
trunk/build/distrib.xml
Log:
- Introduced docs.dir property to easily override location of Portal docs.
- Properly handle using JBOSS_HOME when jboss.home is not set.
- Optimized build task to avoid rebuilding code twice.
- doc.build is now only called if no-doc is not set.
- Minor clean-ups.
Modified: trunk/build/distrib.xml
===================================================================
--- trunk/build/distrib.xml 2007-06-22 15:31:31 UTC (rev 7513)
+++ trunk/build/distrib.xml 2007-06-22 21:13:55 UTC (rev 7514)
@@ -1,6 +1,7 @@
<project default="main" name="JBoss Portal">
<property name="source.dir" value="../../jboss-portal-2.6"/>
+ <property name="docs.dir" value="${source.dir}-docs"/>
<property name="release.version" value="2.6-CR3"/>
<!-- -->
@@ -14,58 +15,68 @@
<property name="portal.build.normal.bundled" value="output/${portal.release.normal.name}-bundled"/>
<property name="portal.build.ha.bundled" value="output/${portal.release.ha.name}-bundled"/>
-<!--
- <property name="forums.release.name" value="jboss-forums-${release.version}"/>
- <property name="forums.build.bin" value="output/${forums.release.name}"/>
- <property name="forums.build.src" value="output/${forums.release.name}-src"/>
--->
-<!-- Licenses -->
-<target name="licenses">
- <fileset id="thirdparty-licenses" dir="../thirdparty/licenses">
- <include name="antlr.txt"/>
- <include name="apache-2.0.txt"/>
- <include name="bsd.txt"/>
- <include name="cddl.txt"/>
- <include name="cpl-1.0/txt"/>
- <include name="day-jcr.txt"/>
- <include name="dom4j.txt"/>
- <include name="ehcache.txt"/>
- <include name="gpl.txt"/>
- <include name="hsqldb.txt"/>
- <include name="httpunit.txt"/>
- <include name="ironsmith.txt"/>
- <include name="lgpl.txt"/>
- <include name="nekohtml.txt"/>
- <include name="oswego.txt"/>
- <include name="public-domain.txt"/>
- <include name="slf4j.txt"/>
- <include name="sun-jaf.txt"/>
- <include name="sun-javamail.txt"/>
- <include name="xdoclet.txt"/>
- </fileset>
- <mkdir dir="output/docs/licenses"/>
- <concat destfile="output/docs/licenses/thirdparty-licenses.txt">
- <fileset refid="thirdparty-licenses"/>
- </concat>
- <copy todir="output/docs/licenses">
- <fileset refid="thirdparty-licenses"/>
- <fileset dir="licences" includes="JBossEULA.txt"/>
- </copy>
+ <property environment="env"/>
+
+ <target name="init" unless="jboss.home">
+ <property name="jboss.home" value="${env.JBOSS_HOME}"/>
+ <echo message="Using JBoss install from $JBOSS_HOME: ${jboss.home}"/>
</target>
-
- <!-- Build JBoss Portal artifacts -->
- <target name="source.build">
+ <!--
+ <property name="forums.release.name" value="jboss-forums-${release.version}"/>
+ <property name="forums.build.bin" value="output/${forums.release.name}"/>
+ <property name="forums.build.src" value="output/${forums.release.name}-src"/>
+ -->
+ <!-- Licenses -->
+ <target name="licenses">
+ <fileset id="thirdparty-licenses" dir="../thirdparty/licenses">
+ <include name="antlr.txt"/>
+ <include name="apache-2.0.txt"/>
+ <include name="bsd.txt"/>
+ <include name="cddl.txt"/>
+ <include name="cpl-1.0/txt"/>
+ <include name="day-jcr.txt"/>
+ <include name="dom4j.txt"/>
+ <include name="ehcache.txt"/>
+ <include name="gpl.txt"/>
+ <include name="hsqldb.txt"/>
+ <include name="httpunit.txt"/>
+ <include name="ironsmith.txt"/>
+ <include name="lgpl.txt"/>
+ <include name="nekohtml.txt"/>
+ <include name="oswego.txt"/>
+ <include name="public-domain.txt"/>
+ <include name="slf4j.txt"/>
+ <include name="sun-jaf.txt"/>
+ <include name="sun-javamail.txt"/>
+ <include name="xdoclet.txt"/>
+ </fileset>
+ <mkdir dir="output/docs/licenses"/>
+ <concat destfile="output/docs/licenses/thirdparty-licenses.txt">
+ <fileset refid="thirdparty-licenses"/>
+ </concat>
+ <copy todir="output/docs/licenses">
+ <fileset refid="thirdparty-licenses"/>
+ <fileset dir="licences" includes="JBossEULA.txt"/>
+ </copy>
+ </target>
- <!-- Normal build -->
+ <!-- Normal build -->
+ <target name="_normal.build" depends="init" unless="normal.build.done">
<ant dir="${source.dir}/build" antfile="build.xml"/>
+ <!-- to prevent building several times -->
+ <property name="normal.build.done" value="true"/>
+ </target>
+
+ <!-- Build JBoss Portal artifacts -->
+ <target name="source.build" depends="_normal.build">
<!-- HA specific targets -->
<ant dir="${source.dir}/core" antfile="build.xml" target="output-ha"/>
<ant dir="${source.dir}/core-cms" antfile="build.xml" target="output-ha"/>
-
- <!-- Datasource files -->
- <ant dir="${source.dir}/core" antfile="build.xml" target="datasource">
+
+ <!-- Datasource files -->
+ <ant dir="${source.dir}/core" antfile="build.xml" target="datasource">
<!-- Hack because invoking the datasource generation from another build file replace ${/} -->
<property name="/" value="${/}"/>
</ant>
@@ -75,45 +86,63 @@
</target>
<!-- Build JBoss Portal documentation -->
- <target name="doc.build"> <!-- Normal build -->
- <ant dir="${source.dir}/build" antfile="build.xml"/>
- <ant dir="${source.dir}-docs/referenceGuide" antfile="build.xml"/>
- <ant dir="${source.dir}-docs/userGuide" antfile="build.xml"/>
- <ant dir="${source.dir}-docs/quickstartuser" antfile="build.xml"/>
+ <target name="doc.build" depends="_normal.build" unless="no-doc">
+ <ant dir="${docs.dir}/referenceGuide" antfile="build.xml"/>
+ <ant dir="${docs.dir}/userGuide" antfile="build.xml"/>
+ <ant dir="${docs.dir}/quickstartuser" antfile="build.xml"/>
</target>
<!-- Build JBoss Portal -->
- <target name="build" depends="source.build,doc.build">
- </target>
+ <target name="build" depends="source.build,doc.build"/>
- <target name="package-doc">
+
+ <!--<macrodef name="package-doc">
+ <attribute name="todir"/>
<sequential>
<mkdir dir="${todir}"/>
<mkdir dir="${todir}/referenceGuide"/>
<copy todir="${todir}/referenceGuide">
- <fileset dir="${source.dir}-docs/referenceGuide/build/en/"/>
+ <fileset dir="${docs.dir}/referenceGuide/build/en/"/>
</copy>
<mkdir dir="${todir}/userGuide"/>
<copy todir="${todir}/userGuide">
- <fileset dir="${source.dir}-docs/userGuide/build/en/"/>
+ <fileset dir="${docs.dir}/userGuide/build/en/"/>
</copy>
<mkdir dir="${todir}/quickstartuser"/>
<copy todir="${todir}/quickstartuser">
- <fileset dir="${source.dir}-docs/quickstartuser/build/en/"/>
+ <fileset dir="${docs.dir}/quickstartuser/build/en/"/>
</copy>
</sequential>
+ </macrodef>-->
+
+ <target name="package-doc">
+ <sequential>
+ <mkdir dir="${todir}"/>
+ <mkdir dir="${todir}/referenceGuide"/>
+ <copy todir="${todir}/referenceGuide">
+ <fileset dir="${docs.dir}/referenceGuide/build/en/"/>
+ </copy>
+ <mkdir dir="${todir}/userGuide"/>
+ <copy todir="${todir}/userGuide">
+ <fileset dir="${docs.dir}/userGuide/build/en/"/>
+ </copy>
+ <mkdir dir="${todir}/quickstartuser"/>
+ <copy todir="${todir}/quickstartuser">
+ <fileset dir="${docs.dir}/quickstartuser/build/en/"/>
+ </copy>
+ </sequential>
</target>
- <target name="package-ds">
+ <target name="package-ds">
<sequential>
<mkdir dir="${todir}"/>
<copy todir="${todir}">
<fileset dir="${source.dir}/core/output/resources/setup" includes="portal-*-ds.xml"/>
</copy>
</sequential>
- </target>
+ </target>
- <!-- use -Dno-doc=true if you simply want jboss-portal.sar without licenses etc-->
+ <!-- use -Dno-doc=true if you simply want jboss-portal.sar without licenses etc-->
<target name="package-bin" unless="no-doc">
<sequential>
<mkdir dir="${todir}"/>
@@ -123,9 +152,9 @@
<antcall target="package-ds">
<param name="todir" value="${todir}/setup"/>
</antcall>
- <copy file="${source.dir}-docs/readmeFiles/jboss-portal-bin.README" todir="${todir}"/>
+ <copy file="${docs.dir}/readmeFiles/jboss-portal-bin.README" todir="${todir}"/>
<copy todir="${todir}/docs/portal/licenses">
- <fileset dir="output/docs/licenses"/>
+ <fileset dir="output/docs/licenses"/>
</copy>
</sequential>
</target>
@@ -137,12 +166,12 @@
<param name="todir" value="${todir}/docs/portal"/>
</antcall>
<antcall target="package-ds">
- <param name="todir" value="${todir}/setup"/>
- </antcall>
- <copy file="${source.dir}-docs/readmeFiles/jboss-portal-bin.README" todir="${todir}"/>
+ <param name="todir" value="${todir}/setup"/>
+ </antcall>
+ <copy file="${docs.dir}/readmeFiles/jboss-portal-bin.README" todir="${todir}"/>
<copy todir="${todir}/docs/portal/licenses">
- <fileset dir="output/docs/licenses"/>
- </copy>
+ <fileset dir="output/docs/licenses"/>
+ </copy>
</sequential>
</target>
@@ -160,9 +189,10 @@
<antcall target="package-doc">
<param name="todir" value="${portal.build.src}/docs"/>
</antcall>
- <copy file="${source.dir}-docs/readmeFiles/jboss-portal-src.README" todir="${portal.build.src}"/>
+ <copy file="${docs.dir}/readmeFiles/jboss-portal-src.README" todir="${portal.build.src}"/>
<copy todir="${portal.build.src}">
- <fileset dir="${source.dir}" includes="**/*" excludes="*/output/**,**/CVS/*,**/build.log,build/local.properties,forums/**,thirdparty/**"/>
+ <fileset dir="${source.dir}" includes="**/*"
+ excludes="*/output/**,**/CVS/*,**/build.log,build/local.properties,forums/**,thirdparty/**"/>
</copy>
<copy todir="${portal.build.src}/docs/portal/licenses">
<fileset dir="output/docs/licenses"/>
@@ -173,72 +203,72 @@
<!--
| JBoss Portal binaries distribution
-->
-
+
<antcall target="package-normal"/>
<antcall target="package-ha"/>
<antcall target="package-normal-bundled"/>
- <antcall target="package-ha-bundled"/>
-
+ <antcall target="package-ha-bundled"/>
</target>
- <!--
- | JBoss Portal binary distribution
- -->
-
- <target name="package-normal" description="package jboss-portal.sar">
+ <!--
+ | JBoss Portal binary distribution
+ -->
+
+ <target name="package-normal" description="package jboss-portal.sar">
<mkdir dir="${portal.build.normal.bin}"/>
<antcall target="package-bin">
<param name="todir" value="${portal.build.normal.bin}"/>
- </antcall>
- <copy todir="${portal.build.normal.bin}/jboss-portal.sar">
- <fileset dir="${source.dir}/core/output/resources/jboss-portal.sar"/>
- </copy>
- <copy todir="${portal.build.normal.bin}/jboss-portal.sar/portal-cms.sar">
- <fileset dir="${source.dir}/core-cms/output/resources/portal-cms.sar" includes="**"/>
- </copy>
- <copy todir="${portal.build.normal.bin}/jboss-portal.sar">
- <fileset dir="${source.dir}/widget/output/resources" includes="widget.war/**"/>
- <fileset dir="${source.dir}/core-samples/output/resources" includes="portal-samples.sar/**"/>
- <fileset dir="${source.dir}/core-management/output/resources" includes="portal-management.sar/**"/>
- <fileset dir="${source.dir}/core-admin/output/resources" includes="portal-admin.sar/**"/>
- </copy>
- <mkdir dir="${portal.build.normal.bin}/jboss-portal.sar/portal-wsrp.sar"/>
- <copy todir="${portal.build.normal.bin}/jboss-portal.sar/portal-wsrp.sar">
- <fileset dir="${source.dir}/wsrp/output/lib/portal-wsrp-exploded.sar"/>
- </copy>
- </target>
+ </antcall>
+ <copy todir="${portal.build.normal.bin}/jboss-portal.sar">
+ <fileset dir="${source.dir}/core/output/resources/jboss-portal.sar"/>
+ </copy>
+ <copy todir="${portal.build.normal.bin}/jboss-portal.sar/portal-cms.sar">
+ <fileset dir="${source.dir}/core-cms/output/resources/portal-cms.sar" includes="**"/>
+ </copy>
+ <copy todir="${portal.build.normal.bin}/jboss-portal.sar">
+ <fileset dir="${source.dir}/widget/output/resources" includes="widget.war/**"/>
+ <fileset dir="${source.dir}/core-samples/output/resources" includes="portal-samples.sar/**"/>
+ <fileset dir="${source.dir}/core-management/output/resources" includes="portal-management.sar/**"/>
+ <fileset dir="${source.dir}/core-admin/output/resources" includes="portal-admin.sar/**"/>
+ </copy>
+ <mkdir dir="${portal.build.normal.bin}/jboss-portal.sar/portal-wsrp.sar"/>
+ <copy todir="${portal.build.normal.bin}/jboss-portal.sar/portal-wsrp.sar">
+ <fileset dir="${source.dir}/wsrp/output/lib/portal-wsrp-exploded.sar"/>
+ </copy>
+ </target>
- <!--
- | JBoss Portal ha binaries distribution
- -->
- <target name="package-ha" description="package jboss-portal-ha.sar">
- <mkdir dir="${portal.build.ha.bin}"/>
- <antcall target="package-bin">
- <param name="todir" value="${portal.build.ha.bin}"/>
- </antcall>
- <copy todir="${portal.build.ha.bin}/jboss-portal-ha.sar">
+ <!--
+ | JBoss Portal ha binaries distribution
+ -->
+ <target name="package-ha" description="package jboss-portal-ha.sar">
+ <mkdir dir="${portal.build.ha.bin}"/>
+ <antcall target="package-bin">
+ <param name="todir" value="${portal.build.ha.bin}"/>
+ </antcall>
+ <copy todir="${portal.build.ha.bin}/jboss-portal-ha.sar">
<fileset dir="${source.dir}/core/output/resources/jboss-portal-ha.sar"/>
- </copy>
- <copy todir="${portal.build.ha.bin}/jboss-portal-ha.sar/portal-cms.sar">
+ </copy>
+ <copy todir="${portal.build.ha.bin}/jboss-portal-ha.sar/portal-cms.sar">
<fileset dir="${source.dir}/core-cms/output/resources/portal-cms-ha.sar" includes="**"/>
- </copy>
- <copy todir="${portal.build.ha.bin}/jboss-portal-ha.sar">
+ </copy>
+ <copy todir="${portal.build.ha.bin}/jboss-portal-ha.sar">
<fileset dir="${source.dir}/widget/output/resources" includes="widget.war/**"/>
<fileset dir="${source.dir}/core-samples/output/resources" includes="portal-samples.sar/**"/>
<fileset dir="${source.dir}/core-management/output/resources" includes="portal-management.sar/**"/>
<fileset dir="${source.dir}/core-admin/output/resources" includes="portal-admin.sar/**"/>
- </copy>
- <mkdir dir="${portal.build.ha.bin}/jboss-portal-ha.sar/portal-wsrp.sar"/>
- <copy todir="${portal.build.ha.bin}/jboss-portal-ha.sar/portal-wsrp.sar">
+ </copy>
+ <mkdir dir="${portal.build.ha.bin}/jboss-portal-ha.sar/portal-wsrp.sar"/>
+ <copy todir="${portal.build.ha.bin}/jboss-portal-ha.sar/portal-wsrp.sar">
<fileset dir="${source.dir}/wsrp/output/lib/portal-wsrp-exploded.sar"/>
- </copy>
- <copy file="${source.dir}-docs/readmeFiles/jboss-portal-ha-bin.README" todir="${portal.build.ha.bin}"/>
+ </copy>
+ <copy file="${docs.dir}/readmeFiles/jboss-portal-ha-bin.README" todir="${portal.build.ha.bin}"/>
</target>
- <!--
- | JBoss Portal bundled distribution
- -->
- <target name="package-normal-bundled" depends="package-normal" if="jboss.home" description="package jboss-portal bundled with JBoss AS">
+ <!--
+ | JBoss Portal bundled distribution
+ -->
+ <target name="package-normal-bundled" depends="package-normal" if="jboss.home"
+ description="package jboss-portal bundled with JBoss AS">
<mkdir dir="${portal.build.normal.bundled}"/>
<antcall target="package-bundled">
<param name="todir" value="${portal.build.normal.bundled}"/>
@@ -258,13 +288,14 @@
<include name="server/default/**"/>
</fileset>
</copy>
- </target>
+ </target>
- <!--
- | JBoss Portal ha bundled distribution
- -->
+ <!--
+ | JBoss Portal ha bundled distribution
+ -->
- <target name="package-ha-bundled" depends="package-ha" if="jboss.home" description="package jboss-portal-ha bundled with JBoss AS">
+ <target name="package-ha-bundled" depends="package-ha" if="jboss.home"
+ description="package jboss-portal-ha bundled with JBoss AS">
<mkdir dir="${portal.build.ha.bundled}"/>
<antcall target="package-bundled">
<param name="todir" value="${portal.build.ha.bundled}"/>
@@ -281,15 +312,15 @@
<include name="server/all/**"/>
</fileset>
</copy>
- <copy file="${source.dir}-docs/readmeFiles/jboss-portal-ha-bin.README" todir="${portal.build.ha.bundled}"/>
+ <copy file="${docs.dir}/readmeFiles/jboss-portal-ha-bin.README" todir="${portal.build.ha.bundled}"/>
</target>
-
+
<!-- Create packages -->
<target name="zip">
<tar destfile="${portal.build.src}.tar.gz"
- compression="gzip">
- <tarfileset prefix="${portal.release.normal.name}-src" dir="${portal.build.src}"/>
+ compression="gzip">
+ <tarfileset prefix="${portal.release.normal.name}-src" dir="${portal.build.src}"/>
</tar>
<checksum file="${portal.build.src}.tar.gz"/>
@@ -325,6 +356,5 @@
</target>
<!-- Build and compress everything -->
- <target name="main" depends="licenses,build,package,zip" description="do the whole shebang - build source, doc, distro">
- </target>
+ <target name="main" depends="licenses,build,package,zip" description="do everything - build source, doc, distro"/>
</project>
18 years, 10 months
JBoss Portal SVN: r7513 - trunk/faces/src/main/org/jboss/portal/faces/component/portlet.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-06-22 11:31:31 -0400 (Fri, 22 Jun 2007)
New Revision: 7513
Modified:
trunk/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java
Log:
- comment ui:portlet fix for now as it screw UI state on Sun RI
Modified: trunk/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java 2007-06-22 14:47:33 UTC (rev 7512)
+++ trunk/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java 2007-06-22 15:31:31 UTC (rev 7513)
@@ -571,10 +571,10 @@
" }\n" +
// Temporary hack for Sun RI which encodes contextual state on the page
- " var viewStateId = document.getElementById('javax.faces.ViewState')\n" +
- " if (viewStateId != null) {\n" +
- " this.params['javax.faces.ViewState'] = viewStateId\n" +
- " }\n" +
+// " var viewStateId = document.getElementById('javax.faces.ViewState')\n" +
+// " if (viewStateId != null) {\n" +
+// " this.params['javax.faces.ViewState'] = viewStateId\n" +
+// " }\n" +
"}\n" +
18 years, 10 months
JBoss Portal SVN: r7512 - in trunk: core-admin/src/resources/portal-admin-war/WEB-INF and 3 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-06-22 10:47:33 -0400 (Fri, 22 Jun 2007)
New Revision: 7512
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ControlPropertiesBean.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesInfo.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBeanContainer.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/Refresher.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editErrorHandling.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editProperties.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instancesTemplate.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectTemplate.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portletsTemplate.xhtml
trunk/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java
Log:
- fix for ui:portlet component to work with Sun RI
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ControlPropertiesBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ControlPropertiesBean.java 2007-06-21 22:33:43 UTC (rev 7511)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/ControlPropertiesBean.java 2007-06-22 14:47:33 UTC (rev 7512)
@@ -159,7 +159,7 @@
return grabProperty(ControlConstants.PORTAL_RESOURCE_URI_CONTROL_KEY);
}
- protected PortalObject getRelatedObject()
+ public PortalObject getRelatedObject()
{
return pomgr.getSelectedObject();
}
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-06-21 22:33:43 UTC (rev 7511)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-06-22 14:47:33 UTC (rev 7512)
@@ -491,7 +491,7 @@
//
if (selectedId == null)
{
- selectedId = new PortalObjectId("", PortalObjectPath.ROOT_PATH);
+ selectedId = new PortalObjectId(namespace, PortalObjectPath.ROOT_PATH);
}
//
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java 2007-06-21 22:33:43 UTC (rev 7511)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesBean.java 2007-06-22 14:47:33 UTC (rev 7512)
@@ -166,7 +166,7 @@
return (SelectItem[])items.toArray(new SelectItem[items.size()]);
}
- protected PortalObject getRelatedObject()
+ public PortalObject getRelatedObject()
{
return pomgr.getSelectedObject();
}
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesInfo.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesInfo.java 2007-06-21 22:33:43 UTC (rev 7511)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertiesInfo.java 2007-06-22 14:47:33 UTC (rev 7512)
@@ -105,6 +105,7 @@
static
{
+ CONTEXT_PROPERTIES.put(AJAX_PARTIAL_REFRESH.getName(), AJAX_PARTIAL_REFRESH);
CONTEXT_PROPERTIES.put(CONTROL_POLICY_PORTAL_ACCESS_DENIED.getName(), CONTROL_POLICY_PORTAL_ACCESS_DENIED);
CONTEXT_PROPERTIES.put(CONTROL_POLICY_PORTAL_UNAVAILABLE.getName(), CONTROL_POLICY_PORTAL_UNAVAILABLE);
CONTEXT_PROPERTIES.put(CONTROL_POLICY_PORTAL_ERROR.getName(), CONTROL_POLICY_PORTAL_ERROR);
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBeanContainer.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBeanContainer.java 2007-06-21 22:33:43 UTC (rev 7511)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBeanContainer.java 2007-06-22 14:47:33 UTC (rev 7512)
@@ -31,6 +31,6 @@
public abstract class PropertyBeanContainer
{
- protected abstract PortalObject getRelatedObject();
+ public abstract PortalObject getRelatedObject();
}
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/Refresher.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/Refresher.java 2007-06-21 22:33:43 UTC (rev 7511)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/Refresher.java 2007-06-22 14:47:33 UTC (rev 7512)
@@ -56,6 +56,10 @@
pomgr.refresh();
//
+ PortalObjectManagerBean dashboardmgr = (PortalObjectManagerBean)ctx.getApplication().createValueBinding("#{dashboardmgr}").getValue(ctx);
+ dashboardmgr.refresh();
+
+ //
InstanceManagerBean instancemgr = (InstanceManagerBean)ctx.getApplication().createValueBinding("#{instancemgr}").getValue(ctx);
instancemgr.refresh();
@@ -76,6 +80,10 @@
pomgr.refresh();
//
+ PortalObjectManagerBean dashboardmgr = (PortalObjectManagerBean)ctx.getApplication().createValueBinding("#{dashboardmgr}").getValue(ctx);
+ dashboardmgr.refresh();
+
+ //
InstanceManagerBean instancemgr = (InstanceManagerBean)ctx.getApplication().createValueBinding("#{instancemgr}").getValue(ctx);
instancemgr.refresh();
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-06-21 22:33:43 UTC (rev 7511)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-06-22 14:47:33 UTC (rev 7512)
@@ -121,6 +121,40 @@
</managed-property>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>dashboardmgr</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.admin.ui.PortalObjectManagerBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>namespace</property-name>
+ <value>dashboard</value>
+ </managed-property>
+ <managed-property>
+ <property-name>roleModule</property-name>
+ <value>#{applicationScope.RoleModule}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>portalObjectContainer</property-name>
+ <value>#{applicationScope.PortalObjectContainer}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>instanceContainer</property-name>
+ <value>#{applicationScope.InstanceContainer}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>layoutService</property-name>
+ <value>#{applicationScope.LayoutService}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>themeService</property-name>
+ <value>#{applicationScope.ThemeService}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>domainConfigurator</property-name>
+ <value>#{applicationScope.AuthorizationDomainRegistry.portalobject.configurator}</value>
+ </managed-property>
+ </managed-bean>
+
<!-- The instance manager managed bean -->
<managed-bean>
<managed-bean-name>instancemgr</managed-bean-name>
@@ -405,6 +439,11 @@
</navigation-case>
<navigation-case>
+ <from-outcome>dashboards</from-outcome>
+ <to-view-id>/WEB-INF/jsf/dashboards.xhtml</to-view-id>
+ </navigation-case>
+
+ <navigation-case>
<from-outcome>dashboard</from-outcome>
<to-view-id>/WEB-INF/jsf/dashboard/dashboard.xhtml</to-view-id>
</navigation-case>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editErrorHandling.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editErrorHandling.xhtml 2007-06-21 22:33:43 UTC (rev 7511)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editErrorHandling.xhtml 2007-06-22 14:47:33 UTC (rev 7512)
@@ -6,7 +6,7 @@
xmlns:c="http://java.sun.com/jstl/core">
- <f:subview id="errorHandlingView" rendered="#{portalobjectmgr.selectedObject.type == PortalObject.TYPE_CONTEXT or portalobjectmgr.selectedObject.type == PortalObject.TYPE_PORTAL}">
+ <f:subview id="errorHandlingView" rendered="#{properties.relatedObject.type == PortalObject.TYPE_CONTEXT or properties.relatedObject.type == PortalObject.TYPE_PORTAL}">
<!-- Separation -->
<hr/>
@@ -106,7 +106,7 @@
</h:form>
</f:subview>
- <f:subview id="errorHandlingView" rendered="#{!(portalobjectmgr.selectedObject.type == PortalObject.TYPE_WINDOW)}">
+ <f:subview id="errorHandlingView" rendered="#{!(properties.relatedObject.type == PortalObject.TYPE_WINDOW)}">
<!-- Separation -->
<hr/>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml 2007-06-21 22:33:43 UTC (rev 7511)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml 2007-06-22 14:47:33 UTC (rev 7512)
@@ -30,7 +30,7 @@
<td>#{prop.inherited ? 'Yes' : 'No'}</td>
<td>
<c:choose>
- <c:when test="#{prop.type=='java.lang.Boolean'}">
+ <c:when test="#{prop.type == 'java.lang.Boolean'}">
<h:selectBooleanCheckbox styleClass="portlet-form-button" value="#{prop.value}" readonly="#{prop.readOnly}"/>
</c:when>
<c:otherwise>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editProperties.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editProperties.xhtml 2007-06-21 22:33:43 UTC (rev 7511)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editProperties.xhtml 2007-06-22 14:47:33 UTC (rev 7512)
@@ -19,10 +19,6 @@
<!-- Separation -->
<hr/>
- <h:form>
- <h:commandButton value="Cancel" styleClass="portlet-form-button" action="objects" immediate="true"/>
- </h:form>
-
</ui:define>
</ui:composition>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instancesTemplate.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instancesTemplate.xhtml 2007-06-21 22:33:43 UTC (rev 7511)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instancesTemplate.xhtml 2007-06-22 14:47:33 UTC (rev 7512)
@@ -14,6 +14,9 @@
<li>
<h:commandLink value="Portlet Definitions" action="portlets"/>
</li>
+ <li>
+ <h:commandLink value="Dashboard" action="dashboards"/>
+ </li>
</ul>
</h:form>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectTemplate.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectTemplate.xhtml 2007-06-21 22:33:43 UTC (rev 7511)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectTemplate.xhtml 2007-06-22 14:47:33 UTC (rev 7512)
@@ -17,7 +17,7 @@
<h:commandLink value="Portlet Definitions" action="portlets"/>
</li>
<li>
- <h:commandLink value="Dashboard" action="dashboard"/>
+ <h:commandLink value="Dashboard" action="dashboards"/>
</li>
</ul>
</h:form>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portletsTemplate.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portletsTemplate.xhtml 2007-06-21 22:33:43 UTC (rev 7511)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portletsTemplate.xhtml 2007-06-22 14:47:33 UTC (rev 7512)
@@ -14,6 +14,9 @@
<h:commandLink value="Portlet Instances" action="instances"/>
</li>
<li id="currentTab">Portlet Definitions</li>
+ <li>
+ <h:commandLink value="Dashboard" action="dashboards"/>
+ </li>
</ul>
</h:form>
Modified: trunk/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java 2007-06-21 22:33:43 UTC (rev 7511)
+++ trunk/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java 2007-06-22 14:47:33 UTC (rev 7512)
@@ -569,6 +569,13 @@
" };\n" +
" return tmp;\n" +
" }\n" +
+
+ // Temporary hack for Sun RI which encodes contextual state on the page
+ " var viewStateId = document.getElementById('javax.faces.ViewState')\n" +
+ " if (viewStateId != null) {\n" +
+ " this.params['javax.faces.ViewState'] = viewStateId\n" +
+ " }\n" +
+
"}\n" +
"function fx(event) {\n" +
18 years, 10 months
JBoss Portal SVN: r7511 - in trunk: core-cms/src/resources/portal-cms-war/WEB-INF/classes and 4 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-06-21 18:33:43 -0400 (Thu, 21 Jun 2007)
New Revision: 7511
Added:
trunk/portlet/src/resources/test/info/test-info-war/WEB-INF/classes/PrefsResource_it.properties
trunk/portlet/src/resources/test/jsr168/ext/portletconfig-war/WEB-INF/classes/GetResourceBundleDuringInitPortlet_it.properties
trunk/portlet/src/resources/test/jsr168/ext/portletconfig-war/WEB-INF/classes/ResourceBundlePortlet_it.properties
trunk/portlet/src/resources/test/jsr168/tck/portletconfig-war/WEB-INF/classes/InlineValuesNotInResourceBundlePortlet_it.properties
Modified:
trunk/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_it.properties
trunk/core-search/src/resources/portal-search-war/WEB-INF/classes/Resource_it.properties
trunk/core/src/resources/portal-core-war/WEB-INF/classes/Resource_it.properties
Log:
Italian language files. Contribution of Luca Stancapiano [JBPORTAL-1476]
Modified: trunk/core/src/resources/portal-core-war/WEB-INF/classes/Resource_it.properties
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/classes/Resource_it.properties 2007-06-21 22:13:14 UTC (rev 7510)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/classes/Resource_it.properties 2007-06-21 22:33:43 UTC (rev 7511)
@@ -261,6 +261,7 @@
LIST_ACTIONADDROLESTOUSER=Ruoli
LIST_ACTIONEDITROLES=Modifica i ruoli
LIST_ACTIONDELETEUSER=Cancella l'utente
+LIST_CONFIRMDELETEUSER=Stai per cancellare un utente
LIST_SEARCHRESULTS=Cerca i risultati per
LIST_MATCHING=Utenti trovati
FILTER=Filtro
@@ -287,6 +288,7 @@
ROLE_UPDATE=Aggiorna il ruolo utente
ROLE_EDIT=Modifica il ruolo utente
ROLE_DELETE=Cancella il ruolo selezionato
+ROLE_CONFIRM_DELETE=Stai per cancellare un ruolo
ROLE_DELETED=Il ruolo e'stato cancellato
ROLE_EDIT_MEMBERS=Modifica il ruolo dei membri
ROLE_MAINLIST=Torna alla modifica del ruolo
@@ -315,4 +317,4 @@
PERMISSION_DOMAIN_MOD=Modifica Dominio
PERMISSION_DEFINEDROLES=Ruoli definiti
PERMISSION_IMPLIEDROLES=Ruoli impliciti
-
+
\ No newline at end of file
Modified: trunk/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_it.properties
===================================================================
--- trunk/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_it.properties 2007-06-21 22:13:14 UTC (rev 7510)
+++ trunk/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_it.properties 2007-06-21 22:33:43 UTC (rev 7511)
@@ -77,6 +77,7 @@
CMS_EDITING=Editaggio del File
CMS_LIVE=Rendi \"Dal Vivo\"
CMS_VERSION=Versione
+CMS_WYSIWYG=Editor WYSIWYG
CMS_LIVEVERSION=Versione dal vivo
CMS_SIZE=Grandezza
@@ -90,4 +91,4 @@
CMS_DENY=Nega
CMS_APPROVAL=Oggetti in sospeso
CMS_PATH=Localita\'
-
+
\ No newline at end of file
Modified: trunk/core-search/src/resources/portal-search-war/WEB-INF/classes/Resource_it.properties
===================================================================
--- trunk/core-search/src/resources/portal-search-war/WEB-INF/classes/Resource_it.properties 2007-06-21 22:13:14 UTC (rev 7510)
+++ trunk/core-search/src/resources/portal-search-war/WEB-INF/classes/Resource_it.properties 2007-06-21 22:33:43 UTC (rev 7511)
@@ -21,5 +21,5 @@
# 02110-1301 USA, or see the FSF site: http://www.fsf.org. #
################################################################################
-SEARCH_SEARCH=Search
+SEARCH_SEARCH=Ricerca
Added: trunk/portlet/src/resources/test/info/test-info-war/WEB-INF/classes/PrefsResource_it.properties
===================================================================
--- trunk/portlet/src/resources/test/info/test-info-war/WEB-INF/classes/PrefsResource_it.properties (rev 0)
+++ trunk/portlet/src/resources/test/info/test-info-war/WEB-INF/classes/PrefsResource_it.properties 2007-06-21 22:33:43 UTC (rev 7511)
@@ -0,0 +1,3 @@
+javax.portlet.preference.description.localized_pref=descrizione locale italiana
+javax.portlet.preference.name.localized_pref=nome_locale_italiano
+javax.portlet.preference.value.localized_pref.std_localized_value=valore locale italiano
Added: trunk/portlet/src/resources/test/jsr168/ext/portletconfig-war/WEB-INF/classes/GetResourceBundleDuringInitPortlet_it.properties
===================================================================
--- trunk/portlet/src/resources/test/jsr168/ext/portletconfig-war/WEB-INF/classes/GetResourceBundleDuringInitPortlet_it.properties (rev 0)
+++ trunk/portlet/src/resources/test/jsr168/ext/portletconfig-war/WEB-INF/classes/GetResourceBundleDuringInitPortlet_it.properties 2007-06-21 22:33:43 UTC (rev 7511)
@@ -0,0 +1 @@
+foo=bar
Added: trunk/portlet/src/resources/test/jsr168/ext/portletconfig-war/WEB-INF/classes/ResourceBundlePortlet_it.properties
===================================================================
--- trunk/portlet/src/resources/test/jsr168/ext/portletconfig-war/WEB-INF/classes/ResourceBundlePortlet_it.properties (rev 0)
+++ trunk/portlet/src/resources/test/jsr168/ext/portletconfig-war/WEB-INF/classes/ResourceBundlePortlet_it.properties 2007-06-21 22:33:43 UTC (rev 7511)
@@ -0,0 +1,4 @@
+javax.portlet.title=il titolo
+javax.portlet.short-title=il titolo corto
+javax.portlet.description=la descrizione
+example-key=valore-di-esempio
Added: trunk/portlet/src/resources/test/jsr168/tck/portletconfig-war/WEB-INF/classes/InlineValuesNotInResourceBundlePortlet_it.properties
===================================================================
--- trunk/portlet/src/resources/test/jsr168/tck/portletconfig-war/WEB-INF/classes/InlineValuesNotInResourceBundlePortlet_it.properties (rev 0)
+++ trunk/portlet/src/resources/test/jsr168/tck/portletconfig-war/WEB-INF/classes/InlineValuesNotInResourceBundlePortlet_it.properties 2007-06-21 22:33:43 UTC (rev 7511)
@@ -0,0 +1 @@
+foo=bar
\ No newline at end of file
18 years, 10 months