--- On Mon, 11/24/08, EoneZhang <[EMAIL PROTECTED]> wrote:
> in my validation config file I write like this:
> <validators>
>   <field name="persons[].name">
>   <field-validator> type="requiredstring">
>   <message key="requiredstring"
> />
> [...]
> It seems doesn't work. 

Correct, it doesn't. At this point there's no support for collection-based 
validation (that I'm aware of). This is a point of pain that should probably be 
addressed :/

> Besides that, I want to add error style to the filed which
> doesn't pass the validation. In S1,we can use 
> <html:text errorStyle="errorStyle" .../>
> to achieve this task, but How to do it in S2?

You can override the stylesheet supplied by Struts 2 and redefine the error 
style. The page at [1] explains the default styles. If that doesn't supply 
enough control you can also create a new theme to get absolute control.

Dave

[1] http://struts.apache.org/2.x/docs/xhtml-theme.html


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

Reply via email to