Author: wesleyhales
Date: 2009-01-26 12:33:10 -0500 (Mon, 26 Jan 2009)
New Revision: 12646
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml
Log:
Fix windowName namespace problem. Make page independent from bridge or JSF impl
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java 2009-01-26
17:19:31 UTC (rev 12645)
+++
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java 2009-01-26
17:33:10 UTC (rev 12646)
@@ -50,6 +50,7 @@
import javax.faces.event.AbortProcessingException;
import javax.faces.event.ActionEvent;
import javax.faces.model.SelectItem;
+import javax.faces.component.UIInput;
import javax.xml.namespace.QName;
import java.util.ArrayList;
import java.util.Collection;
@@ -117,9 +118,21 @@
/** . */
public Map selectedRenderParameters;
+ UIInput windowName = null;
+
+ public UIInput getWindowName()
+ {
+ return windowName;
+ }
+
+ public void setWindowName(UIInput windowName)
+ {
+ this.windowName = windowName;
+ }
+
public String getNamespace()
{
- return
FacesContext.getCurrentInstance().getExternalContext().encodeNamespace("") +
VIEW_ROOT;
+ return windowName.getClientId(FacesContext.getCurrentInstance());
}
public List getContentTypeItems()
@@ -322,7 +335,7 @@
tmp.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER,
"" + i);
}
- this.windowName = "";
+ this.windowName.setValue("");
}
catch (DuplicatePortalObjectException unexpected)
{
@@ -369,18 +382,18 @@
assignedWindows.values.clear();
}
- private String windowName;
+// private String windowName;
+//
+// public String getWindowName()
+// {
+// return windowName;
+// }
+//
+// public void setWindowName(String windowName)
+// {
+// this.windowName = windowName;
+// }
- public String getWindowName()
- {
- return windowName;
- }
-
- public void setWindowName(String windowName)
- {
- this.windowName = windowName;
- }
-
/** Portlet event */
public void assignWindow(ActionEvent event)
{
@@ -393,7 +406,7 @@
String[] windowNames = ((String[])renderParams.get("windowName"));
if (windowNames != null && windowNames.length > 0)
{
- setWindowName(windowNames[0]);
+ windowName.setValue(windowNames[0]);
}
}
else if (event instanceof PortletEventEvent)
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml 2009-01-26
17:19:31 UTC (rev 12645)
+++
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml 2009-01-26
17:33:10 UTC (rev 12646)
@@ -29,11 +29,6 @@
version="2.4">
<context-param>
- <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
-
<param-value>org.jboss.portletbridge.application.FaceletPortletViewHandler</param-value>
- </context-param>
-
- <context-param>
<param-name>javax.portlet.faces.renderPolicy</param-name>
<param-value>ALWAYS_DELEGATE</param-value>
</context-param>
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml 2009-01-26
17:19:31 UTC (rev 12645)
+++
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml 2009-01-26
17:33:10 UTC (rev 12646)
@@ -24,7 +24,7 @@
<h:form id="windowForm">
<label for="windowName">
<span class="portlet-form-field-label
admin-label">#{bundle.COMMON_WINDOW_NAME}:</span>
- <h:inputText id="windowName"
value="#{pageManager.windowName}"
+ <h:inputText id="windowName"
binding="#{pageManager.windowName}"
styleClass="portlet-form-input-field
id-window-name"/>
</label>
<h:message for="windowName"
errorClass="portlet-msg-error"/>
@@ -86,7 +86,7 @@
<tr>
<td valign="top">
<h:commandButton
-
onclick="document.getElementById('blah').value=document.getElementById('#{pageManager.namespace}:windowForm:windowName').value"
+
onclick="document.getElementById('blah').value=document.getElementById('#{pageManager.namespace}').value"
value="#{bundle.COMMON_ADD}"
id="a_#{regionName}"
actionListener="#{pageManager.assignWindows}"
styleClass="portlet-form-button layout-button"/>
Show replies by date