geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r734145 - in /geronimo/server/trunk/plugins: activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/ console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ console/console-base-portlets/s...
Date Tue, 13 Jan 2009 14:46:33 GMT
Author: dwoods
Date: Tue Jan 13 06:42:27 2009
New Revision: 734145

URL: http://svn.apache.org/viewvc?rev=734145&view=rev
Log:
GERONIMO-4484 Extraction, localization and display of messages generated in portlets.  Applied common-message_fix.patch from Gang Yin.

Modified:
    geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/SendMessageHandler.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CADetailsHandler.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CertReqDetailsHandler.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmCAHandler.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmCertReqHandler.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmClientCertHandler.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/IntroHandler.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ListRequestsIssueHandler.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ListRequestsVerifyHandler.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ProcessCSRHandler.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/SetupCAHandler.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/UnlockCAHandler.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ViewCertificateHandler.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/ChangePasswordHandler.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/EditKeystoreHandler.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/LockEditKeystoreHandler.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/LockKeystoreHandler.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/UnlockKeyHandler.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/UnlockKeystoreHandler.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/securitymanager/SEGroupsPortlet.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/securitymanager/SEUsersPortlet.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/servermanager/ServerManagerPortlet.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/WebManagerPortlet.java
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/resources/portletinfo.properties
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/resources/portletinfo_zh.properties
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/editConnector.jsp
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp
    geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/BasePortlet.java
    geronimo/server/trunk/plugins/console/console-portal-driver/src/main/resources/portaldriver_zh.properties
    geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java
    geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MonitoringPortlet.java
    geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/DeployStatusHandler.java
    geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/GetArchiveHandler.java
    geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/ReferencesHandler.java
    geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLHelper.java
    geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/runSQLNormal.jsp

Modified: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/SendMessageHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/SendMessageHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/SendMessageHandler.java (original)
+++ geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/SendMessageHandler.java Tue Jan 13 06:42:27 2009
@@ -132,9 +132,9 @@
             JMSMessageHelper helper = JMSMessageHelperFactory.getMessageHelper(request, adapterObjectName);
             try {
                 helper.sendMessage(request, messageInfo);
-                portlet.addInfoMessage(request, portlet.getLocalizedString("infoMsg01", request));
+                portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg01"));
             } catch (Exception e) {
-                portlet.addErrorMessage(request, portlet.getLocalizedString("errorMsg01", request), e.getMessage());
+                portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg01"), e.getMessage());
                 log.error("Error encountered while sending message.", e);
                 // throw new PortletException(e);
             }

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CADetailsHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CADetailsHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CADetailsHandler.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CADetailsHandler.java Tue Jan 13 06:42:27 2009
@@ -81,7 +81,7 @@
             fingerPrints.put("SHA1", CertificateUtil.generateFingerprint(caCert, "SHA1"));
             request.setAttribute("fingerPrints", fingerPrints);
         } catch (Exception e) {
-            portlet.addErrorMessage(request, portlet.getLocalizedString("errorMsg15", request), e.getMessage());
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg15"), e.getMessage());
             log.error("Errors while trying to view CA Details.", e);
         }
     }

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CertReqDetailsHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CertReqDetailsHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CertReqDetailsHandler.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/CertReqDetailsHandler.java Tue Jan 13 06:42:27 2009
@@ -64,7 +64,7 @@
                 response.setRenderParameter("sNo", sNo);
             } catch (Exception e) {
                 log.error("Unable to get next serial number from CA.", e);
-                portlet.addErrorMessage(request, portlet.getLocalizedString("errorMsg21", request), e.getMessage());
+                portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg21"), e.getMessage());
             }
         }
         return getMode();
@@ -115,7 +115,7 @@
             // Go to client certificate confirmation page
             return CONFIRM_CLIENT_CERT_MODE+BEFORE_ACTION;
         } catch(Exception e) {
-            portlet.addErrorMessage(request, portlet.getLocalizedString("errorMsg22", request), e.getMessage());
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg22"), e.getMessage());
             log.error("Errors in user input while processing a CSR.", e);
         }
         return getMode()+BEFORE_ACTION;

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmCAHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmCAHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmCAHandler.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmCAHandler.java Tue Jan 13 06:42:27 2009
@@ -130,13 +130,13 @@
             
             // CA Setup is succeessful.
             // Load a page to show CA details.
-            portlet.addInfoMessage(request, portlet.getLocalizedString("infoMsg15", request));
+            portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg15"));
             log.info("CA Setup is successful.");
             
             return CADETAILS_MODE+BEFORE_ACTION;
         } catch(Exception e) {
             // An error occurred.  Go back to CA details entry page so that user can correct the errors.
-            portlet.addErrorMessage(request, portlet.getLocalizedString("infoMsg07", request), e.getMessage());
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "infoMsg07"), e.getMessage());
             log.error("Errors in CA Setup process.", e);
         }
 

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmCertReqHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmCertReqHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmCertReqHandler.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmCertReqHandler.java Tue Jan 13 06:42:27 2009
@@ -18,7 +18,6 @@
 package org.apache.geronimo.console.ca;
 
 import java.io.IOException;
-import java.text.MessageFormat;
 
 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
@@ -62,10 +61,10 @@
         String reject = request.getParameter("reject");
         if(approve != null) {
             getCertificateRequestStore(request).setRequestVerified(requestId);
-            portlet.addInfoMessage(request, MessageFormat.format(portlet.getLocalizedString("infoMsg16", request), requestId));
+            portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg16", requestId));
         } else if(reject != null) {
             getCertificateRequestStore(request).deleteRequest(requestId);
-            portlet.addInfoMessage(request, MessageFormat.format(portlet.getLocalizedString("infoMsg17", request), requestId));
+            portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg17", requestId));
         }
         return LIST_REQUESTS_VERIFY_MODE+BEFORE_ACTION;
     }

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmClientCertHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmClientCertHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmClientCertHandler.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ConfirmClientCertHandler.java Tue Jan 13 06:42:27 2009
@@ -22,7 +22,6 @@
 import java.math.BigInteger;
 import java.security.PublicKey;
 import java.text.DateFormat;
-import java.text.MessageFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.Map;
@@ -84,7 +83,7 @@
                 // This may happen if the user clicks on "Issue Certificate" button a second time
                 log.warn("Second request to issue certificate with serial number'"+sNo+"'.  A certificate has already been issued.");
                 response.setRenderParameter("sNo", sNo.toString());
-                portlet.addWarningMessage(request, MessageFormat.format(portlet.getLocalizedString("warnMsg06", request), sNo));
+                portlet.addWarningMessage(request, portlet.getLocalizedString(request, "warnMsg06", sNo));
                 return VIEW_CERT_MODE;
             }
 
@@ -154,12 +153,12 @@
 
             // Set the serial number and forward to view certificate page
             response.setRenderParameter("sNo", sNo.toString());
