Hi All - it's my first mail here but don't be scared ;)
Recently I have been doing My best to divide My web application into
modules - so My boss could sell main part without addons (modules).
I successed in everything except validation...
What I have:
0. I'm using: Struts 1.2.2
1.Two struts-config.xml files - main One and the other for My module
with such entry:
<message-resources parameter="resources.application" /> <!-- main
resource -->
<message-resources key="orderResources"
parameter="resources.application-order"/> <!-- module resource ->
2.Two resource bundles, main: "application.properties" with whole
standard validation errors keys,
and "application-order.properties" for My "order" module
3.Validation.xml with entry:
(date pattern defined)
...
* ** * <form name="orderDetails">
<field property="orderdateForm" depends="date">
<arg0 key="order.detail.orderdate" />
<var>
<var-name>datePattern</var-name>
<var-value>${date_format}</var-value>
</var>
</field>*
*4.and validation-rules.xml (as default)
The Problem:
When validation of input data fails (in example: wrong date pattern) , I
get this error:
"Incorrect date format in Field"
but as You can see fields' name is missing....(because it's in the other
resource bundle)
Everything works fine when "fields' name" and entry
"errors.date=Incorrect date format in Field {0}." are in one common
(main) resource bundle
but it's not what I want.
Unfortunately what I want is to have errors keys in main resource and
fields' names in appropriate module resource...
For <html:link> or <bean:messages> I can set bundle="orderResources" and
it works brilliant but I can't do that for <arg0>
Does Anyone know how to "explain" to struts that it should look for this
field's name in this particular resource?
Thanks and Regards
Jack - Jacek Konopelski
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]