Ahh good, your're welcome - its a relief :-)
Niall
- Original Message -
From: "Chris Cheshire" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List"
Sent: Friday, February 17, 2006 5:13 PM
Subject: Re: using a resource key to extra validation errors
Doh. T
Doh. Thanks Niall. I see now.
Thanks for perservering
Chris
On 2/17/06, Niall Pemberton <[EMAIL PROTECTED]> wrote:
> You want to inernationalize your labels/messages/text - but not the names of
> your properties on your form bean
[snip]
--
You want to inernationalize your labels/messages/text - but not the names of
your properties on your form bean - if you had a property "house" - you
wouldn't have a different property on your form bean depending on the Locale
(getHouse() / setHouse() for English and getMaison() setMaison() for
Fren
Chris Cheshire wrote:
>
> breaks internationalisation.
>
You want to internationalize the names of the properties?
Dave
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Internationalisation.
Resource bundle contains (among other things):
label.password=password
The label of the field is looked up from the resource bundle:
The validation error in the form is keyed on that same value, looked
up from the resource bundle:
String label = resources.getMessage("label
So what are you after? Why do you need to use a value from the resources as
the message property?
Niall
- Original Message -
From: "Chris Cheshire" <[EMAIL PROTECTED]>
Sent: Friday, February 17, 2006 7:09 AM
Yes what I have in my code is exactly what is in the example. It is
not howeve
Yes what I have in my code is exactly what is in the example. It is
not however what I am after.
What is the point of using things from the resource bundle if it only
works through 3/4 of the application?
I have the error message next to the input field, by hardcoding the
result of what would be
Did you try my suggestion - I believe that will do exactly what you want -
you seem to be getting confused between the key used to store the
ActionErrors in the request (global error key) and the property under which
a message is stored in the ActionErrors.
The validwhen example in the struts-exam
That's not the issue, it is actually doing that, via a resource bundle
lookup (I only have one configured). I want to be able to retrieve the
error on the jsp side by getting the key via the resource bundle
similar to the way it is being added, instead of just using the value
that is referenced in
Modify your code to do this:
errors.add("password", message);
http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages.html#section5
Niall
- Original Message -
From: "Chris Cheshire" <[EMAIL PROTECTED]>
Sent: Friday, February 17, 2006 1:50 AM
I have an ActionForm
10 matches
Mail list logo