-            portlet.addInfoMessage(request, MessageFormat.format(portlet.getLocalizedString("infoMsg18", request), sNo));
+            portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg18", sNo));
             log.info("Certificate with serial number '"+sNo+"' issued to "+subject);
             return VIEW_CERT_MODE;
         } catch(Exception e) {
             // An error occurred.  Go back to previous screen to let the user correct the errors.
-            portlet.addErrorMessage(request, portlet.getLocalizedString("errorMsg23", request), e.getMessage());
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg23"), e.getMessage());
             log.error("Errors in issuing certificate.", e);
         }
         return CERT_REQ_DETAILS_MODE+BEFORE_ACTION;

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/IntroHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/IntroHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/IntroHandler.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/IntroHandler.java Tue Jan 13 06:42:27 2009
@@ -63,20 +63,20 @@
             CertificationAuthority ca = getCertificationAuthority(request);
             if(ca == null) {
                 log.warn("CA is not running or CA may not have been initialized.  Unable to lock CA.");
-                portlet.addWarningMessage(request, portlet.getLocalizedString("warnMsg05", request));
+                portlet.addWarningMessage(request, portlet.getLocalizedString(request, "warnMsg05"));
             } else {
                 ca.lock();
                 log.info("CA is now locked.");
-                portlet.addInfoMessage(request, portlet.getLocalizedString("infoMsg12", request));
+                portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg12"));
             }
         } else if(request.getParameter("publish") != null) {
             CertificationAuthority ca = getCertificationAuthority(request);
             try {
                 getCertificateStore(request).storeCACertificate(ca.getCertificate());
-                portlet.addInfoMessage(request, portlet.getLocalizedString("infoMsg13", request));
+                portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg13"));
             } catch (Exception e) {
                 log.error("Error while publishing CA's certificate to Certificate Store", e);
-                portlet.addErrorMessage(request, portlet.getLocalizedString("errorMsg13", request), e.getMessage());
+                portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg13"), e.getMessage());
             }
         }
         return getMode()+BEFORE_ACTION;

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ListRequestsIssueHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ListRequestsIssueHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ListRequestsIssueHandler.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ListRequestsIssueHandler.java Tue Jan 13 06:42:27 2009
@@ -19,7 +19,6 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
-import java.text.MessageFormat;
 import java.util.Map;
 import java.util.Properties;
 
@@ -90,7 +89,7 @@
             }
             return CERT_REQ_DETAILS_MODE+BEFORE_ACTION;
         } catch(Exception e) {
-            portlet.addErrorMessage(request, MessageFormat.format(portlet.getLocalizedString("errorMsg17", request), requestId), e.getMessage());
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg17", requestId), e.getMessage());
             log.error("Errors while processing a Certificate Request. id="+requestId, e);
         }
         return getMode()+BEFORE_ACTION;

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ListRequestsVerifyHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ListRequestsVerifyHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ListRequestsVerifyHandler.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ListRequestsVerifyHandler.java Tue Jan 13 06:42:27 2009
@@ -19,7 +19,6 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
-import java.text.MessageFormat;
 import java.util.Map;
 import java.util.Properties;
 
@@ -90,7 +89,7 @@
             }
             return CONFIRM_CERT_REQ_MODE+BEFORE_ACTION;
         } catch(Exception e) {
-            portlet.addErrorMessage(request, MessageFormat.format(portlet.getLocalizedString("errorMsg18", request), requestId), e.getMessage());
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg18", requestId), e.getMessage());
             log.error("Errors while verifying Certificate Request. id="+requestId, e);
         }
         return getMode()+BEFORE_ACTION;

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ProcessCSRHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ProcessCSRHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ProcessCSRHandler.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ProcessCSRHandler.java Tue Jan 13 06:42:27 2009
@@ -62,7 +62,7 @@
             response.setRenderParameter("publickey", certReqMap.get(CaUtils.CERT_REQ_PUBLICKEY_OBJ).toString());
             return CERT_REQ_DETAILS_MODE+BEFORE_ACTION;
         } catch(Exception e) {
-            portlet.addErrorMessage(request, portlet.getLocalizedString("errorMsg20", request), e.getMessage());
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg20"), e.getMessage());
             log.error("Errors while processing a CSR.", e);
         }
         return getMode()+BEFORE_ACTION;

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/SetupCAHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/SetupCAHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/SetupCAHandler.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/SetupCAHandler.java Tue Jan 13 06:42:27 2009
@@ -102,7 +102,7 @@
             // Load page to confirm CA details
             return CONFIRM_CA_MODE+BEFORE_ACTION;
         } catch(Exception e) {
-            portlet.addErrorMessage(request, portlet.getLocalizedString("errorMsg19", request), e.getMessage());
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg19"), e.getMessage());
             log.error("", e);
         }
         return getMode()+BEFORE_ACTION;

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/UnlockCAHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/UnlockCAHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/UnlockCAHandler.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/UnlockCAHandler.java Tue Jan 13 06:42:27 2009
@@ -63,12 +63,12 @@
             ca.unlock(password.toCharArray());
 
             // Return to CA's index page
-            portlet.addInfoMessage(request, portlet.getLocalizedString("infoMsg14", request));
+            portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg14"));
             log.info("CA has been unlocked successfully!");
             return INDEX_MODE+BEFORE_ACTION;
         } catch(Exception e) {
             // An error occurred.  Set the error message and load the page again.
-            portlet.addErrorMessage(request, portlet.getLocalizedString("errorMsg14", request), e.getMessage());
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg14"), e.getMessage());
             log.error("Errors in unlocking CA.", e);
         }
         return getMode()+BEFORE_ACTION;

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ViewCertificateHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ViewCertificateHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ViewCertificateHandler.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/ca/ViewCertificateHandler.java Tue Jan 13 06:42:27 2009
@@ -22,7 +22,6 @@
 import java.security.PublicKey;
 import java.security.cert.Certificate;
 import java.security.interfaces.RSAPublicKey;
-import java.text.MessageFormat;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -91,7 +90,7 @@
             if("true".equalsIgnoreCase(request.getParameter("linkToListRequests")))
                 request.setAttribute("linkToListRequests", Boolean.TRUE);
         } catch (Exception e) {
-            portlet.addErrorMessage(request, MessageFormat.format(portlet.getLocalizedString("errorMsg16", request), sNo), e.getMessage());
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg16", sNo), e.getMessage());
             log.error("Errors trying to view certificate with serial number '"+sNo+"'", e);
         }
     }

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java Tue Jan 13 06:42:27 2009
@@ -151,7 +151,7 @@
                 }
                 if(!configurationManager.isRunning(configId)) {
                     org.apache.geronimo.kernel.config.LifecycleResults lcresult = configurationManager.startConfiguration(configId);
-                    addInfoMessage(actionRequest, getLocalizedString("infoMsg01", actionRequest) + printResults(lcresult.getStarted()));
+                    addInfoMessage(actionRequest, getLocalizedString(actionRequest, "infoMsg01") + printResults(lcresult.getStarted()));
                 }
             } else if (STOP_ACTION.equals(action)) {
                 if(configurationManager.isRunning(configId)) {
@@ -159,28 +159,28 @@
                 }
                 if(configurationManager.isLoaded(configId)) {
                     LifecycleResults lcresult = configurationManager.unloadConfiguration(configId);
-                    addInfoMessage(actionRequest, getLocalizedString("infoMsg02", actionRequest) + printResults(lcresult.getStarted()));
+                    addInfoMessage(actionRequest, getLocalizedString(actionRequest, "infoMsg02") + printResults(lcresult.getStarted()));
                 }
             } else if (UNINSTALL_ACTION.equals(action)) {
                 configurationManager.uninstallConfiguration(configId);
-                addInfoMessage(actionRequest, getLocalizedString("infoMsg04", actionRequest) + "<br />" + configId);
+                addInfoMessage(actionRequest, getLocalizedString(actionRequest, "infoMsg04") + "<br />" + configId);
             } else if (RESTART_ACTION.equals(action)) {
                 LifecycleResults lcresult = configurationManager.reloadConfiguration(configId);
-                addInfoMessage(actionRequest, getLocalizedString("infoMsg03", actionRequest) + printResults(lcresult.getStarted()));
+                addInfoMessage(actionRequest, getLocalizedString(actionRequest, "infoMsg03") + printResults(lcresult.getStarted()));
             } else {
-                addWarningMessage(actionRequest, getLocalizedString("warnMsg01", actionRequest) + action + "<br />");
+                addWarningMessage(actionRequest, getLocalizedString(actionRequest, "warnMsg01") + action + "<br />");
                 throw new PortletException("Invalid value for changeState: " + action);
             }
         } catch (NoSuchConfigException e) {
             // ignore this for now
-            addErrorMessage(actionRequest, getLocalizedString("errorMsg01", actionRequest));
+            addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg01"));
             logger.error("Configuration not found", e);
         } catch (LifecycleException e) {
             // todo we have a much more detailed report now
-            addErrorMessage(actionRequest, getLocalizedString("errorMsg02", actionRequest));
+            addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg02"));
             logger.error("Lifecycle operation failed ", e);
         } catch (Throwable e) {
-            addErrorMessage(actionRequest, getLocalizedString("errorMsg03", actionRequest));
+            addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg03"));
             logger.error("Exception", e);
         }
     }
