[Comsuite-svn] SF.net SVN: comsuite: [174] trunk/code
Brought to you by:
zduniak
|
From: <sku...@us...> - 2006-10-01 10:02:35
|
Revision: 174
http://svn.sourceforge.net/comsuite/?rev=174&view=rev
Author: skuzniak
Date: 2006-10-01 03:02:14 -0700 (Sun, 01 Oct 2006)
Log Message:
-----------
"--All--" message improved(not dependent from deploy path)
Modified Paths:
--------------
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/BeansUtils.java
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java
trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java
trunk/code/CSMiddleware/.springBeans
trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/BeansUtils.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/BeansUtils.java 2006-10-01 08:18:03 UTC (rev 173)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/BeansUtils.java 2006-10-01 10:02:14 UTC (rev 174)
@@ -188,4 +188,6 @@
public static final String LABEL_INACTIVE = "/pages/files/gif/image-missing.png";
+ public static final String SERVER_TEST_FAIL = "SERVER_TEST_FAIL";
+
}
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java 2006-10-01 08:18:03 UTC (rev 173)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/LanguageSelectionBean.java 2006-10-01 10:02:14 UTC (rev 174)
@@ -183,8 +183,24 @@
new FacesMessage(message1 + " " + message2));
}
+ /**
+ * This method is responsible for display message, on web page.
+ * Message is retrieved from default locale.
+ *
+ * @param messageCode message code to be displayed
+ * @param parentComponent component id on which messae will be displayed
+ */
+ public static void showMessageWithException(String messageCode, String exception,
+ String parentComponent) {
+ final String message = LanguageSelectionBean.getDisplayString(
+ LOCALE_CLASSNAME, messageCode, null,
+ FacesContext.getCurrentInstance().getViewRoot().getLocale());
+ FacesContext.getCurrentInstance().addMessage(parentComponent,
+ new FacesMessage(message, exception));
+ }
+
public static String getLabel(String labelName) {
- String locale = FacesContext.getCurrentInstance().getViewRoot()
+ /*String locale = FacesContext.getCurrentInstance().getViewRoot()
.getLocale().toString();
Properties p = new Properties();
String tomcatCatalog = new File(".").getAbsolutePath();
@@ -199,6 +215,9 @@
logger.debug("Label name: "+ labelName);
logger.debug("Property value: "+ p.getProperty(labelName));
logger.debug(p.keySet());
- return (null == p.getProperty(labelName)) ? "" : p.getProperty(labelName);
+ return (null == p.getProperty(labelName)) ? "" : p.getProperty(labelName);*/
+ return LanguageSelectionBean.getDisplayString(
+ LOCALE_CLASSNAME, labelName, null,
+ FacesContext.getCurrentInstance().getViewRoot().getLocale());
}
}
Modified: trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java
===================================================================
--- trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java 2006-10-01 08:18:03 UTC (rev 173)
+++ trunk/code/CSAdminPanel/JavaSource/org/commsuite/web/beans/servers/SearchServerBean.java 2006-10-01 10:02:14 UTC (rev 174)
@@ -211,6 +211,8 @@
if (testResult) {
this.serverStates.set(i, TEST_OK_ICON_PATH);
} else {
+ LanguageSelectionBean.showMessageWithException(BeansUtils.SERVER_TEST_FAIL, "",
+ BeansUtils.SHOW_SERVERS_NAVIGATION);
this.serverStates.set(i, TEST_FAIL_ICON_PATH);
}
String workingIcon ;
Modified: trunk/code/CSMiddleware/.springBeans
===================================================================
--- trunk/code/CSMiddleware/.springBeans 2006-10-01 08:18:03 UTC (rev 173)
+++ trunk/code/CSMiddleware/.springBeans 2006-10-01 10:02:14 UTC (rev 174)
@@ -12,7 +12,6 @@
<config>src/filtersContext.xml</config>
<config>src/datasourceContext.xml</config>
<config>src/activeMQContext.xml</config>
- <config>src/aopContext.xml</config>
<config>war/WEB-INF/ws-public-servlet.xml</config>
</configs>
<configSets>
@@ -22,7 +21,6 @@
<incomplete>true</incomplete>
<configs>
<config>src/activeMQContext.xml</config>
- <config>src/aopContext.xml</config>
<config>src/applicationContext.xml</config>
<config>src/converterBuilderContext.xml</config>
<config>src/datasourceContext.xml</config>
Modified: trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-10-01 08:18:03 UTC (rev 173)
+++ trunk/code/CSMiddleware/src/org/commsuite/ws/CommunicateWS.java 2006-10-01 10:02:14 UTC (rev 174)
@@ -461,7 +461,6 @@
public boolean serverTest(String serverName) throws WebServiceException {
try {
ServersService service = ServersService.getInstance();
- ;
return service.testServer(serverName);
} catch (Throwable t) {
logger.fatal("error in testServer method", t);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|