Author: ppitonak(a)redhat.com
Date: 2010-09-17 09:40:20 -0400 (Fri, 17 Sep 2010)
New Revision: 19239
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java
modules/tests/metamer/trunk/application/src/main/webapp/templates/footer.xhtml
Log:
https://jira.jboss.org/browse/RFPL-799
* refactoring of footer (versions of Metamer and RichFaces)
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java 2010-09-17
13:14:38 UTC (rev 19238)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java 2010-09-17
13:40:20 UTC (rev 19239)
@@ -56,6 +56,8 @@
private String scmRevision;
private String scmTimestamp;
private String fullVersion;
+ private String shortVersion;
+ private String richFacesVersion;
private String jsfVersion;
/**
@@ -104,14 +106,44 @@
}
if (implementationVersion == null) {
- implementationVersion = "Metamer: RichFaces Testing Application, version
unknown";
+ implementationVersion = "Metamer, version unknown";
return implementationVersion;
}
fullVersion = implementationTitle + " by " + implementationVendor +
", version " + implementationVersion + " SVN r. " + scmRevision;
return fullVersion;
}
+
+ public String getShortVersion() {
+ if (shortVersion != null) {
+ return shortVersion;
+ }
+ if (implementationVersion == null) {
+ implementationVersion = "Metamer, version unknown";
+ return implementationVersion;
+ }
+
+ shortVersion = "Metamer " + implementationVersion + " SVN r.
" + scmRevision;
+ return shortVersion;
+ }
+
+ public String getRichFacesVersion() {
+ if (richFacesVersion != null) {
+ return richFacesVersion;
+ }
+
+ org.richfaces.VersionBean rfVersionBean = new org.richfaces.VersionBean();
+ StringBuilder result = new StringBuilder();
+ result.append("RichFaces ");
+ result.append(rfVersionBean.getVersion().getImplementationVersion());
+ result.append(" SVN r.");
+ result.append(rfVersionBean.getVersion().getScmRevision());
+ richFacesVersion = result.toString();
+
+ return richFacesVersion;
+ }
+
public String getJavaVersion() {
return System.getProperty("java.runtime.name") + " " +
System.getProperty("java.runtime.version");
}
Modified: modules/tests/metamer/trunk/application/src/main/webapp/templates/footer.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/templates/footer.xhtml 2010-09-17
13:14:38 UTC (rev 19238)
+++
modules/tests/metamer/trunk/application/src/main/webapp/templates/footer.xhtml 2010-09-17
13:40:20 UTC (rev 19239)
@@ -21,17 +21,18 @@
-->
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jsp/jstl/core">
+
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jsp/jstl/core">
- <hr style="width: 1050px; margin-left: 0px;"/>
+ <hr style="width: 1050px; margin-left: 0px;" />
<ul>
- <li><h:outputText id="richfacesVersion"
value="#{a4j.version}"/></li>
- <li><h:outputText id="metamerVersion"
value="#{metamer.fullVersion}"/></li>
- <li><h:outputText id="javaVersion"
value="#{metamer.javaVersion}"/></li>
- <li><h:outputText id="osVersion"
value="#{metamer.osVersion}"/></li>
- <li><h:outputText id="jsfVersion"
value="#{metamer.jsfVersion}"/></li>
- <li><h:outputText id="browserVersion"
value="#{metamer.browserVersion}"/></li>
+ <li><h:outputText id="richfacesVersion"
value="#{metamer.richFacesVersion}" /></li>
+ <li><h:outputText id="metamerVersion"
value="#{metamer.shortVersion}" /></li>
+ <li><h:outputText id="javaVersion"
value="#{metamer.javaVersion}" /> @ <h:outputText
id="osVersion"
+ value="#{metamer.osVersion}" /></li>
+ <li><h:outputText id="jsfVersion"
value="#{metamer.jsfVersion}" /></li>
+ <li><h:outputText id="browserVersion"
value="#{metamer.browserVersion}" /></li>
</ul>
+ <hr />
</ui:composition>
\ No newline at end of file