Wouldn't it be great if the <stripes:label> value would be used for 
errors for that field?
If we have something like:

<stripes:label for="user.username">User name</stripes:label>
<stripes:text name="user.username" />

Hmm... this sounds great 'till I thought about implementing this. I 
guess we must pass the label value with every form-submit. I can think 
of people who will not like the idea :=)

Greets
Jan



Lionel schrieb:
> Jan Künstler wrote:
>   
>> Hi Abhi,
>>
>> yes you can. You need two entries in your resource bundle: One for a
>> generic error message and one for the field name.
>>
>> validation.required.valueNotPresent = {0} is requierd
>> fieldname = Field Name
>>     
>
> there is one issue with that behaviour: it creates lots of duplicates in the 
> resource bundle.
> example:
>
> UserActionBean uses: user.name
> In resource bundle: user.name=User name
>
> OrderActionBean users: order.user.userId
> In resource bundle:  order.user.userId=User name
>
> InvoiceActionBean uses: invoice.user.userId
> In resource bundle:  invoice.user.userId=User name
>
> 3 times the same label...
> Is there some way to override the key ?
> Would be great to override the resource bundle key in the Validate 
> annotation. 
>
>   

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to