Author: ips
Date: 2008-10-24 11:15:13 -0400 (Fri, 24 Oct 2008)
New Revision: 23
Added:
trunk/core/src/main/webapp/secure/resourceInstanceConfig.xhtml
Removed:
trunk/core/src/main/webapp/secure/resourceView.xhtml
Modified:
trunk/core/src/main/java/org/jboss/on/embedded/bean/ConfigTemplateSelectUtil.java
trunk/core/src/main/webapp/WEB-INF/classes/messages.properties
trunk/core/src/main/webapp/WEB-INF/navigation.xml
trunk/core/src/main/webapp/WEB-INF/pages.xml
Log:
fix global error message displayed when validation errors occurred; rename
resourceView.xhtml to resourceInstanceConfig.xhtml; add missing space in template
selection pulldown labels
Modified:
trunk/core/src/main/java/org/jboss/on/embedded/bean/ConfigTemplateSelectUtil.java
===================================================================
---
trunk/core/src/main/java/org/jboss/on/embedded/bean/ConfigTemplateSelectUtil.java 2008-10-24
03:02:30 UTC (rev 22)
+++
trunk/core/src/main/java/org/jboss/on/embedded/bean/ConfigTemplateSelectUtil.java 2008-10-24
15:15:13 UTC (rev 23)
@@ -23,8 +23,7 @@
import java.util.Set;
/**
- * Utility class used to help with constructing/processing the drop down list of
- * avaiable configuration templates
+ * Utility class used to help with constructing/processing the drop down list of
available configuration templates.
*/
public class ConfigTemplateSelectUtil
{
@@ -34,7 +33,7 @@
{
for (String templateName : templateNames)
{
- String label = templateName + "(" + resourceTypeName +
")";
+ String label = templateName + " (" + resourceTypeName +
")";
String value = templateName + SEPARATOR + resourceTypeName;
selectItems.put(label, value);
}
@@ -81,5 +80,4 @@
return section;
}
-
}
Modified: trunk/core/src/main/webapp/WEB-INF/classes/messages.properties
===================================================================
--- trunk/core/src/main/webapp/WEB-INF/classes/messages.properties 2008-10-24 03:02:30 UTC
(rev 22)
+++ trunk/core/src/main/webapp/WEB-INF/classes/messages.properties 2008-10-24 15:15:13 UTC
(rev 23)
@@ -50,6 +50,7 @@
resource.status.create.failure=Failed to add Resource (see app server log for additional
details):
resource.status.create.success=Successfully added new {0}.
+resource.status.update.validationErrors=An invalid value was specified for one or more
properties. See below for details.
resource.status.update.failure=Failed to update Resource (see app server log for
additional details):
resource.status.update.success=Successfully updated {0} '{1}'.
resource.status.remove.failure=Failed to delete Resource, please see app server log for
more information.
Modified: trunk/core/src/main/webapp/WEB-INF/navigation.xml
===================================================================
--- trunk/core/src/main/webapp/WEB-INF/navigation.xml 2008-10-24 03:02:30 UTC (rev 22)
+++ trunk/core/src/main/webapp/WEB-INF/navigation.xml 2008-10-24 15:15:13 UTC (rev 23)
@@ -106,14 +106,14 @@
<!--<navigation-case>-->
<!--<from-action>#{resourceCRUDAction.viewResourceAction(resourceItem.resource)}</from-action>-->
<!--<from-outcome>success</from-outcome>-->
- <!--<to-view-id>/resourceView.xhtml</to-view-id>-->
+ <!--<to-view-id>/resourceInstanceConfig.xhtml</to-view-id>-->
<!--<redirect/>-->
<!--</navigation-case>-->
<!-- TODO test what happens if view fails -->
<!--<navigation-case>-->
<!--<from-action>#{resourceCRUDAction.updateResourceAction}</from-action>-->
<!--<from-outcome>failure</from-outcome>-->
- <!--<to-view-id>/resourceView.xhtml</to-view-id>-->
+ <!--<to-view-id>/resourceInstanceConfig.xhtml</to-view-id>-->
<!--<redirect/>-->
<!--</navigation-case>-->
<!--<navigation-case>-->
Modified: trunk/core/src/main/webapp/WEB-INF/pages.xml
===================================================================
--- trunk/core/src/main/webapp/WEB-INF/pages.xml 2008-10-24 03:02:30 UTC (rev 22)
+++ trunk/core/src/main/webapp/WEB-INF/pages.xml 2008-10-24 15:15:13 UTC (rev 23)
@@ -88,7 +88,7 @@
</navigation>
</page>
- <page view-id="/secure/resourceView.xhtml">
+ <page view-id="/secure/resourceInstanceConfig.xhtml">
<!--Do NOT try and put parenthesis in the add/edit/open map pages from action
because the
action on the form does not have a parenthesis and would not find its match
@@ -112,26 +112,26 @@
<redirect view-id="/secure/summary.xhtml"/>
</rule>
<rule if-outcome="failure">
- <render view-id="/secure/resourceView.xhtml"/>
+ <render view-id="/secure/resourceInstanceConfig.xhtml"/>
</rule>
</navigation>
</page>
<page view-id="/secure/editMap.xhtml">
<navigation
from-action="#{resourceConfigurationUIBean.editMap()}">
- <render view-id="/secure/resourceView.xhtml"/>
+ <render view-id="/secure/resourceInstanceConfig.xhtml"/>
</navigation>
</page>
<page view-id="/secure/addMap.xhtml">
<navigation
from-action="#{resourceConfigurationUIBean.addMap()}">
- <render view-id="/secure/resourceView.xhtml"/>
+ <render view-id="/secure/resourceInstanceConfig.xhtml"/>
</navigation>
</page>
<page view-id="/secure/addSimple.xhtml">
<navigation from-action="#{addNewOpenMap.addProperty()}">
- <render view-id="/secure/resourceView.xhtml"/>
+ <render view-id="/secure/resourceInstanceConfig.xhtml"/>
</navigation>
</page>
@@ -203,11 +203,11 @@
</navigation>
<navigation
from-action="#{resourceConfigurationUIBean.resourceConfiguration()}">
- <render view-id="/secure/resourceView.xhtml"/>
+ <render view-id="/secure/resourceInstanceConfig.xhtml"/>
</navigation>
<navigation
from-action="#{templateDropDownPopulator.populateFromTemplate()}">
- <render view-id="/secure/resourceView.xhtml"/>
+ <render view-id="/secure/resourceInstanceConfig.xhtml"/>
</navigation>
</page>
Copied: trunk/core/src/main/webapp/secure/resourceInstanceConfig.xhtml (from rev 19,
trunk/core/src/main/webapp/secure/resourceView.xhtml)
===================================================================
--- trunk/core/src/main/webapp/secure/resourceInstanceConfig.xhtml
(rev 0)
+++ trunk/core/src/main/webapp/secure/resourceInstanceConfig.xhtml 2008-10-24 15:15:13 UTC
(rev 23)
@@ -0,0 +1,90 @@
+<?xml version="1.0"?>
+<!--
+ ~ Embedded Jopr Project
+ ~ Copyright (C) 2006-2008 Red Hat, Inc.
+ ~ All rights reserved.
+ ~
+ ~ This program 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 program 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 program; if not, write to the Free Software
+ ~ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ -->
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:s="http://jboss.com/products/seam/taglib"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:onc="http://jboss.org/on/component">
+<f:view>
+ <ui:composition template="/layout.xhtml">
+
+ <ui:define
name="pagetitle">#{resource.resource.name}</ui:define>
+
+ <!-- This rendered might be an issue if actionType is neither UPDATE or
CREATE, which shouldn't happen-->
+ <ui:define name="tabmenu">
+ <h:panelGroup rendered="#{resourceConfigurationUIBean.actionType eq
'UPDATE'}">
+ <ui:include src="/include/tabMenu.xhtml">
+ <ui:param name="activeTab"
value="configuration"/>
+ </ui:include>
+ </h:panelGroup>
+ </ui:define>
+
+ <ui:define name="body">
+ <div class="tabmenubox">
+ <h:panelGroup styleClass="messagingBox"
+ rendered="#{resourceAction.hasGlobalMessages ||
resourceAction.hasOnlyNonInfoNonGlobalMessages}">
+ <h:outputText styleClass="messagingFail"
value="#{messages['resource.status.update.validationErrors']}"
+
rendered="#{resourceAction.hasOnlyNonInfoNonGlobalMessages}"/>
+ <h:messages globalOnly="true"
+ errorClass="messagingFail"
+ infoClass="messagingSuccess"
+ warnClass="messagingFail"
+ fatalClass="messagingFail"/>
+ </h:panelGroup>
+ <h:panelGroup rendered="#{resourceConfigurationUIBean.actionType
eq 'UPDATE'}">
+ <h1>#{messages['resource.edit.title']}</h1>
+ </h:panelGroup>
+ <h:panelGroup rendered="#{resourceConfigurationUIBean.actionType
eq 'CREATE'}">
+ <h1>#{messages['resource.add.pageTitle']}</h1>
+ </h:panelGroup>
+
+ <h:panelGroup
rendered="#{resourceConfigurationUIBean.configuration eq null}">
+ #{messages['resource.configuration.null']}
+ </h:panelGroup>
+ <h:form id="resourceConfigurationForm"
onsubmit="prepareInputsForSubmission(this)"
+ rendered="#{resourceConfigurationUIBean.configuration ne
null}">
+
+ <onc:config
configurationDefinition="#{resourceConfigurationUIBean.configurationDefinition}"
+
configuration="#{resourceConfigurationUIBean.configuration}"
+
nullConfigurationDefinitionMessage="#{resourceConfigurationUIBean.nullConfigurationDefinitionMessage}"
+
nullConfigurationMessage="#{resourceConfigurationUIBean.nullConfigurationMessage}"
+ nullConfigurationStyle="infoBlock"/>
+
+ <h:panelGrid columns="2"
styleClass="buttons-table" columnClasses="button-cell">
+ <h:commandButton type="submit"
+
action="#{resourceConfigurationUIBean.saveConfiguration()}"
+ value="Save"
+ alt="Click to Save Changes"
+ styleClass="buttonmed"/>
+ <s:button
value="#{messages['resource.add.button.cancel']}"
+ view="/secure/summary.xhtml"
+ styleClass="buttonmed"
+ propagation="end"/>
+ </h:panelGrid>
+
+ </h:form>
+
+ </div>
+ </ui:define>
+ </ui:composition>
+</f:view>
+</html>
\ No newline at end of file
Deleted: trunk/core/src/main/webapp/secure/resourceView.xhtml
===================================================================
--- trunk/core/src/main/webapp/secure/resourceView.xhtml 2008-10-24 03:02:30 UTC (rev 22)
+++ trunk/core/src/main/webapp/secure/resourceView.xhtml 2008-10-24 15:15:13 UTC (rev 23)
@@ -1,90 +0,0 @@
-<?xml version="1.0"?>
-<!--
- ~ Embedded Jopr Project
- ~ Copyright (C) 2006-2008 Red Hat, Inc.
- ~ All rights reserved.
- ~
- ~ This program 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 program 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 program; if not, write to the Free Software
- ~ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- -->
-<html
xmlns="http://www.w3.org/1999/xhtml"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:s="http://jboss.com/products/seam/taglib"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:onc="http://jboss.org/on/component">
-<f:view>
- <ui:composition template="/layout.xhtml">
-
- <ui:define
name="pagetitle">#{resource.resource.name}</ui:define>
-
- <!-- This rendered might be an issue if actionType is neither UPDATE or
CREATE, which shouldn't happen-->
- <ui:define name="tabmenu">
- <h:panelGroup rendered="#{resourceConfigurationUIBean.actionType eq
'UPDATE'}">
- <ui:include src="/include/tabMenu.xhtml">
- <ui:param name="activeTab"
value="configuration"/>
- </ui:include>
- </h:panelGroup>
- </ui:define>
-
- <ui:define name="body">
- <div class="tabmenubox">
- <h:panelGroup styleClass="messagingBox"
- rendered="#{resourceAction.hasGlobalMessages ||
resourceAction.hasOnlyNonInfoNonGlobalMessages}">
- <h:outputText styleClass="messagingFail"
value="#{messages['resource.status.update.failure']}"
-
rendered="#{resourceAction.hasOnlyNonInfoNonGlobalMessages}"/>
- <h:messages globalOnly="true"
- errorClass="messagingFail"
- infoClass="messagingSuccess"
- warnClass="messagingFail"
- fatalClass="messagingFail"/>
- </h:panelGroup>
- <h:panelGroup rendered="#{resourceConfigurationUIBean.actionType
eq 'UPDATE'}">
- <h1>#{messages['resource.edit.title']}</h1>
- </h:panelGroup>
- <h:panelGroup rendered="#{resourceConfigurationUIBean.actionType
eq 'CREATE'}">
- <h1>#{messages['resource.add.pageTitle']}</h1>
- </h:panelGroup>
-
- <h:panelGroup
rendered="#{resourceConfigurationUIBean.configuration eq null}">
- #{messages['resource.configuration.null']}
- </h:panelGroup>
- <h:form id="resourceConfigurationForm"
onsubmit="prepareInputsForSubmission(this)"
- rendered="#{resourceConfigurationUIBean.configuration ne
null}">
-
- <onc:config
configurationDefinition="#{resourceConfigurationUIBean.configurationDefinition}"
-
configuration="#{resourceConfigurationUIBean.configuration}"
-
nullConfigurationDefinitionMessage="#{resourceConfigurationUIBean.nullConfigurationDefinitionMessage}"
-
nullConfigurationMessage="#{resourceConfigurationUIBean.nullConfigurationMessage}"
- nullConfigurationStyle="infoBlock"/>
-
- <h:panelGrid columns="2"
styleClass="buttons-table" columnClasses="button-cell">
- <h:commandButton type="submit"
-
action="#{resourceConfigurationUIBean.saveConfiguration()}"
- value="Save"
- alt="Click to Save Changes"
- styleClass="buttonmed"/>
- <s:button
value="#{messages['resource.add.button.cancel']}"
- view="/secure/summary.xhtml"
- styleClass="buttonmed"
- propagation="end"/>
- </h:panelGrid>
-
- </h:form>
-
- </div>
- </ui:define>
- </ui:composition>
-</f:view>
-</html>
\ No newline at end of file