@@ -307,7 +307,7 @@
         renderRequest.setAttribute("showWebInfo", Boolean.valueOf(showWebInfo()));
         renderRequest.setAttribute("showDependencies", Boolean.valueOf(showDependencies));
         if (moduleDetails.size() == 0) {
-            addWarningMessage(renderRequest, getLocalizedString("warnMsg02", renderRequest));
+            addWarningMessage(renderRequest, getLocalizedString(renderRequest, "warnMsg02"));
         }
         if (WindowState.NORMAL.equals(renderRequest.getWindowState())) {
             normalView.include(renderRequest, renderResponse);

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/ChangePasswordHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/ChangePasswordHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/ChangePasswordHandler.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/ChangePasswordHandler.java Tue Jan 13 06:42:27 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.geronimo.console.keystores;
 
-import java.text.MessageFormat;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.geronimo.console.BasePortlet;
@@ -80,24 +78,24 @@
                 // Keystore password is to be changed.
                 data.changeKeystorePassword(password.toCharArray(), newPassword.toCharArray());
                 response.setRenderParameter("id", keystore);
-                portlet.addInfoMessage(request, MessageFormat.format(portlet.getLocalizedString("infoMsg10", request), keystore));
+                portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg10", keystore));
                 return VIEW_KEYSTORE+BEFORE_ACTION;
             } else {
                 // Private key password is to be changed.
                 data.changeKeyPassword(alias, password.toCharArray(), newPassword.toCharArray());
                 response.setRenderParameter("id", keystore);
                 response.setRenderParameter("alias", alias);
-                portlet.addInfoMessage(request, MessageFormat.format(portlet.getLocalizedString("infoMsg11", request), alias));
+                portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg11", alias));
                 return CERTIFICATE_DETAILS;
             }
         } catch (Exception e) {
         	String message = "";
         	if(alias == null || alias.equals("")) {
                 message = "Unable to change password for keystore " + keystore + ".";
-                portlet.addErrorMessage(request, MessageFormat.format(portlet.getLocalizedString("errorMsg11", request), keystore), e.getMessage());
+                portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg11", keystore), e.getMessage());
         	} else {
                 message = "Unable to change password for private key " + alias + ".";
-                portlet.addErrorMessage(request, MessageFormat.format(portlet.getLocalizedString("errorMsg12", request), alias), e.getMessage());
+                portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg12", alias), e.getMessage());
         	}
             log.error(message, e);
             return getMode()+BEFORE_ACTION;

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/EditKeystoreHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/EditKeystoreHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/EditKeystoreHandler.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/EditKeystoreHandler.java Tue Jan 13 06:42:27 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.geronimo.console.keystores;
 
-import java.text.MessageFormat;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.geronimo.console.BasePortlet;
@@ -70,11 +68,11 @@
         try {
             data.unlockEdit(storePass);
         } catch (KeystoreException e) {
-        	portlet.addErrorMessage(request, MessageFormat.format(portlet.getLocalizedString("errorMsg08", request), keystore), e.getMessage());
+        	portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg08", keystore), e.getMessage());
             log.error("Unable to unlock keystore "+keystore+" for editing.", e);
             return getMode()+BEFORE_ACTION;
         }
-        portlet.addInfoMessage(request, MessageFormat.format(portlet.getLocalizedString("infoMsg05", request), keystore));
+        portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg05", keystore));
         return LIST_MODE+BEFORE_ACTION;
     }
 }

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/LockEditKeystoreHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/LockEditKeystoreHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/LockEditKeystoreHandler.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/LockEditKeystoreHandler.java Tue Jan 13 06:42:27 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.geronimo.console.keystores;
 
-import java.text.MessageFormat;
-
 import org.apache.geronimo.console.BasePortlet;
 import org.apache.geronimo.console.MultiPageModel;
 
@@ -42,7 +40,7 @@
         String keystore = request.getParameter("keystore");
         KeystoreData data = ((KeystoreData) request.getPortletSession(true).getAttribute(KEYSTORE_DATA_PREFIX + keystore));
         data.lockEdit();
-        portlet.addInfoMessage(request, MessageFormat.format(portlet.getLocalizedString("infoMsg06", request), keystore));
+        portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg06", keystore));
         return LIST_MODE+BEFORE_ACTION;
     }
 

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/LockKeystoreHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/LockKeystoreHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/LockKeystoreHandler.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/LockKeystoreHandler.java Tue Jan 13 06:42:27 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.geronimo.console.keystores;
 
-import java.text.MessageFormat;
-
 import org.apache.geronimo.console.BasePortlet;
 import org.apache.geronimo.console.MultiPageModel;
 import org.apache.geronimo.management.geronimo.KeystoreException;
@@ -44,7 +42,7 @@
         KeystoreData data = ((KeystoreData) request.getPortletSession(true).getAttribute(KEYSTORE_DATA_PREFIX + keystore));
         try {
             data.lockUse();
-            portlet.addInfoMessage(request, MessageFormat.format(portlet.getLocalizedString("infoMsg08", request), keystore));
+            portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg08", keystore));
         } catch (KeystoreException e) {
             throw new PortletException(e);
         }

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/UnlockKeyHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/UnlockKeyHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/UnlockKeyHandler.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/UnlockKeyHandler.java Tue Jan 13 06:42:27 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.geronimo.console.keystores;
 
-import java.text.MessageFormat;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.geronimo.console.BasePortlet;
@@ -74,11 +72,11 @@
         } catch (KeystoreException e) {
             response.setRenderParameter("keystore", keystore);
             response.setRenderParameter("password", password);
-            portlet.addErrorMessage(request, MessageFormat.format(portlet.getLocalizedString("errorMsg10", request), alias), e.getMessage());
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg10", alias), e.getMessage());
             log.error("Unable to unlock key '"+alias+"'.", e);
             return getMode()+BEFORE_ACTION;
         }
-        portlet.addInfoMessage(request, MessageFormat.format(portlet.getLocalizedString("infoMsg09", request), alias, keystore));
+        portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg09", alias, keystore));
         return LIST_MODE+BEFORE_ACTION;
     }
 }

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/UnlockKeystoreHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/UnlockKeystoreHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/UnlockKeystoreHandler.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/keystores/UnlockKeystoreHandler.java Tue Jan 13 06:42:27 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.geronimo.console.keystores;
 
