Author: thomas.heute(a)jboss.com
Date: 2007-02-27 16:24:14 -0500 (Tue, 27 Feb 2007)
New Revision: 6435
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/AssignWindowsAction.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editPageLayout.xhtml
Log:
Display error messages
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/AssignWindowsAction.java
===================================================================
---
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/AssignWindowsAction.java 2007-02-27
19:59:29 UTC (rev 6434)
+++
trunk/core-admin/src/main/org/jboss/portal/core/portlet/management/actions/AssignWindowsAction.java 2007-02-27
21:24:14 UTC (rev 6435)
@@ -216,7 +216,7 @@
if (windowName.length() == 0)
{
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR,
"Window name cannot be blank!", null);
- FacesContext.getCurrentInstance().addMessage("windowName", message);
+ FacesContext.getCurrentInstance().addMessage("layoutForm:windowName",
message);
return false;
}
@@ -225,7 +225,7 @@
if (page.getWindow(windowName) != null)
{
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR,
"Duplicate window name found on this page!", null);
- FacesContext.getCurrentInstance().addMessage("windowName", message);
+ FacesContext.getCurrentInstance().addMessage("layoutForm:windowName",
message);
return false;
}
@@ -234,7 +234,7 @@
if (contentType == null)
{
FacesMessage message = new FacesMessage("No content type provided!",
null);
- FacesContext.getCurrentInstance().addMessage("instanceId", message);
+ FacesContext.getCurrentInstance().addMessage("layoutForm:instanceId",
message);
return false;
}
@@ -243,7 +243,7 @@
if (contentURI == null)
{
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "No
portlet selected!", null);
- FacesContext.getCurrentInstance().addMessage("instanceId", message);
+ FacesContext.getCurrentInstance().addMessage("layoutForm:instanceId",
message);
return false;
}
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editPageLayout.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editPageLayout.xhtml 2007-02-27
19:59:29 UTC (rev 6434)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsp/management/editPageLayout.xhtml 2007-02-27
21:24:14 UTC (rev 6435)
@@ -16,7 +16,7 @@
<hr />
- <h:form>
+ <h:form id="layoutForm">
<h:panelGroup>
<table>
<tr>
@@ -30,8 +30,8 @@
styleClass="portlet-form-field">
<f:selectItems
value="#{registry.availableTypes}"/>
</h:selectOneMenu>
- <h:message for="instanceId"/>
<h:commandButton value="Change content type"
styleClass="portlet-form-button"/>
+ <br/><h:message for="instanceId"
errorStyle="color:red;"/>
</td>
</tr>
<tr>
@@ -47,7 +47,7 @@
<h:outputText value="Window Name: "
styleClass="portlet-form-field-label"/>
</h:outputLabel>
<h:inputText id="windowName"
value="#{assignWindowsAction.windowName}"
styleClass="portlet-form-input-field"/>
- <h:message for="windowName"
showSummary="true" showDetail="true" />
+ <br/><h:message for="windowName"
errorStyle="color:red;"/>
</td>
</tr>
</table>
Show replies by date