I have multiple resource bundles in addition to the default one in struts-config.xml:

 <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" key="constraints"
   factory="ca.indosoft.common.resource.ConstraintResourcesFactory"
   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( "form.label.new", "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 MessageResources.properties):

 <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" />
   </field>
 </form>

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

Thanks,
 Scott


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

Reply via email to