-import java.text.MessageFormat;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.geronimo.console.BasePortlet;
@@ -83,11 +81,11 @@
                 return UNLOCK_KEY+BEFORE_ACTION;
             } // otherwise it has no keys
         } catch (Exception e) {
-        	portlet.addErrorMessage(request, MessageFormat.format(portlet.getLocalizedString("errorMsg09", request), keystore), e.getMessage());
+        	portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg09", keystore), e.getMessage());
             log.error("Unable to unlock keystore '"+keystore+"' for availability.", e);
             return getMode()+BEFORE_ACTION;
         }
-        portlet.addInfoMessage(request, MessageFormat.format(portlet.getLocalizedString("infoMsg07", request), keystore));
+        portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg07", keystore));
         return LIST_MODE+BEFORE_ACTION;
     }
 }

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/securitymanager/SEGroupsPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/securitymanager/SEGroupsPortlet.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/securitymanager/SEGroupsPortlet.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/securitymanager/SEGroupsPortlet.java Tue Jan 13 06:42:27 2009
@@ -123,7 +123,7 @@
                 try {
                     SERealmGroupHelper.addGroup(group, users);
                 } catch (Exception e) {
-                    addErrorMessage(actionRequest, getLocalizedString("errorMsg07", actionRequest), e.getMessage());
+                    addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg07"), e.getMessage());
                 }
             } else if ("new".equals(action)) {
                 currAction = "new";
@@ -135,7 +135,7 @@
                 actionResponse.setRenderParameter("group", group);
             }
         } catch (Exception e) {
-            addErrorMessage(actionRequest, getLocalizedString("errorMsg06", actionRequest), e.getMessage());
+            addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg06"), e.getMessage());
         }
     }
 }
\ No newline at end of file

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/securitymanager/SEUsersPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/securitymanager/SEUsersPortlet.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/securitymanager/SEUsersPortlet.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/securitymanager/SEUsersPortlet.java Tue Jan 13 06:42:27 2009
@@ -144,7 +144,7 @@
                     }
                     SERealmUserHelper.deleteUser(user);
                 } catch (Exception e) {
-                    addErrorMessage(actionRequest, getLocalizedString("errorMsg04", actionRequest), e.getMessage());
+                    addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg04"), e.getMessage());
                 }
             } else if ("update".equals(action)) {
                 if(password != null && !password.equals("")) {
@@ -161,7 +161,7 @@
                         SERealmGroupHelper.updateGroup(group, groupUsers);
                     }
                 } catch (Exception e) {
-                    addErrorMessage(actionRequest, getLocalizedString("errorMsg05", actionRequest), e.getMessage());
+                    addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg05"), e.getMessage());
                 }
             } else if ("new".equals(action)) {
                 currAction = "new";
@@ -173,7 +173,7 @@
                 actionResponse.setRenderParameter("user", user);
             }
         } catch (Exception e) {
-            addErrorMessage(actionRequest, getLocalizedString("errorMsg06", actionRequest), e.getMessage());
+            addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg06"), e.getMessage());
         }
     }
 

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/servermanager/ServerManagerPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/servermanager/ServerManagerPortlet.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/servermanager/ServerManagerPortlet.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/servermanager/ServerManagerPortlet.java Tue Jan 13 06:42:27 2009
@@ -74,7 +74,7 @@
             kernel.shutdown();
             System.exit(0);
         } else {
-            addWarningMessage(request, getLocalizedString("warnMsg07", request));
+            addWarningMessage(request, getLocalizedString(request, "warnMsg07"));
             normalView.include(request, response);
         }
     }

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java Tue Jan 13 06:42:27 2009
@@ -387,6 +387,9 @@
                 all.add(result);
             }
         }
