struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Van Wart <>
Subject LookupDispatchAction using wrong resource bundle!
Date Wed, 16 Aug 2006 16:01:28 GMT
I have multiple resource bundles in addition to the default one in 

  <message-resources parameter="MessageResources" null="false" />

  <!-- I put id, parameter and key, because I'm not convinced I know 
what each one does :( -->
  <message-resources id="constraints" parameter="constraints" 
    null="true" />

In my Action:

  protected void create( ... ) { ... }

  // and so on...

  protected Map getKeyMethodMap()
    final Map<String, String> map = new TreeMap<String, String>();
    map.put( "form.label.create", "create" );
    map.put( "form.label.update", "update" );
    map.put( "form.label.delete", "delete" );
    map.put( "form.label.clear", "clear" );
    map.put( "form.label.cancel", "cancel" );
    map.put( "", "makeNew" );
    return map;

But when I debug through it, in LookupDispatchAction.initLookupMap( 
HttpServletRequest, Locale ), it's using the 
ConstraintResourcesFactory!  The only place I actually say 
'bundle="constraints"' is in my validation.xml, which doesn't get hit at 
all (my app fails because LookupDispatchAction is looking in the 
ConstraintResources class, and not

  <form name="myForm">
    <field property="title" depends="required,maxlength">
      <msg name="required" key="error.title.required" />
      <msg name="maxlength" key="error.title.overflow" />
      <arg name="maxlength" bundle="constraints" key="title.length" />

Is this a bug, or an issue with my implementation?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message