On 12/28/2012 12:34 AM, Iwao AVE! wrote:
> By defining a method like below in your action bean...
>
> public getControlGroupClass(String field) {
>    // checks the field status and returns an appropriate css class.
>    return getContext().getValidationErrors().containsKey(field) ? "
> error" : "" ;
> }
>
> ...you can write the outmost div as follows (JSP 2.1+ required).
>
> <div class="control-group
> ${actionBean.getControlGroupClass('inputWarning')}">

This works great -- this is basically what I was picturing doing with my 
own tag, but I didn't realize it was this easy.

Thanks, Iwao. :)

- Matt

------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to