dgraham     2003/08/02 14:38:16

  Modified:    src/share/org/apache/struts/taglib TagUtils.java
               src/share/org/apache/struts/util LocalStrings.properties
  Added:       src/share/org/apache/struts/taglib LocalStrings.properties
  Log:
  Move message resources to taglib package.
  
  Revision  Changes    Path
  1.21      +13 -6     jakarta-struts/src/share/org/apache/struts/taglib/TagUtils.java
  
  Index: TagUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/TagUtils.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- TagUtils.java     2 Aug 2003 21:07:33 -0000       1.20
  +++ TagUtils.java     2 Aug 2003 21:38:16 -0000       1.21
  @@ -122,7 +122,7 @@
        * TODO We need to move the relevant messages out of this properties file.
        */
       private static final MessageResources messages =
  -        MessageResources.getMessageResources("org.apache.struts.util.LocalStrings");
  +        
MessageResources.getMessageResources("org.apache.struts.taglib.LocalStrings");
   
       /**
        * Java 1.4 encode method to use instead of deprecated 1.3 version.
  @@ -231,6 +231,7 @@
               saveException(pageContext, e);
               throw new JspException(
                   messages.getMessage("parameters.multi", name, property, scope));
  +                
           } catch (JspException e) {
               saveException(pageContext, e);
               throw e;
  @@ -255,6 +256,7 @@
                           paramName,
                           paramProperty,
                           paramScope);
  +                        
               } catch (JspException e) {
                   saveException(pageContext, e);
                   throw e;
  @@ -272,12 +274,14 @@
                   Object mapValue = results.get(paramId);
                   if (mapValue == null) {
                       results.put(paramId, paramString);
  +                    
                   } else if (mapValue instanceof String) {
                       String newValues[] = new String[2];
                       newValues[0] = (String) mapValue;
                       newValues[1] = paramString;
                       results.put(paramId, newValues);
  -                } else /* if (mapValue instanceof String[]) */ {
  +                    
  +                } else {
                       String oldValues[] = (String[]) mapValue;
                       String newValues[] = new String[oldValues.length + 1];
                       System.arraycopy(oldValues, 0, newValues, 0, oldValues.length);
  @@ -296,6 +300,7 @@
               if (session != null) {
                   token = (String) 
session.getAttribute(Globals.TRANSACTION_TOKEN_KEY);
               }
  +            
               if (token != null) {
                   results.put(Constants.TOKEN_KEY, token);
               }
  @@ -660,6 +665,7 @@
   
           } catch (JspException e) {
               throw e;
  +            
           } catch (Exception e) {
               log.debug(e, e);
           }
  @@ -790,6 +796,7 @@
               
           } catch (JspException e) {
               throw e;
  +            
           } catch (Exception e) {
               ;
           }
  
  
  
  1.12      +11 -26    
jakarta-struts/src/share/org/apache/struts/taglib/LocalStrings.properties
  
  
  
  
  1.9       +0 -11     
jakarta-struts/src/share/org/apache/struts/util/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/LocalStrings.properties,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- LocalStrings.properties   15 May 2003 23:28:06 -0000      1.8
  +++ LocalStrings.properties   2 Aug 2003 21:38:16 -0000       1.9
  @@ -1,13 +1,6 @@
  -actionErrors.errors=Cannot process ActionErrors instance of class {0}
  -
  -actionMessages.errors=Cannot process ActionMessages instance of class {0}
  -
  -computeURL.forward=Cannot retrieve ActionForward named {0}
   
   computeURL.forwards=Cannot retrieve ActionForwards collection
   
  -computeURL.specifier=You must specify exactly one of "forward", "href", "page" or 
"action"
  -
   lookup.access=Invalid access looking up property {0} of bean {1}
   
   lookup.bean.any=Cannot find bean {0} in any scope
  @@ -16,13 +9,9 @@
   
   lookup.method=No getter method for property {0} of bean {1}
   
  -lookup.scope=Invalid bean scope {0}
  -
   lookup.target=Exception thrown by getter for property {0} of bean {1}
   
   message.bundle=Cannot find message resources under key {0}
  -
  -parameters.multi=Cannot cast to Map for name={0} property={1} scope={2}
   
   parameters.single=Cannot cast to String for name={0} property={1} scope={2}
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to