martinc     2003/07/15 22:10:38

  Modified:    src/share/org/apache/struts/util RequestUtils.java
  Log:
  Make retrieveMessageResources() module-aware by adding the module prefix
  to the bundle name when retrieving from application context.
  
  PR: 11932
  Submitted by: Alex Kwan
  
  Revision  Changes    Path
  1.110     +7 -8      
jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java
  
  Index: RequestUtils.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v
  retrieving revision 1.109
  retrieving revision 1.110
  diff -u -r1.109 -r1.110
  --- RequestUtils.java 14 Jul 2003 04:21:05 -0000      1.109
  +++ RequestUtils.java 16 Jul 2003 05:10:37 -0000      1.110
  @@ -1057,9 +1057,6 @@
        * default bundle name is used.
        * @return MessageResources The bundle's resources stored in some scope. 
        * @throws JspException if the MessageResources object could not be found.
  -     * 
  -     * @FIXME The bundle name needs the module prefix appended to it before 
searching
  -     * to fix PR# 11932.
        */
       private static MessageResources retrieveMessageResources(
           PageContext pageContext,
  @@ -1088,9 +1085,11 @@
           }
   
           if (resources == null) {
  +            ModuleConfig config = (ModuleConfig) pageContext.getAttribute(
  +                    Globals.MODULE_KEY, PageContext.REQUEST_SCOPE);
               resources =
                   (MessageResources) pageContext.getAttribute(
  -                    bundle,
  +                    bundle + config.getPrefix(),
                       PageContext.APPLICATION_SCOPE);
           }
   
  
  
  

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

Reply via email to