Author: julien(a)jboss.com
Date: 2007-03-03 19:45:15 -0500 (Sat, 03 Mar 2007)
New Revision: 6516
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/Refresher.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java
Log:
make session bean refreshing work correctly with respect to hibernate
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java 2007-03-03
23:14:55 UTC (rev 6515)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java 2007-03-04
00:45:15 UTC (rev 6516)
@@ -232,6 +232,7 @@
public void setChildren(Map children)
{
+ System.out.println("Set on " + path + " " + children);
this.children = children;
}
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-03-03
23:14:55 UTC (rev 6515)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/Refresher.java 2007-03-04
00:45:15 UTC (rev 6516)
@@ -45,8 +45,10 @@
public void beforePhase(PhaseEvent phaseEvent)
{
- if (phaseEvent.getPhaseId() == PhaseId.RENDER_RESPONSE)
+ if (phaseEvent.getPhaseId() == PhaseId.RESTORE_VIEW ||
+ phaseEvent.getPhaseId() == PhaseId.RENDER_RESPONSE)
{
+ System.out.println("BEFORE REFRESH");
FacesContext ctx = phaseEvent.getFacesContext();
//
@@ -60,6 +62,7 @@
//
PortletManagerBean portletmgr =
(PortletManagerBean)ctx.getApplication().createValueBinding("#{portletmgr}").getValue(ctx);
portletmgr.refresh();
+ System.out.println("AFTER REFRESH");
}
}
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml 2007-03-03
23:14:55 UTC (rev 6515)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPage.xhtml 2007-03-04
00:45:15 UTC (rev 6516)
@@ -9,22 +9,32 @@
<ui:define name="content">
<!-- Sub page addition -->
- <h:form id="portal_form">
- <h:inputText id="name"
value="#{addPageAction.pageName}"
styleClass="portlet-form-input-field" required="true"/>
- <h:commandButton action="#{addPageAction.execute}"
value="Add page" styleClass="portlet-form-button"/>
- <h:message for="name"
errorClass="portlet-msg-error"/>
- </h:form>
+ <div style="padding:1em 0 0 0">
+ <div class="portlet-font">Create a nested page:</div>
+ <div style="padding:1em 0 1em 0">
+ <h:form>
+ <h:inputText id="name"
value="#{addPageAction.pageName}"
styleClass="portlet-form-input-field" required="true"/>
+ <h:commandButton action="#{addPageAction.execute}"
value="Add" styleClass="portlet-form-button"/>
+ <h:message for="name"
errorClass="portlet-msg-error"/>
+ </h:form>
+ </div>
+ </div>
<!-- Default page -->
- <h:form>
- <h:outputLabel for="name">
- <h:outputText styleClass="portlet-form-field-label"
value="Default Page:"/>
- </h:outputLabel>
- <h:selectOneMenu id="name"
styleClass="portlet-form-field"
value="#{portalAction.defaultPageName}">
- <f:selectItems value="#{portalobjectmgr.portalPageItems}"
/>
- </h:selectOneMenu>
- <h:commandButton styleClass="portlet-form-button"
value="Update" action="objects"/>
- </h:form>
+ <div style="padding:1em 0 0 0">
+ <div class="portlet-font">Default page:</div>
+ <div style="padding:1em 0 1em 0">
+ <h:form>
+ <h:outputLabel for="name">
+ <h:outputText styleClass="portlet-form-field-label"
value="Default Page:"/>
+ </h:outputLabel>
+ <h:selectOneMenu id="name"
styleClass="portlet-form-field"
value="#{portalAction.defaultPageName}">
+ <f:selectItems
value="#{portalobjectmgr.portalPageItems}" />
+ </h:selectOneMenu>
+ <h:commandButton styleClass="portlet-form-button"
value="Update" action="objects"/>
+ </h:form>
+ </div>
+ </div>
<!-- Separation -->
<hr/>