struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Pyeron" <jpye...@pdinc.us>
Subject RE: Fielderrors tag and the simple theme
Date Tue, 19 Apr 2011 17:49:15 GMT

> -----Original Message-----
> From: Dave Newton [mailto:davelnewton@gmail.com] 
> Sent: Tuesday, April 19, 2011 13:02
> To: Struts Developers List
> Subject: Re: Fielderrors tag and the simple theme
> 
> Fields can have multiple errors; I'm assuming the list-always 
> thing is to handle both single and multiple errors in the 
> same way. That said, with reasonable CSS, shouldn't be an issue, no?

Yes and no. I always try to take the path of least surprise and extra html tags
in the simple theme could be a surprise. My opinion would be to expose
attributes startHtml, endHtml, startItemHtml, endItemHtml. Yes using them would
loose the handling of many of the default atributes, like cssClass. I just do
not think that a developer/designer should have to create a new tempate/theme to
output bare results. I also think manual inspection of the error values in the
stack would be ugly code too.

Ex:
<s:fielderror fieldName="foo" startHtml="" endHtml="" startItemHtml=""
endItemHtml="<br>" />

Imagine trying to use this in javascript...

...=<s:fielderror fieldName="foo" startHtml="{" endHtml="}" startItemHtml='"'
endItemHtml='",' />;




> 
> Dave
> 
> On Tue, Apr 19, 2011 at 12:54 PM, Jason Pyeron 
> <jpyeron@pdinc.us> wrote:
> > I have been lementing how the fielderror tag forces a list 
> around even 
> > when it is called as <s:fielderror fieldName="foo" />
> >
> > Does anyone have some comments about why this is good or if 
> not how it 
> > should perform?
> >


--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Principal Consultant              10 West 24th Street #100    -
- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.

 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message