Can't you just do:

<@ww.i18n name="'com.eds.asset.i18n.I18n_adminapp'">

(note the single quotes)?

Jason

> -----Original Message-----
> From: Donnerstag, Juergen [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 08, 2004 2:38 PM
> To: [EMAIL PROTECTED]
> Subject: [OS-webwork] ww2: i18n
> 
> 
> 
> May I suggest to extend i18n's functionality. Currently you need 
> <@ww.i18n name="anyVarReferencingTheBundlesNames">
> 
> That seems to me not very obvious. I'd rather like to name 
> the ResourceBundle like <@ww.i18n 
> name="com.eds.asset.i18n.I18n_adminapp">
> 
> I modified the tag sources as outlined below. It should 
> extend and not modify the orginal behaviour.
> 
> regards
> Juergen
> 
> 
>     // BodyTag implementation ----------------------------------------
>     public int doStartTag() throws JspException {
>         // Get bundle
>       
>       // >>
>       ResourceBundle bundle = null;
>       try {
>               String name = this.findString(nameAttr);
>             bundle = (ResourceBundle) findValue("texts('" + 
> name + "')");
> 
>             if (bundle == null) {
>                 bundle = 
> LocalizedTextUtil.findResourceBundle(name, (Locale) 
> getStack().getContext().get(ActionContext.LOCALE));
>             }
>             
>         } catch (Exception e) {
>               // ignore it
>         }
> 
>         if (bundle == null) {
>               try {
>                       String name = nameAttr;
>                       bundle = (ResourceBundle) 
> findValue("texts('" + name
> + "')");
> 
>                       if (bundle == null) {
>                               bundle =
> LocalizedTextUtil.findResourceBundle(name, (Locale) 
> getStack().getContext().get(ActionContext.LOCALE));
>                       }
>               } catch (Exception e) {
>                       
> LogFactory.getLog(getClass()).error("Could not find the 
> bundle " + nameAttr, e);
>                       throw new JspException("Could not find 
> the bundle "
> + nameAttr);
>               }
>         }
>             
>         if (bundle != null) {
>             final Locale locale = (Locale) 
> getStack().getContext().get(ActionContext.LOCALE);
>             getStack().push(new TextProviderSupport(bundle, new
> LocaleProvider() {
>                 public Locale getLocale() {
>                     return locale;
>                 }
>             }));
>         }
>         // <<
>         return EVAL_BODY_INCLUDE;
>     }
> }
> 
> 


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to