Author: ips
Date: 2009-10-02 15:42:47 -0400 (Fri, 02 Oct 2009)
New Revision: 774
Modified:
trunk/core/src/main/java/org/jboss/on/embedded/bean/ResourceListItem.java
trunk/core/src/main/java/org/jboss/on/embedded/ui/CommonActionUtil.java
trunk/core/src/main/java/org/jboss/on/embedded/ui/MetricAction.java
trunk/core/src/main/java/org/jboss/on/embedded/ui/SingleResourceContentAction.java
trunk/core/src/main/java/org/jboss/on/embedded/ui/SummaryAction.java
trunk/core/src/main/java/org/jboss/on/embedded/ui/configuration/resource/ResourceConfigurationUIBean.java
trunk/core/src/main/webapp/secure/addMap.xhtml
trunk/core/src/main/webapp/secure/addSimple.xhtml
trunk/core/src/main/webapp/secure/editMap.xhtml
trunk/core/src/main/webapp/secure/operationParameters.xhtml
trunk/core/src/main/webapp/secure/resourceInstanceConfig.xhtml
trunk/core/src/main/webapp/secure/resourceInstanceContent.xhtml
trunk/core/src/main/webapp/secure/resourceInstanceMetrics.xhtml
trunk/core/src/main/webapp/secure/resourceInstanceSummary.xhtml
Log:
stop using 'resource' as an EL variable name, since it's an implicit EL var in
JSF2 (
https://jira.jboss.org/jira/browse/EMBJOPR-253)
Modified: trunk/core/src/main/java/org/jboss/on/embedded/bean/ResourceListItem.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/bean/ResourceListItem.java 2009-09-30
12:55:16 UTC (rev 773)
+++ trunk/core/src/main/java/org/jboss/on/embedded/bean/ResourceListItem.java 2009-10-02
19:42:47 UTC (rev 774)
@@ -57,10 +57,18 @@
}
}
+ public String getVersion() {
+ return resource.getVersion();
+ }
+
public String getName() {
return resource.getName();
}
+ public String getDescription() {
+ return resource.getDescription();
+ }
+
public String getType() {
return resource.getResourceType().getName();
}
Modified: trunk/core/src/main/java/org/jboss/on/embedded/ui/CommonActionUtil.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/ui/CommonActionUtil.java 2009-09-30
12:55:16 UTC (rev 773)
+++ trunk/core/src/main/java/org/jboss/on/embedded/ui/CommonActionUtil.java 2009-10-02
19:42:47 UTC (rev 774)
@@ -84,7 +84,7 @@
{
// there are plenty of other implementations we could use here
// e.g. navigationAction.getSelectedNode().getResource()
- String path = navigationAction.getCurrentPath();
+ String path = this.navigationAction.getCurrentPath();
int resourceId;
try
{
@@ -116,7 +116,7 @@
public List<SelectItem> asSelectItemList()
{
- JONTreeNode selectedNode = navigationAction.getSelectedNode();
+ JONTreeNode selectedNode = this.navigationAction.getSelectedNode();
Collection<JONTreeNode> c = selectedNode.getChildNodes();
List<SelectItem> result = new ArrayList<SelectItem>();
if (c != null)
Modified: trunk/core/src/main/java/org/jboss/on/embedded/ui/MetricAction.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/ui/MetricAction.java 2009-09-30
12:55:16 UTC (rev 773)
+++ trunk/core/src/main/java/org/jboss/on/embedded/ui/MetricAction.java 2009-10-02
19:42:47 UTC (rev 774)
@@ -53,7 +53,7 @@
* the resource being displayed on the metric tab
*/
@Out(required = false)
- private ResourceListItem resource;
+ private ResourceListItem currentResource;
/**
* this resource's resource type
@@ -96,13 +96,13 @@
public String view()
{
- resource = commonActionUtil.getCurrentResourceListItem();
+ currentResource = commonActionUtil.getCurrentResourceListItem();
- resourceType = resource.getResource().getResourceType();
+ resourceType = currentResource.getResource().getResourceType();
measurementDisplayMap = new HashMap<String,
List<MeasurementDisplay>>();
- MeasurementUtils measurementUtils = new MeasurementUtils(resource);
+ MeasurementUtils measurementUtils = new MeasurementUtils(currentResource);
measurementDefinitionMap = measurementUtils.getMeasurementDefinitionMap();
List<MeasurementData> measurementDataList =
measurementUtils.loadMeasurementData(null, DataType.MEASUREMENT);
measurementCategoryList =
measurementUtils.loadCategoryList(measurementDefinitionMap,
Modified:
trunk/core/src/main/java/org/jboss/on/embedded/ui/SingleResourceContentAction.java
===================================================================
---
trunk/core/src/main/java/org/jboss/on/embedded/ui/SingleResourceContentAction.java 2009-09-30
12:55:16 UTC (rev 773)
+++
trunk/core/src/main/java/org/jboss/on/embedded/ui/SingleResourceContentAction.java 2009-10-02
19:42:47 UTC (rev 774)
@@ -41,8 +41,8 @@
@Scope(ScopeType.SESSION)
public class SingleResourceContentAction implements Serializable
{
- @Out(value = "currentResource", required = false, scope = ScopeType.PAGE)
- private Resource resource;
+ @Out(required = false, scope = ScopeType.PAGE)
+ private Resource currentResource;
@Out(value = "contentHistory", required = false, scope =
ScopeType.SESSION)
private ContentDiscoveryReport contentHistory;
@@ -58,8 +58,8 @@
public void getContent()
{
- resource = commonActionUtil.getCurrentResource();
- Collection<ContentDiscoveryReport> historyForResource =
contentManager.getHistoryForResource(resource);
+ currentResource = commonActionUtil.getCurrentResource();
+ Collection<ContentDiscoveryReport> historyForResource =
contentManager.getHistoryForResource(currentResource);
if (historyForResource != null && historyForResource.size() > 0)
{
for (ContentDiscoveryReport currentReport : historyForResource)
Modified: trunk/core/src/main/java/org/jboss/on/embedded/ui/SummaryAction.java
===================================================================
--- trunk/core/src/main/java/org/jboss/on/embedded/ui/SummaryAction.java 2009-09-30
12:55:16 UTC (rev 773)
+++ trunk/core/src/main/java/org/jboss/on/embedded/ui/SummaryAction.java 2009-10-02
19:42:47 UTC (rev 774)
@@ -87,7 +87,7 @@
* the resource that was selected based on the path request parameter
*/
@Out(required = false)
- private ResourceListItem resource;
+ private ResourceListItem currentResource;
/**
* all measurement data for this resource marked with the "summary"
displayType
@@ -256,11 +256,11 @@
public void setResourceAndSummaryInfo(Resource selectedResource)
{
Availability availability =
ResourceManagerFactory.resourceManager().getAvailability(selectedResource);
- resource = new ResourceListItem(selectedResource, availability);
+ currentResource = new ResourceListItem(selectedResource, availability);
resourceType = selectedResource.getResourceType();
summaryMeasurementDisplayList = new ArrayList<MeasurementDisplay>();
- MeasurementUtils measurementUtils = new MeasurementUtils(resource);
+ MeasurementUtils measurementUtils = new MeasurementUtils(currentResource);
summaryMeasurementDefinitionMap =
measurementUtils.getMeasurementDefinitionMap();
List<MeasurementData> measurementDataList =
measurementUtils.loadMeasurementData(DisplayType.SUMMARY, DataType.MEASUREMENT);
Modified:
trunk/core/src/main/java/org/jboss/on/embedded/ui/configuration/resource/ResourceConfigurationUIBean.java
===================================================================
---
trunk/core/src/main/java/org/jboss/on/embedded/ui/configuration/resource/ResourceConfigurationUIBean.java 2009-09-30
12:55:16 UTC (rev 773)
+++
trunk/core/src/main/java/org/jboss/on/embedded/ui/configuration/resource/ResourceConfigurationUIBean.java 2009-10-02
19:42:47 UTC (rev 774)
@@ -80,8 +80,8 @@
@In(value = "ancestorResource", required = false)
private Resource ancestorResource;
- @Out(value = "resource", required = false)
- private ResourceListItem listItem;
+ @Out(required = false)
+ private ResourceListItem currentResource;
private ResourceType serviceType;
@@ -137,8 +137,8 @@
public void resourceConfiguration()
{
actionType = ActionType.UPDATE;
- listItem = commonActionUtil.getCurrentResourceListItem();
- Resource resource = listItem.getResource();
+ currentResource = commonActionUtil.getCurrentResourceListItem();
+ Resource resource = currentResource.getResource();
try
{
setConfiguration(configurationManager.getResourceConfiguration(resource));
@@ -184,7 +184,7 @@
String result;
Configuration resourceConfig = getConfiguration();
- ConfigurationUpdateResponse pluginResponse =
configurationManager.updateResource(this.listItem.getResource(),
+ ConfigurationUpdateResponse pluginResponse =
configurationManager.updateResource(this.currentResource.getResource(),
resourceConfig);
switch (pluginResponse.getStatus())
@@ -192,7 +192,7 @@
case SUCCESS:
{
facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_INFO,
"resource.status.update.success",
- this.listItem.getResource().getResourceType().getName(),
this.listItem.getResource().getName());
+ this.currentResource.getResource().getResourceType().getName(),
this.currentResource.getResource().getName());
result = FacesOutcomes.SUCCESS;
break;
}
Modified: trunk/core/src/main/webapp/secure/addMap.xhtml
===================================================================
--- trunk/core/src/main/webapp/secure/addMap.xhtml 2009-09-30 12:55:16 UTC (rev 773)
+++ trunk/core/src/main/webapp/secure/addMap.xhtml 2009-10-02 19:42:47 UTC (rev 774)
@@ -36,7 +36,7 @@
THIS TEXT WILL BE REMOVED AS WELL.
- <ui:param name="pageTitle" value="#{resource.resource.name} - Add
Map To List '#{param.listName}']"/>
+ <ui:param name="pageTitle" value="#{currentResource.name} - Add Map
To List '#{param.listName}']"/>
<ui:define name="body">
<div class="instructionalText">
Modified: trunk/core/src/main/webapp/secure/addSimple.xhtml
===================================================================
--- trunk/core/src/main/webapp/secure/addSimple.xhtml 2009-09-30 12:55:16 UTC (rev 773)
+++ trunk/core/src/main/webapp/secure/addSimple.xhtml 2009-10-02 19:42:47 UTC (rev 774)
@@ -36,13 +36,13 @@
THIS TEXT WILL BE REMOVED AS WELL.
- <ui:param name="pageTitle" value="#{resource.resource.name} - Add
Property To Map '#{param.mapName}'"/>
+ <ui:param name="pageTitle" value="#{currentResource.name} - Add
Property To Map '#{param.mapName}'"/>
<ui:define name="body">
<div class="instructionalText">
Enter a name and a value for the property to be added to the map
'#{param.mapName}',
- then click OK to return to the '#{resource.resource.name}'
resource's main Edit Configuration page.
+ then click OK to return to the '#{currentResource.name}'
resource's main Edit Configuration page.
</div>
<div class="instructionalText">
Modified: trunk/core/src/main/webapp/secure/editMap.xhtml
===================================================================
--- trunk/core/src/main/webapp/secure/editMap.xhtml 2009-09-30 12:55:16 UTC (rev 773)
+++ trunk/core/src/main/webapp/secure/editMap.xhtml 2009-10-02 19:42:47 UTC (rev 774)
@@ -36,7 +36,7 @@
THIS TEXT WILL BE REMOVED AS WELL.
- <ui:param name="pageTitle"
value="'#{resource.resource.name}' - Edit Map -
#{param.listName}[#{param.listIndex}]"/>
+ <ui:param name="pageTitle" value="'#{currentResource.name}'
- Edit Map - #{param.listName}[#{param.listIndex}]"/>
<ui:define name="body">
Modified: trunk/core/src/main/webapp/secure/operationParameters.xhtml
===================================================================
--- trunk/core/src/main/webapp/secure/operationParameters.xhtml 2009-09-30 12:55:16 UTC
(rev 773)
+++ trunk/core/src/main/webapp/secure/operationParameters.xhtml 2009-10-02 19:42:47 UTC
(rev 774)
@@ -36,7 +36,7 @@
THIS TEXT WILL BE REMOVED AS WELL.
- <ui:define
name="pagetitle">#{resource.resource.name}</ui:define>
+ <ui:define
name="pagetitle">#{currentResource.name}</ui:define>
<ui:define name="body">
Modified: trunk/core/src/main/webapp/secure/resourceInstanceConfig.xhtml
===================================================================
--- trunk/core/src/main/webapp/secure/resourceInstanceConfig.xhtml 2009-09-30 12:55:16 UTC
(rev 773)
+++ trunk/core/src/main/webapp/secure/resourceInstanceConfig.xhtml 2009-10-02 19:42:47 UTC
(rev 774)
@@ -27,7 +27,7 @@
<f:view>
<ui:composition template="/WEB-INF/facelets/layout.xhtml">
- <ui:define
name="pagetitle">#{resource.resource.name}</ui:define>
+ <ui:define
name="pagetitle">#{currentResource.name}</ui:define>
<!-- This rendered might be an issue if actionType is neither UPDATE or
CREATE, which shouldn't happen-->
<ui:define name="tabmenu">
@@ -55,7 +55,7 @@
<h1>#{messages['resource.edit.title']}</h1>
</h:panelGroup>
<h:panelGroup rendered="#{resourceConfigurationUIBean.actionType
eq 'CREATE'}">
- <h1>#{messages['resource.add.pageTitlePrefix']}
#{resource.resource.resourceType.name}</h1>
+ <h1>#{messages['resource.add.pageTitlePrefix']}
#{currentResource.resourceType.name}</h1>
</h:panelGroup>
<h:panelGroup
rendered="#{resourceConfigurationUIBean.configuration eq null}">
Modified: trunk/core/src/main/webapp/secure/resourceInstanceContent.xhtml
===================================================================
--- trunk/core/src/main/webapp/secure/resourceInstanceContent.xhtml 2009-09-30 12:55:16
UTC (rev 773)
+++ trunk/core/src/main/webapp/secure/resourceInstanceContent.xhtml 2009-10-02 19:42:47
UTC (rev 774)
@@ -32,7 +32,7 @@
<f:view>
<ui:composition template="/WEB-INF/facelets/layout.xhtml">
- <ui:define name="pagetitle">#{resource.name}</ui:define>
+ <ui:define
name="pagetitle">#{currentResource.name}</ui:define>
<ui:define name="tabmenu">
<ui:include src="/WEB-INF/facelets/tabMenu.xhtml">
Modified: trunk/core/src/main/webapp/secure/resourceInstanceMetrics.xhtml
===================================================================
--- trunk/core/src/main/webapp/secure/resourceInstanceMetrics.xhtml 2009-09-30 12:55:16
UTC (rev 773)
+++ trunk/core/src/main/webapp/secure/resourceInstanceMetrics.xhtml 2009-10-02 19:42:47
UTC (rev 774)
@@ -32,7 +32,7 @@
<f:view>
<ui:composition template="/WEB-INF/facelets/layout.xhtml">
- <ui:define
name="pagetitle">#{resource.resource.name}</ui:define>
+ <ui:define
name="pagetitle">#{currentResource.name}</ui:define>
<ui:define name="tabmenu">
<ui:include src="/WEB-INF/facelets/tabMenu.xhtml">
Modified: trunk/core/src/main/webapp/secure/resourceInstanceSummary.xhtml
===================================================================
--- trunk/core/src/main/webapp/secure/resourceInstanceSummary.xhtml 2009-09-30 12:55:16
UTC (rev 773)
+++ trunk/core/src/main/webapp/secure/resourceInstanceSummary.xhtml 2009-10-02 19:42:47
UTC (rev 774)
@@ -27,12 +27,11 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
-
<body>
<f:view>
<ui:composition template="/WEB-INF/facelets/layout.xhtml">
- <ui:define
name="pagetitle">#{resource.resource.name}</ui:define>
+ <ui:define
name="pagetitle">#{currentResource.name}</ui:define>
<ui:define name="tabmenu">
<ui:include src="/WEB-INF/facelets/tabMenu.xhtml">
@@ -51,21 +50,21 @@
<span style="padding-right:3px;">
<strong>#{messages['summary.resourceInstance.configuration.name']}</strong>
</span>
- #{resource.resource.name}
+ #{currentResource.name}
</h:panelGroup>
<h:panelGroup layout="block">
<span style="padding-right:3px;">
<strong>#{messages['summary.resourceInstance.configuration.version']}</strong>
</span>
- <h:outputText rendered="#{not empty
resource.resource.version}">#{resource.resource.version}</h:outputText>
- <h:outputText rendered="#{empty
resource.resource.version}">--</h:outputText>
+ <h:outputText rendered="#{not empty
currentResource.version}">#{currentResource.version}</h:outputText>
+ <h:outputText rendered="#{empty
currentResource.version}">--</h:outputText>
</h:panelGroup>
<h:panelGroup layout="block">
<span style="padding-right:3px;">
<strong>#{messages['summary.resourceInstance.configuration.description']}</strong>
</span>
- <h:outputText rendered="#{not empty
resource.resource.description}">#{resource.resource.description}</h:outputText>
- <h:outputText rendered="#{empty
resource.resource.description}">--</h:outputText>
+ <h:outputText rendered="#{not empty
currentResource.description}">#{currentResource.description}</h:outputText>
+ <h:outputText rendered="#{empty
currentResource.description}">--</h:outputText>
</h:panelGroup>
</h:panelGrid>
@@ -76,7 +75,7 @@
var="trait"
columnClasses="standard-traitscolumn">
<rich:column>
- <strong>#{
summaryMeasurementDefinitionMap[trait.measurementData.name].displayName}:</strong>
+
<strong>#{summaryMeasurementDefinitionMap[trait.measurementData.name].displayName}:</strong>
#{trait.measurementValueAndUnits}
</rich:column>
</rich:dataTable>