So I stumbled upon an interesting behavior. In hindsight, not necessarily 
surprising, but still interesting.

I had the class conundrum: sorting error messages. I had a large form with lots 
of fields, and if you just hit submit leaving it all blank, half of them light 
up with errors.

At the top, I had the simple <s;errors/> tag to dump all of the errors, as well 
as errors next to each field.

Rather than fighting the ordering issue, I simply wanted a message telling the 
user that when half the field go red, there's an issue or two that needs 
resolving.

So, I started making leaps.

First, I just tried:

<s:errors> Please fix the stuff below </s:errors>

And that gave me a list of errors. Bother.

I tried different combinations of the <s:errors-header/footer> etc tags.

Basically, I was trying convert the <s:errors>Body</s:errors> block in to a 
simple "if I have errors, give me a message" tag. The key being that it seems 
if you have the errors tag at all, and you weren't using the field or 
globalsonly option, you were getting the list of errors no matter what.

So, dunno if others have bumped in to that. But I think it might be nice to add 
something like that to the errors tag.

Regards,

Will Hartung


------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to