Author: julien(a)jboss.com
Date: 2007-03-14 21:28:41 -0400 (Wed, 14 Mar 2007)
New Revision: 6673
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/dashboard/DashboardBean.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboard/dashboard.xhtml
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletRequestDispatcherImpl.java
Log:
bug fixes
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-03-15
00:55:48 UTC (rev 6672)
+++
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java 2007-03-15
01:28:41 UTC (rev 6673)
@@ -59,24 +59,23 @@
public class PageManagerBean
{
- public PageManagerBean(Page page, LayoutService layoutService, PortletInvoker
portletInvoker)
+ public PageManagerBean(LayoutService layoutService, PortletInvoker portletInvoker)
{
- this.page = page;
this.layoutService = layoutService;
this.portletInvoker = portletInvoker;
this.selectedContentType = ContentType.PORTLET;
}
/** . */
- public final Page page;
-
- /** . */
public final LayoutService layoutService;
/** . */
public final PortletInvoker portletInvoker;
/** . */
+ public Page page;
+
+ /** . */
public ContentType selectedContentType;
public List getContentTypeItems()
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/dashboard/DashboardBean.java
===================================================================
---
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/dashboard/DashboardBean.java 2007-03-15
00:55:48 UTC (rev 6672)
+++
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/dashboard/DashboardBean.java 2007-03-15
01:28:41 UTC (rev 6673)
@@ -76,16 +76,13 @@
public Portal userPortal;
/** . */
- public Page selectedPage;
-
- /** . */
public String selectedPageTheme;
/** . */
public String selectedPageLayout;
/** . */
- public PageManagerBean selectedPageManager;
+ public PageManagerBean pageManager;
/** . */
public SelectItem[] pageItems;
@@ -105,8 +102,19 @@
refresh();
}
+ public Page getSelectedPage()
+ {
+ return pageManager.page;
+ }
+
private void refresh()
{
+ // Create page manager if it doees not exit
+ if (pageManager == null)
+ {
+ pageManager = new PageManagerBean(layoutService, new
PortletDefinitionInvoker(instanceContainer));
+ }
+
// Get user name
String userId =
FacesContext.getCurrentInstance().getExternalContext().getRemoteUser();
@@ -116,19 +124,16 @@
// Page for editting
if (selectedPageName != null)
{
- selectedPage = userPortal.getPage(selectedPageName);
+ pageManager.page = userPortal.getPage(selectedPageName);
}
- if (selectedPage == null)
+ if (pageManager.page == null)
{
- selectedPage = userPortal.getDefaultPage();
+ pageManager.page = userPortal.getDefaultPage();
+ selectedPageName = pageManager.page.getName();
}
//
- selectedPageName = selectedPage.getName();
- selectedPageManager = new PageManagerBean(selectedPage, layoutService, new
PortletDefinitionInvoker(instanceContainer));
-
- //
- String defaultPageName =
selectedPage.getProperty(PortalObject.PORTAL_PROP_DEFAULT_OBJECT_NAME);
+ String defaultPageName =
pageManager.page.getProperty(PortalObject.PORTAL_PROP_DEFAULT_OBJECT_NAME);
if (defaultPageName == null)
{
defaultPageName = PortalObject.DEFAULT_OBJECT_NAME;
@@ -153,8 +158,8 @@
refresh();
//
- selectedPageTheme = selectedPage.getProperty(ThemeConstants.PORTAL_PROP_THEME);
- selectedPageLayout = selectedPage.getProperty(ThemeConstants.PORTAL_PROP_LAYOUT);
+ selectedPageTheme =
pageManager.page.getProperty(ThemeConstants.PORTAL_PROP_THEME);
+ selectedPageLayout =
pageManager.page.getProperty(ThemeConstants.PORTAL_PROP_LAYOUT);
}
public void updateTheme()
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboard/dashboard.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboard/dashboard.xhtml 2007-03-15
00:55:48 UTC (rev 6672)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboard/dashboard.xhtml 2007-03-15
01:28:41 UTC (rev 6673)
@@ -115,7 +115,7 @@
<tr>
<td>
<ui:include
src="/WEB-INF/jsf/common/editPageLayout.xhtml">
- <ui:param name="pageManager"
value="#{dashboard.selectedPageManager}"/>
+ <ui:param name="pageManager"
value="#{dashboard.pageManager}"/>
</ui:include>
</td>
</tr>
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletRequestDispatcherImpl.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletRequestDispatcherImpl.java 2007-03-15
00:55:48 UTC (rev 6672)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletRequestDispatcherImpl.java 2007-03-15
01:28:41 UTC (rev 6673)
@@ -81,16 +81,7 @@
DispatchedHttpServletResponse diresp = new DispatchedHttpServletResponse(rresp,
dresp);
//
- try
- {
- // Set the filter command
- dreq.setAttribute(FilterCommand.REQ_ATT_KEY, this);
- dispatcher.include(direq, diresp);
- }
- finally
- {
- dreq.removeAttribute(FilterCommand.REQ_ATT_KEY);
- }
+ dispatcher.include(direq, diresp);
}
catch (ServletException e)
{