+        if (0 == all.size()) {
+            addWarningMessage(renderRequest, "warnMsg08");
+        }
         renderRequest.setAttribute("containers", all);
         renderRequest.setAttribute("serverPort", new Integer(renderRequest.getServerPort()));
 

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/WebManagerPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/WebManagerPortlet.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/WebManagerPortlet.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/WebManagerPortlet.java Tue Jan 13 06:42:27 2009
@@ -122,7 +122,7 @@
                                 populateStats = true;      // this is a Lazy provider and stats are enabled so populate the stats
                             } else {
                                 renderRequest.setAttribute("statsOn", Boolean.FALSE);  // indicate that stats are currently disabled
-                                addWarningMessage(renderRequest, getLocalizedString("warnMsg04", renderRequest));
+                                addWarningMessage(renderRequest, getLocalizedString(renderRequest, "warnMsg04"));
                             }
                         } else {
                             renderRequest.setAttribute("statsLazy", Boolean.FALSE);  // indicate that enable/disable should not be shown for this container
@@ -156,7 +156,7 @@
                         }
                     } else {
                         renderRequest.setAttribute("statsSupported", Boolean.FALSE);   // indicate that statistics are not supported for this container
-                        addWarningMessage(renderRequest, getLocalizedString("warnMsg03", renderRequest));
+                        addWarningMessage(renderRequest, getLocalizedString(renderRequest, "warnMsg03"));
                     }
                 } else {
                     log.error("Error attempting to retrieve the web containers");

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/resources/portletinfo.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/resources/portletinfo.properties?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/resources/portletinfo.properties (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/resources/portletinfo.properties Tue Jan 13 06:42:27 2009
@@ -202,3 +202,5 @@
 warnMsg06 = A certificate with the serial number <b>{0}</b> has already been issued. You may be seeing this message since you have clicked on 'Issue Certificate' button a second time.
 
 warnMsg07 = <p style='font-size:120%;'><b>A shutdown of the server will disable this Web Console! Proceed only if you are certain you want to terminate the server.</b></p>
+
+warnMsg08 = There are no Web Containers defined.

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/resources/portletinfo_zh.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/resources/portletinfo_zh.properties?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/resources/portletinfo_zh.properties (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/resources/portletinfo_zh.properties Tue Jan 13 06:42:27 2009
@@ -202,3 +202,5 @@
 warnMsg06 = \u5E8F\u5217\u53F7\u4E3A<b>{0}</b>\u7684\u8BC1\u4E66\u5148\u524D\u5DF2\u88AB\u53D1\u5E03\uFF0C\u5F53\u4F60\u70B9\u51FB\u4E86'\u53D1\u5E03\u8BC1\u4E66'\u6309\u94AE\u4E24\u6B21\u65F6\u4F60\u53EF\u80FD\u4F1A\u770B\u5230\u8FD9\u6761\u6D88\u606F\u3002
 
 warnMsg07 = <p style='font-size:120%;'><b>\u5173\u95ED\u670D\u52A1\u5668\u5C06\u4F1A\u4F7FWeb\u63A7\u5236\u53F0\u4E0D\u53EF\u7528\uFF01\u53EA\u6709\u5F53\u4F60\u786E\u5B9A\u8981\u5173\u95ED\u670D\u52A1\u5668\u65F6\uFF0C\u624D\u7EE7\u7EED\u3002</b></p>
+
+warnMsg08 = \u672A\u5B9A\u4E49\u4EFB\u4F55Web\u5BB9\u5668\u3002

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/editConnector.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/editConnector.jsp?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/editConnector.jsp (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/editConnector.jsp Tue Jan 13 06:42:27 2009
@@ -20,7 +20,6 @@
 <%@ taglib prefix="portlet" uri="http://java.sun.com/portlet" %>
 <fmt:setBundle basename="consolebase"/>
 <portlet:defineObjects/>
-<fmt:setBundle basename="consolebase"/>
 <script language="JavaScript">
 // validate the form submission
 function <portlet:namespace/>validateForm(){

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp Tue Jan 13 06:42:27 2009
@@ -21,19 +21,16 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
+<%@ taglib uri="/WEB-INF/CommonMsg.tld" prefix="CommonMsg"%>
 <fmt:setBundle basename="consolebase"/>
 <portlet:defineObjects/>
 
+<CommonMsg:commonMsg/><br>
+
 <!-- Show existing connectors -->
-<c:choose>
-  <c:when test="${empty(containers)}">There are no Web Containers defined</c:when>
-  <c:otherwise>
-    <c:forEach var="container" items="${containers}">
+<c:forEach var="container" items="${containers}">
       <c:if test="${fn:length(containers) > 1}"><p><b>Connectors for ${container.name}:</b></p></c:if>
-        <c:choose>
-          <c:when test="${empty(container.connectors)}"><p>There are no connectors defined for ${container.name}</p></c:when>
-          <c:otherwise>
-          <table width="100%" class="TableLine" summary="Network Listeners">
+<table width="100%" class="TableLine" summary="Network Listeners">
           <tr>
             <th scope="col" class="DarkBackground" align="left"><fmt:message key="consolebase.common.name"/></th>
             <th scope="col" class="DarkBackground" align="center"><fmt:message key="webmanager.common.protocol"/></th>
@@ -103,8 +100,6 @@
           </tr>
 </c:forEach>
 </table>
-          </c:otherwise>
-        </c:choose>
 
 <P><HR><P>
 <!-- Links to add new connectors -->
@@ -120,6 +115,4 @@
 </c:forEach>
 </ul>
 
-    </c:forEach>
-  </c:otherwise>
-</c:choose>
+</c:forEach>

Modified: geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/BasePortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/BasePortlet.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/BasePortlet.java (original)
+++ geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/BasePortlet.java Tue Jan 13 06:42:27 2009
@@ -22,6 +22,8 @@
 import java.lang.reflect.Modifier;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Locale;
+import java.text.MessageFormat;
 
 import javax.portlet.ActionRequest;
 import javax.portlet.GenericPortlet;
@@ -152,9 +154,10 @@
         addCommonMessage(CommonMessage.Type.Info, request, messages);
     }
 
-    public final String getLocalizedString(String key, PortletRequest request) {
+    public final String getLocalizedString(PortletRequest request, String key, Object... vars) {
         String value = getResourceBundle(request.getLocale()).getString(key);
-        return null == value ? key : value;
+        if (null == value || 0 == value.length()) return key;     
+        return MessageFormat.format(value, vars);
     }
 
     private void addCommonMessage(CommonMessage.Type type, PortletRequest request, String[] messages) {

Modified: geronimo/server/trunk/plugins/console/console-portal-driver/src/main/resources/portaldriver_zh.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-portal-driver/src/main/resources/portaldriver_zh.properties?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-portal-driver/src/main/resources/portaldriver_zh.properties (original)
+++ geronimo/server/trunk/plugins/console/console-portal-driver/src/main/resources/portaldriver_zh.properties Tue Jan 13 06:42:27 2009
@@ -23,7 +23,7 @@
 console.common.password                   = \u5BC6\u7801
 console.common.username                   = \u7528\u6237\u540D
 console.head.title                        = Geronimo\u63A7\u5236\u53F0
-console.login.components                  = <strong>Geronimo&#8482;</strong> \u96C6\u6210\u4E86\u5982\u4E0B\u7EC4\u4EF6:<BR/> &nbsp;&nbsp;&#149;&nbsp; Application server (Apache Geronimo)<br/> &nbsp;&nbsp;&#149;&nbsp; Web server and servlet engine (Tomcat)<br/> &nbsp;&nbsp;&#149;&nbsp; Web server and servlet engine (Jetty)<br/> &nbsp;&nbsp;&#149;&nbsp; JSP compiler (Jasper)<br/> &nbsp;&nbsp;&#149;&nbsp; JAX-RPC Web Services engine (Apache Axis)<br/> &nbsp;&nbsp;&#149;&nbsp; JAX-WS Web Services engine (Apache Axis2)<br/> &nbsp;&nbsp;&#149;&nbsp; JAX-WS Web Services engine (Apache CXF)<br/> &nbsp;&nbsp;&#149;&nbsp; Relational database (Apache Derby)<br/> &nbsp;&nbsp;&#149;&nbsp; Messaging (ActiveMQ)<br/> &nbsp;&nbsp;&#149;&nbsp; User management services<br/> &nbsp;&nbsp;&#149;&nbsp; Centralized administration console<br/> 
+console.login.components                  = <strong>Geronimo&#8482;</strong> \u96C6\u6210\u4E86\u5982\u4E0B\u7EC4\u4EF6:<BR/> &nbsp;&nbsp;&#149;&nbsp; \u5E94\u7528\u670D\u52A1\u5668 (Apache Geronimo)<br/> &nbsp;&nbsp;&#149;&nbsp; Web\u670D\u52A1\u5668\u548Cservlet\u5F15\u64CE (Tomcat)<br/> &nbsp;&nbsp;&#149;&nbsp; Web\u670D\u52A1\u5668\u548Cservlet\u5F15\u64CE (Jetty)<br/> &nbsp;&nbsp;&#149;&nbsp; JSP\u7F16\u8BD1\u5668 (Jasper)<br/> &nbsp;&nbsp;&#149;&nbsp; JAX-RPC Web\u670D\u52A1\u5F15\u64CE (Apache Axis)<br/> &nbsp;&nbsp;&#149;&nbsp; JAX-WS Web\u670D\u52A1\u5F15\u64CE (Apache Axis2)<br/> &nbsp;&nbsp;&#149;&nbsp; JAX-WS Web\u670D\u52A1\u5F15\u64CE (Apache CXF)<br/> &nbsp;&nbsp;&#149;&nbsp; \u5173\u7CFB\u6570\u636E\u5E93 (Apache Derby)<br/> &nbsp;&nbsp;&#149;&nbsp; \u6D88\u606F\u4E2D\u95F4\u4EF6 (ActiveMQ)<br/> &nbsp;&nbsp;&#149;&nbsp; \u7528\u6237\u7BA1\u7406\u670D\u52A1<br/> &nbsp;&nbsp;&#149;&nbsp; \u96C6\u4E2D\u5F0F\u7684\u7BA1\u7406\u63A7\u5236\u53F0<br/> 
 console.login.introduction                = <strong>GERONIMO&#8482;</strong>\u662F\u4E00\u4E2A\u901A\u8FC7\u4E86Java\u8BA4\u8BC1\u7684\u3001\u751F\u4EA7\u7EA7\u7684\u5E73\u53F0\u3002\u5176\u521D\u8877\u662F\u4E3A\u4E86\u8BA9\u5F00\u53D1\u8005\u80FD\u591F\u5FEB\u901F\u90E8\u7F72\u548C\u7BA1\u7406\u5176\u5E94\u7528\uFF0C\u7ED3\u679C\u4FBF\u8BDE\u751F\u4E86\u4E00\u4E2A\u5B8C\u6574\u5E76\u4E14\u529F\u80FD\u5F3A\u5927\u7684\u5E94\u7528\u5E73\u53F0\u3002\u5B83\u5229\u7528\u4E86\u5F00\u6E90\u793E\u7684\u6700\u65B0\u521B\u65B0\u4E14\u7B80\u5316\u4E86\u5E94\u7528\u7684\u90E8\u7F72\u548C\u7EF4\u62A4\u3002
 console.login.requireCookies              = \u6CE8\u610F\uFF1A\u9700\u8981\u6FC0\u6D3B\u6D4F\u89C8\u5668\u7684Cookie\u529F\u80FD\uFF0C\u624D\u80FD\u767B\u5F55\u5230Geronimo\u63A7\u5236\u53F0\u3002
 console.login.welcome                     = \u6B22\u8FCE\u4F7F\u7528Geronimo&#8482;\u7BA1\u7406\u63A7\u5236\u53F0

Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java (original)
+++ geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java Tue Jan 13 06:42:27 2009
@@ -154,7 +154,7 @@
                 String abbrStatusMessage;
                 String fullStatusMessage = null;
                 if(progress.getDeploymentStatus().isCompleted()) {
-                    abbrStatusMessage = getLocalizedString(!isRedeploy ? "infoMsg01" : "infoMsg02", actionRequest);
+                    abbrStatusMessage = getLocalizedString(actionRequest, !isRedeploy ? "infoMsg01" : "infoMsg02");
                     addInfoMessage(actionRequest, abbrStatusMessage);
                     // start installed app/s
                     if (!isRedeploy && startApp != null && !startApp.equals("")) {
@@ -163,10 +163,10 @@
                             Thread.sleep(100);
                         }
                         if (progress.getDeploymentStatus().isCompleted()) {
-                            abbrStatusMessage = getLocalizedString("infoMsg03", actionRequest);
+                            abbrStatusMessage = getLocalizedString(actionRequest, "infoMsg03");
                             addInfoMessage(actionRequest, abbrStatusMessage);
                         } else {
-                            abbrStatusMessage = getLocalizedString("errorMsg02", actionRequest);
+                            abbrStatusMessage = getLocalizedString(actionRequest, "errorMsg02");
                             fullStatusMessage = progress.getDeploymentStatus().getMessage();
                             addErrorMessage(actionRequest, abbrStatusMessage, fullStatusMessage);
                         }
@@ -175,7 +175,7 @@
                     fullStatusMessage = progress.getDeploymentStatus().getMessage();
                     // for the abbreviated status message clip off everything
                     // after the first line, which in most cases means the gnarly stacktrace
-                    abbrStatusMessage = getLocalizedString("errorMsg01", actionRequest);
+                    abbrStatusMessage = getLocalizedString(actionRequest, "errorMsg01");
                     addErrorMessage(actionRequest, abbrStatusMessage, fullStatusMessage);
                     // try to provide an upgraded version of the plan
                     try {

Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MonitoringPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MonitoringPortlet.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MonitoringPortlet.java (original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MonitoringPortlet.java Tue Jan 13 06:42:27 2009
@@ -19,7 +19,6 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
-import java.text.MessageFormat;
 
 import javax.annotation.Resource;
 import javax.naming.Context;
@@ -257,9 +256,9 @@
                                   String password, int port, String protocol, PortletRequest request) {
         try {
             new MRCConnector(ip, username, password, port, protocol);
-            addInfoMessage(request, getLocalizedString("infoMsg01", request));
+            addInfoMessage(request, getLocalizedString(request, "infoMsg01"));
         } catch (Exception e) {
-            addInfoMessage(request, getLocalizedString("errorMsg01", request), e.getMessage());
+            addInfoMessage(request, getLocalizedString(request, "errorMsg01"), e.getMessage());
         }
     }
 
@@ -273,17 +272,17 @@
                 userTransaction.commit();
             }
             if (enable) {
-                addInfoMessage(request, MessageFormat.format(getLocalizedString("infoMsg02", request), server_id));
+                addInfoMessage(request, getLocalizedString(request, "infoMsg02", server_id));
             }
             else {
-                addInfoMessage(request, MessageFormat.format(getLocalizedString("infoMsg03", request), server_id));
+                addInfoMessage(request, getLocalizedString(request, "infoMsg03", server_id));
             }
         } catch (Exception e) {
             if (enable) {
-                addErrorMessage(request, MessageFormat.format(getLocalizedString("errorMsg02", request), server_id), e.getMessage());
+                addErrorMessage(request, getLocalizedString(request, "errorMsg02", server_id), e.getMessage());
             }
             else {
-            	addErrorMessage(request, MessageFormat.format(getLocalizedString("errorMsg03", request), server_id), e.getMessage());
+            	addErrorMessage(request, getLocalizedString(request, "errorMsg03", server_id), e.getMessage());
             }
         }
     }
@@ -570,9 +569,9 @@
             } finally {
                 userTransaction.commit();
             }
-            addInfoMessage(actionRequest, MessageFormat.format(getLocalizedString("infoMsg08", actionRequest), actionRequest.getParameter("name")));
+            addInfoMessage(actionRequest, getLocalizedString(actionRequest, "infoMsg08", actionRequest.getParameter("name")));
         } catch (Exception e) {
-        	addErrorMessage(actionRequest, MessageFormat.format(getLocalizedString("errorMsg11", actionRequest), actionRequest.getParameter("name")), e.getMessage());
+        	addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg11", actionRequest.getParameter("name")), e.getMessage());
         }
 
     }
@@ -599,9 +598,9 @@
             } finally {
                 userTransaction.commit();
             }
-            addInfoMessage(actionRequest, MessageFormat.format(getLocalizedString("infoMsg09", actionRequest), name));
+            addInfoMessage(actionRequest, getLocalizedString(actionRequest, "infoMsg09", name));
         } catch (Exception e) {
-        	addErrorMessage(actionRequest, MessageFormat.format(getLocalizedString("errorMsg12", actionRequest), name), e.getMessage());
+        	addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg12", name), e.getMessage());
         }
     }
 
