tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r1196379 - in /tapestry/tapestry5/trunk/tapestry-core/src: main/java/org/apache/tapestry5/corelib/components/ main/java/org/apache/tapestry5/corelib/internal/ main/java/org/apache/tapestry5/internal/services/ main/resources/org/apache/tapes...
Date Tue, 01 Nov 2011 23:12:20 GMT
Author: hlship
Date: Tue Nov  1 23:12:19 2011
New Revision: 1196379

URL: http://svn.apache.org/viewvc?rev=1196379&view=rev
Log:
Remove InternalMessages class

Removed:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/internal/InternalMessages.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/internal/InternalStrings.properties
Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Error.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Errors.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/internal/ComponentActionSink.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/internal/FormSupportImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/FieldValidationSupportImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/FieldValidationSupportImplTest.java

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java?rev=1196379&r1=1196378&r2=1196379&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java
Tue Nov  1 23:12:19 2011
@@ -23,12 +23,12 @@ import org.apache.tapestry5.annotations.
 import org.apache.tapestry5.annotations.Property;
 import org.apache.tapestry5.annotations.SupportsInformalParameters;
 import org.apache.tapestry5.beaneditor.BeanModel;
-import org.apache.tapestry5.corelib.internal.InternalMessages;
 import org.apache.tapestry5.internal.BeanValidationContext;
 import org.apache.tapestry5.internal.BeanValidationContextImpl;
 import org.apache.tapestry5.internal.beaneditor.BeanModelUtils;
 import org.apache.tapestry5.ioc.annotations.Inject;
 import org.apache.tapestry5.ioc.internal.util.TapestryException;
+import org.apache.tapestry5.plastic.PlasticUtils;
 import org.apache.tapestry5.services.BeanEditContext;
 import org.apache.tapestry5.services.BeanModelSource;
 import org.apache.tapestry5.services.Environment;
@@ -209,8 +209,8 @@ public class BeanEditor
             }
             catch (Exception ex)
             {
-                String message = InternalMessages.failureInstantiatingObject(model.getBeanType(),
-                        resources.getCompleteId(), ex);
+                String message = String.format("Exception instantiating instance of %s (for
component '%s'): %s",
+                        PlasticUtils.toTypeName(model.getBeanType()), resources.getCompleteId(),
ex);
                 throw new TapestryException(message, resources.getLocation(), ex);
             }
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Error.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Error.java?rev=1196379&r1=1196378&r2=1196379&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Error.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Error.java
Tue Nov  1 23:12:19 2011
@@ -21,7 +21,6 @@ import org.apache.tapestry5.ValidationTr
 import org.apache.tapestry5.annotations.Environmental;
 import org.apache.tapestry5.annotations.HeartbeatDeferred;
 import org.apache.tapestry5.annotations.Parameter;
-import org.apache.tapestry5.corelib.internal.InternalMessages;
 import org.apache.tapestry5.dom.Element;
 
 /**
@@ -51,7 +50,7 @@ public class Error
     void beginRender(final MarkupWriter writer)
     {
         if (tracker == null)
-            throw new RuntimeException(InternalMessages.encloseErrorsInForm());
+            throw new RuntimeException("The Error component must be enclosed by a Form component.");
 
         Element element = writer.element("div");
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Errors.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Errors.java?rev=1196379&r1=1196378&r2=1196379&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Errors.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Errors.java
Tue Nov  1 23:12:19 2011
@@ -19,8 +19,6 @@ import org.apache.tapestry5.MarkupWriter
 import org.apache.tapestry5.ValidationTracker;
 import org.apache.tapestry5.annotations.Environmental;
 import org.apache.tapestry5.annotations.Parameter;
-import org.apache.tapestry5.corelib.internal.InternalMessages;
-import org.apache.tapestry5.services.FormSupport;
 
 import java.util.List;
 
@@ -57,7 +55,7 @@ public class Errors
     void beginRender(MarkupWriter writer)
     {
         if (tracker == null)
-            throw new RuntimeException(InternalMessages.encloseErrorsInForm());
+            throw new RuntimeException("The Errors component must be enclosed by a Form component.");
 
         if (!tracker.getHasErrors())
             return;

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/internal/ComponentActionSink.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/internal/ComponentActionSink.java?rev=1196379&r1=1196378&r2=1196379&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/internal/ComponentActionSink.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/internal/ComponentActionSink.java
Tue Nov  1 23:12:19 2011
@@ -64,7 +64,7 @@ public class ComponentActionSink
         }
         catch (IOException ex)
         {
-            throw new RuntimeException(InternalMessages.componentActionNotSerializable(completeId,
ex), ex);
+            throw new RuntimeException(String.format("Error serializing component action
for component %s: %s", completeId, ex), ex);
         }
 
         empty = false;

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/internal/FormSupportImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/internal/FormSupportImpl.java?rev=1196379&r1=1196378&r2=1196379&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/internal/FormSupportImpl.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/internal/FormSupportImpl.java
Tue Nov  1 23:12:19 2011
@@ -139,7 +139,7 @@ public class FormSupportImpl implements 
         assert InternalUtils.isNonBlank(encodingType);
 
         if (this.encodingType != null && !this.encodingType.equals(encodingType))
-            throw new IllegalStateException(InternalMessages.conflictingEncodingType(this.encodingType,
encodingType));
+            throw new IllegalStateException(String.format("Encoding type of form has already
been set to '%s' and may not be changed to '%s'.", this.encodingType, encodingType));
 
         this.encodingType = encodingType;
     }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/FieldValidationSupportImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/FieldValidationSupportImpl.java?rev=1196379&r1=1196378&r2=1196379&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/FieldValidationSupportImpl.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/FieldValidationSupportImpl.java
Tue Nov  1 23:12:19 2011
@@ -15,7 +15,6 @@
 package org.apache.tapestry5.internal.services;
 
 import org.apache.tapestry5.*;
-import org.apache.tapestry5.corelib.internal.InternalMessages;
 import org.apache.tapestry5.internal.util.Holder;
 import org.apache.tapestry5.ioc.internal.util.InternalUtils;
 import org.apache.tapestry5.ioc.services.PropertyAccess;
@@ -51,7 +50,7 @@ public class FieldValidationSupportImpl 
                 // the method description.
 
                 if (!(result instanceof String))
-                    throw new RuntimeException(InternalMessages.toClientShouldReturnString());
+                    throw new RuntimeException("Return value from 'parseClient' event handler
method must be a string.");
 
                 resultHolder.put((String) result);
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/FieldValidationSupportImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/FieldValidationSupportImplTest.java?rev=1196379&r1=1196378&r2=1196379&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/FieldValidationSupportImplTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/FieldValidationSupportImplTest.java
Tue Nov  1 23:12:19 2011
@@ -15,7 +15,6 @@
 package org.apache.tapestry5.internal.services;
 
 import org.apache.tapestry5.*;
-import org.apache.tapestry5.corelib.internal.InternalMessages;
 import org.apache.tapestry5.internal.test.InternalBaseTestCase;
 import org.apache.tapestry5.ioc.services.PropertyAccess;
 import org.apache.tapestry5.ioc.services.TypeCoercer;
@@ -321,7 +320,7 @@ public class FieldValidationSupportImplT
             unreachable();
         } catch (RuntimeException ex)
         {
-            assertEquals(ex.getMessage(), InternalMessages.toClientShouldReturnString());
+            assertEquals(ex.getMessage(), "Return value from 'parseClient' event handler
method must be a string.");
         }
 
         verify();



Mime
View raw message