W
wmilus
I have validation framework working for my 2 module application,
struts 1.1, but I cannot get the argument values to display when i
use <arg0 key"somekey"/> in the formset/form/field validation block.
I debug into the commons validator code and the problem is that the
ValidatorResources is null and produces no entries in the arg array -
it is apparently not finding the resource for the key specified in the
validation.xml file.
I need the argN values to be internationalized hence I need to use
resource keys.
resource file - application.properties
errors.required={0} is required.
testwords = application test
validation.xml segment:
<form name="UserAccountForm">
<field property="lastName" depends="required">
<arg0 key="testwords" resource="true" />
</field>
</form>
test.jsp - with struts-html tag
<html:html locale="true">
........
<html:errors />
........
</html>
The display shows:
is required.
I wanted display to show:
application test is required.
It appears to me as though the validator is not handling the multiple
module resources correctly. I already know that I cannot specify a
bundle for the msg or argN values.
Does anyone know a solution to this?
If I cannot use the validator framework then I will be forced to write
validation calls into my forms.
Thanks
W Milus
struts 1.1, but I cannot get the argument values to display when i
use <arg0 key"somekey"/> in the formset/form/field validation block.
I debug into the commons validator code and the problem is that the
ValidatorResources is null and produces no entries in the arg array -
it is apparently not finding the resource for the key specified in the
validation.xml file.
I need the argN values to be internationalized hence I need to use
resource keys.
resource file - application.properties
errors.required={0} is required.
testwords = application test
validation.xml segment:
<form name="UserAccountForm">
<field property="lastName" depends="required">
<arg0 key="testwords" resource="true" />
</field>
</form>
test.jsp - with struts-html tag
<html:html locale="true">
........
<html:errors />
........
</html>
The display shows:
is required.
I wanted display to show:
application test is required.
It appears to me as though the validator is not handling the multiple
module resources correctly. I already know that I cannot specify a
bundle for the msg or argN values.
Does anyone know a solution to this?
If I cannot use the validator framework then I will be forced to write
validation calls into my forms.
Thanks
W Milus