@@ -636,9 +635,9 @@
             } finally {
                 userTransaction.commit();
             }
-            addInfoMessage(actionRequest, getLocalizedString("infoMsg10", actionRequest));
+            addInfoMessage(actionRequest, getLocalizedString(actionRequest, "infoMsg10"));
         } catch (Exception e) {
-        	addErrorMessage(actionRequest, getLocalizedString("errorMsg13", actionRequest), e.getMessage());
+        	addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg13"), e.getMessage());
         }
     }
 
@@ -664,9 +663,9 @@
             } finally {
                 userTransaction.commit();
             }
-            addInfoMessage(actionRequest, MessageFormat.format(getLocalizedString("infoMsg11", actionRequest), name, host));
+            addInfoMessage(actionRequest, getLocalizedString(actionRequest, "infoMsg11", name, host));
         } catch (Exception e) {
-        	addErrorMessage(actionRequest, getLocalizedString("errorMsg14", actionRequest), e.getMessage());
+        	addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg14"), e.getMessage());
         }
     }
 
@@ -683,9 +682,9 @@
             } finally {
                 userTransaction.commit();
             }
-            addInfoMessage(actionRequest, getLocalizedString("infoMsg12", actionRequest));
+            addInfoMessage(actionRequest, getLocalizedString(actionRequest, "infoMsg12"));
         } catch (Exception e) {
-        	addErrorMessage(actionRequest, getLocalizedString("errorMsg15", actionRequest), e.getMessage());
+        	addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg15"), e.getMessage());
         }
     }
 
@@ -702,9 +701,9 @@
             } finally {
                 userTransaction.commit();
             }
