struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hus...@apache.org
Subject cvs commit: jakarta-struts/src/examples/org/apache/struts/webapp/upload UploadResources_ja.properties UploadResources.properties UploadForm.java
Date Fri, 09 Jan 2004 21:52:46 GMT
husted      2004/01/09 13:52:46

  Modified:    src/examples/org/apache/struts/webapp/upload
                        UploadResources_ja.properties
                        UploadResources.properties UploadForm.java
  Log:
  Change upload modules to use message tags for validation errors.
  
  Revision  Changes    Path
  1.2       +1 -0      jakarta-struts/src/examples/org/apache/struts/webapp/upload/UploadResources_ja.properties
  
  Index: UploadResources_ja.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/examples/org/apache/struts/webapp/upload/UploadResources_ja.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UploadResources_ja.properties	8 Jan 2004 16:17:57 -0000	1.1
  +++ UploadResources_ja.properties	9 Jan 2004 21:52:46 -0000	1.2
  @@ -1 +1,2 @@
  +# :FIXME: We need a JA translaction of maxLengthExplanation
   maxLengthExceeded=\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3067\u304d\u308b\u6700\u5927\u5024\u3092\u8d85\u3048\u307e\u3057\u305f
  
  
  
  1.2       +2 -1      jakarta-struts/src/examples/org/apache/struts/webapp/upload/UploadResources.properties
  
  Index: UploadResources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/examples/org/apache/struts/webapp/upload/UploadResources.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UploadResources.properties	8 Jan 2004 16:17:57 -0000	1.1
  +++ UploadResources.properties	9 Jan 2004 21:52:46 -0000	1.2
  @@ -1 +1,2 @@
  -maxLengthExceeded=The maximum upload length has been exceeded by the client.
  \ No newline at end of file
  +maxLengthExceeded=The maximum upload length has been exceeded by the client.
  +maxLengthExplanation=Note that the maximum allowed size of an uploaded file for this application
is two megabytes. See the "/WEB-INF/upload/struts-config.xml" file for this application to
change it.
  
  
  
  1.2       +9 -12     jakarta-struts/src/examples/org/apache/struts/webapp/upload/UploadForm.java
  
  Index: UploadForm.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/examples/org/apache/struts/webapp/upload/UploadForm.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UploadForm.java	8 Jan 2004 16:17:57 -0000	1.1
  +++ UploadForm.java	9 Jan 2004 21:52:46 -0000	1.2
  @@ -63,10 +63,7 @@
   
   import javax.servlet.http.HttpServletRequest;
   
  -import org.apache.struts.action.ActionErrors;
  -import org.apache.struts.action.ActionForm;
  -import org.apache.struts.action.ActionMapping;
  -import org.apache.struts.action.ActionMessage;
  +import org.apache.struts.action.*;
   import org.apache.struts.upload.FormFile;
   import org.apache.struts.upload.MultipartRequestHandler;
   
  @@ -82,9 +79,6 @@
    */
   public class UploadForm extends ActionForm {
       
  -    public static final String ERROR_PROPERTY_MAX_LENGTH_EXCEEDED =
  -        "org.apache.struts.webapp.upload.MaxLengthExceeded";
  -
       /**
        * The value of the text the user has sent as form data
        */
  @@ -201,8 +195,11 @@
           if ((maxLengthExceeded != null) && (maxLengthExceeded.booleanValue()))
{
               errors = new ActionErrors();
               errors.add(
  -                ERROR_PROPERTY_MAX_LENGTH_EXCEEDED,
  +                ActionMessages.GLOBAL_MESSAGE ,
                   new ActionMessage("maxLengthExceeded"));
  +            errors.add(
  +                ActionMessages.GLOBAL_MESSAGE ,
  +                new ActionMessage("maxLengthExplanation"));
           }
           return errors;
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Mime
View raw message