-            addInfoMessage(actionRequest, getLocalizedString("infoMsg13", actionRequest));
+            addInfoMessage(actionRequest, getLocalizedString(actionRequest, "infoMsg13"));
         } catch (Exception e) {
-        	addErrorMessage(actionRequest, getLocalizedString("errorMsg16", actionRequest), e.getMessage());
+        	addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg16"), e.getMessage());
         }
     }
 
@@ -722,9 +721,9 @@
             } finally {
                 userTransaction.commit();
             }
-            addInfoMessage(actionRequest, MessageFormat.format(getLocalizedString("infoMsg14", actionRequest), graph.getGraphName1()));
+            addInfoMessage(actionRequest, getLocalizedString(actionRequest, "infoMsg14", graph.getGraphName1()));
         } catch (Exception e) {
-        	addErrorMessage(actionRequest, getLocalizedString("errorMsg17", actionRequest), e.getMessage());
+        	addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg17"), e.getMessage());
         }
     }
 
@@ -761,14 +760,14 @@
                 Node node = entityManager.find(Node.class, actionRequest.getParameter("server_id"));
                 graph.setNode(node);
                 updateGraphFromRequest(actionRequest, graph);
-                addInfoMessage(actionRequest, MessageFormat.format(getLocalizedString("infoMsg15", actionRequest), graph.getGraphName1()));
+                addInfoMessage(actionRequest, getLocalizedString(actionRequest, "infoMsg15", graph.getGraphName1()));
             } finally {
                 userTransaction.commit();
             }
 
         } catch (Exception e) {
             log.info("error updating graph", e);
-            addErrorMessage(actionRequest, getLocalizedString("errorMsg18", actionRequest), e.getMessage());
+            addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg18"), e.getMessage());
         }
     }
 
@@ -781,14 +780,14 @@
             try {
                 Graph graph = entityManager.find(Graph.class, Integer.parseInt(graph_id));
                 entityManager.remove(graph);
-                addInfoMessage(actionRequest, MessageFormat.format(getLocalizedString("infoMsg16", actionRequest), graph.getGraphName1()));
+                addInfoMessage(actionRequest, getLocalizedString(actionRequest, "infoMsg16", graph.getGraphName1()));
             } finally {
                 userTransaction.commit();
             }
 
         } catch (Exception e) {
             log.info("error deleting graph", e);
-            addErrorMessage(actionRequest, getLocalizedString("errorMsg19", actionRequest), e.getMessage());
+            addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg19"), e.getMessage());
         }
     }
 
@@ -797,14 +796,14 @@
         try {
             node = getNodeByName(server_id);
         } catch (PortletException e) {
-            addInfoMessage(request, getLocalizedString("errorMsg04", request), e.getMessage());
+            addInfoMessage(request, getLocalizedString(request, "errorMsg04"), e.getMessage());
             return;
         }
         MRCConnector mrc;
         try {
             mrc = new MRCConnector(node);
         } catch (Exception e) {
-            addErrorMessage(request, MessageFormat.format(getLocalizedString("errorMsg05", request), node.getHost()), e.getMessage());
+            addErrorMessage(request, getLocalizedString(request, "errorMsg05", node.getHost()), e.getMessage());
             return;
         }
 
@@ -812,13 +811,13 @@
         try {
             if (mrc.startTrackingMbean(mbean)) {
                 String mbarr[] = mbean.split("name=");
-                addInfoMessage(request, MessageFormat.format(getLocalizedString("infoMsg04", request), mbarr[1], node.getHost()));
+                addInfoMessage(request, getLocalizedString(request, "infoMsg04", mbarr[1], node.getHost()));
             } else {
                 String mbarr[] = mbean.split("name=");
-                addErrorMessage(request, MessageFormat.format(getLocalizedString("errorMsg06", request), mbarr[1], node.getHost()));
+                addErrorMessage(request, getLocalizedString(request, "errorMsg06", mbarr[1], node.getHost()));
             }
         } catch (Exception e) {
-            addErrorMessage(request, MessageFormat.format(getLocalizedString("errorMsg06", request), mbean, node.getHost()), e.getMessage());
+            addErrorMessage(request, getLocalizedString(request, "errorMsg06", mbean, node.getHost()), e.getMessage());
         }
     }
 
@@ -827,14 +826,14 @@
         try {
             node = getNodeByName(server_id);
         } catch (PortletException e) {
-            addInfoMessage(request, getLocalizedString("errorMsg04", request), e.getMessage());
+            addInfoMessage(request, getLocalizedString(request, "errorMsg04"), e.getMessage());
             return;
         }
         MRCConnector mrc;
         try {
             mrc = new MRCConnector(node);
         } catch (Exception e) {
-            addErrorMessage(request, MessageFormat.format(getLocalizedString("errorMsg05", request), node.getHost()), e.getMessage());
+            addErrorMessage(request, getLocalizedString(request, "errorMsg05", node.getHost()), e.getMessage());
             return;
 
         }
@@ -842,13 +841,13 @@
         try {
             if (mrc.stopTrackingMbean(mbean)) {
                 String mbarr[] = mbean.split("name=");
-                addInfoMessage(request, MessageFormat.format(getLocalizedString("infoMsg05", request), mbarr[1], node.getHost()));
+                addInfoMessage(request, getLocalizedString(request, "infoMsg05", mbarr[1], node.getHost()));
             } else {
                 String mbarr[] = mbean.split("name=");
-                addErrorMessage(request, MessageFormat.format(getLocalizedString("errorMsg06", request), mbarr[1], node.getHost()));
+                addErrorMessage(request, getLocalizedString(request, "errorMsg06", mbarr[1], node.getHost()));
             }
         } catch (Exception e) {
-            addErrorMessage(request, MessageFormat.format(getLocalizedString("errorMsg06", request), mbean, node.getHost()), e.getMessage());
+            addErrorMessage(request, getLocalizedString(request, "errorMsg06", mbean, node.getHost()), e.getMessage());
         }
     }
 
@@ -858,18 +857,18 @@
             node = getNodeByName(server_id);
         } catch (PortletException e) {
             log.info("error", e);
-            addErrorMessage(request, MessageFormat.format(getLocalizedString("errorMsg08", request), server_id), e.getMessage());
+            addErrorMessage(request, getLocalizedString(request, "errorMsg08", server_id), e.getMessage());
             return;
         }
         try {
             MRCConnector mrc = new MRCConnector(node);
             if (mrc.stopSnapshotThread()) {
-                addInfoMessage(request, MessageFormat.format(getLocalizedString("infoMsg06", request), server_id));
+                addInfoMessage(request, getLocalizedString(request, "infoMsg06", server_id));
             } else {
-            	addErrorMessage(request, MessageFormat.format(getLocalizedString("errorMsg09", request), server_id));
+            	addErrorMessage(request, getLocalizedString(request, "errorMsg09", server_id));
             }
         } catch (Exception e) {
-        	addErrorMessage(request, MessageFormat.format(getLocalizedString("errorMsg09", request), server_id), e.getMessage());
+        	addErrorMessage(request, getLocalizedString(request, "errorMsg09", server_id), e.getMessage());
         }
     }
 
@@ -879,18 +878,18 @@
             node = getNodeByName(server_id);
         } catch (PortletException e) {
             log.info("error", e);
-            addErrorMessage(request, MessageFormat.format(getLocalizedString("errorMsg08", request), server_id), e.getMessage());
+            addErrorMessage(request, getLocalizedString(request, "errorMsg08", server_id), e.getMessage());
             return;
         }
         try {
             MRCConnector mrc = new MRCConnector(node);
             if (mrc.startSnapshotThread(snapshotDuration)) {
-                addInfoMessage(request, MessageFormat.format(getLocalizedString("infoMsg07", request), server_id));
+                addInfoMessage(request, getLocalizedString(request, "infoMsg07", server_id));
             } else {
-            	addErrorMessage(request, MessageFormat.format(getLocalizedString("errorMsg10", request), server_id));
+            	addErrorMessage(request, getLocalizedString(request, "errorMsg10", server_id));
             }
         } catch (Exception e) {
-        	addErrorMessage(request, MessageFormat.format(getLocalizedString("errorMsg10", request), server_id), e.getMessage());
+        	addErrorMessage(request, getLocalizedString(request, "errorMsg10", server_id), e.getMessage());
 
         }
     }

Modified: geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/DeployStatusHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/DeployStatusHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/DeployStatusHandler.java (original)
+++ geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/DeployStatusHandler.java Tue Jan 13 06:42:27 2009
@@ -65,10 +65,10 @@
 
             String[] status = JSR88_Util.deploy(request, moduleFile, planFile);
             if (null != status[1] && 0 != status[1].length()) {
-                portlet.addErrorMessage(request, portlet.getLocalizedString(status[0], request), status[1]);
+                portlet.addErrorMessage(request, portlet.getLocalizedString(request, status[0]), status[1]);
             }
             else {
-                portlet.addInfoMessage(request, portlet.getLocalizedString(status[0], request));
+                portlet.addInfoMessage(request, portlet.getLocalizedString(request, status[0]));
             }
         } catch (URISyntaxException e) {
             log.error(e.getMessage(), e);

Modified: geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/GetArchiveHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/GetArchiveHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/GetArchiveHandler.java (original)
+++ geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/GetArchiveHandler.java Tue Jan 13 06:42:27 2009
@@ -84,7 +84,7 @@
                 return EJB_MODE + "-before";
             }
         }
-        portlet.addErrorMessage(request, portlet.getLocalizedString("errorMsg01", request));
+        portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg01"));
         return getMode();
     }
 

Modified: geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/ReferencesHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/ReferencesHandler.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/ReferencesHandler.java (original)
+++ geronimo/server/trunk/plugins/plancreator/plancreator-portlets/src/main/java/org/apache/geronimo/console/configcreator/ReferencesHandler.java Tue Jan 13 06:42:27 2009
@@ -63,7 +63,7 @@
         WARConfigData data = getWARSessionData(request);
         data.readReferencesData(request);
         if (data.isReferenceNotResolved()) {
-            portlet.addErrorMessage(request, portlet.getLocalizedString("errorMsg03", request));
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg03"));
             return getMode() + "-before";
         }
         if (data.getSecurity() != null) {

Modified: geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLHelper.java?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLHelper.java (original)
+++ geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLHelper.java Tue Jan 13 06:42:27 2009
@@ -20,7 +20,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.text.MessageFormat;
 import java.io.File;
 import java.sql.Connection;
 import java.sql.SQLException;
@@ -53,10 +52,10 @@
         try {
             conn = DerbyConnectionUtil.getDerbyConnection(dbName,
                     DerbyConnectionUtil.CREATE_DB_PROP);
-            portlet.addInfoMessage(request, MessageFormat.format(portlet.getLocalizedString("infoMsg01", request), dbName));
+            portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg01", dbName));
             return true;
         } catch (Throwable e) {
-            portlet.addErrorMessage(request, portlet.getLocalizedString("errorMsg01", request), e.getMessage());
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg01"), e.getMessage());
             return false;
         } finally {
             // close DB connection
@@ -65,7 +64,7 @@
                     conn.close();
                 }
             } catch (SQLException e) {
-                portlet.addErrorMessage(request, portlet.getLocalizedString("errorMsg02", request), e.getMessage());
+                portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg02"), e.getMessage());
             }
         }        
     }
@@ -81,7 +80,7 @@
     public boolean deleteDB(String derbyHome, String dbName, PortletRequest request) {
         // shutdown database before deleting it
         if (!shutdownDB(dbName)) {
-            portlet.addErrorMessage(request, portlet.getLocalizedString("errorMsg03", request));
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg03"));
             return false;
         }
 
@@ -91,7 +90,7 @@
                     + PARENT_FOLDER + File.separatorChar + DERBY_BACKUP_FOLDER);
             if (!derbyBackupFolder.exists()) {
                 if (!derbyBackupFolder.mkdirs()) {
-                    portlet.addErrorMessage(request, portlet.getLocalizedString("errorMsg04", request));
+                    portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg04"));
                     return false;
                 }
             }
@@ -111,23 +110,23 @@
                     if (newDBFolder.mkdirs()) {
                         if (!oldDBFolder.renameTo(new File(newDBFolder,
                                 oldDBFolder.getName()))) {
-                            portlet.addErrorMessage(request, portlet.getLocalizedString("errorMsg05", request));
+                            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg05"));
                             return false;
                         }
                     }
                 }
             }
-            portlet.addInfoMessage(request, MessageFormat.format(portlet.getLocalizedString("infoMsg02", request), dbName));
+            portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg02", dbName));
             return true;
         } catch (Exception e) {
-            portlet.addErrorMessage(request, portlet.getLocalizedString("errorMsg06", request), e.getMessage());
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg06"), e.getMessage());
             return false;
         }
     }
 
     public boolean runSQL(String connName, String sql, Boolean dsConn, PortletRequest request) {
         if ((sql == null) || (sql.trim().length() == 0)) {
-            portlet.addErrorMessage(request, portlet.getLocalizedString("errorMsg07", request));
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg07"));
             return false;
         }
         
@@ -151,10 +150,10 @@
                 }
             }
             conn.commit();
-            portlet.addInfoMessage(request, portlet.getLocalizedString("infoMsg03", request));
+            portlet.addInfoMessage(request, portlet.getLocalizedString(request, "infoMsg03"));
             return true;
         } catch (Throwable e) {
-            portlet.addErrorMessage(request, portlet.getLocalizedString("errorMsg08", request), e.getMessage());
+            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg08"), e.getMessage());
             return false;
         } finally {
             // close DB connection
@@ -166,7 +165,7 @@
                     conn.close();
                 }
             } catch (SQLException e) {
-                portlet.addErrorMessage(request, portlet.getLocalizedString("errorMsg02", request), e.getMessage());
+                portlet.addErrorMessage(request, portlet.getLocalizedString(request, "errorMsg02"), e.getMessage());
             }
         }
     }

Modified: geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/runSQLNormal.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/runSQLNormal.jsp?rev=734145&r1=734144&r2=734145&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/runSQLNormal.jsp (original)
+++ geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/runSQLNormal.jsp Tue Jan 13 06:42:27 2009
@@ -76,7 +76,7 @@
         <option value="${db}"<c:if test="${useDB==db}"> selected="selected"</c:if>>${db}</option>
       </c:forEach>
       </select>&nbsp;
-      <input type="submit" value="Run SQL" onClick="return <portlet:namespace/>validateForm3();"></td>
+      <input type="submit" value="<fmt:message key="internaldb.runSQLNormal.runSQL"/>" onClick="return <portlet:namespace/>validateForm3();"></td>
   </tr>
  </c:when>
  <c:otherwise>



Mime
View raw message