struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject RE: <html:errors/> question
Date Wed, 18 Dec 2002 14:11:54 GMT
How 'bout using a dummy form with a select element whose size attribute is 3?
Each error message would be rendered as an option element. Of course, there's no
strict requirement for browsers to render a select element as a scrollable list
box when the size attribute is present (and > 1), but IE 6.0, NS 4.79, and
Mozilla 1.2 seem to do so.

<form>
  <select size="3">
    <option>Error 1</option>
    <option>Error 2</option>
    <option>Error 3</option>
    <option>Error 4</option>
    <option>Error 5</option>
    <option>Error 6</option>
  </select>
</form>

Quoting Andrew Hill <andrew.david.hill@gridnode.com>:

> Hehe. Sorry. Couldnt resist making that joke  ;-)
> 
> Afaik the errors tag only allows you to show all , or individually
> specified
> messages.
> However you still have some options. You could use a scriptlet to iterate
> over and output the first 3 messages only. If this space limit applies to
> lots of pages you might be best implementing your own tag to do that. You
> could use the source for the html:errors tag as a starting point. Shouldnt
> be too hard to give it another attribute that takes a maximum number of
> errors to display and have it halt its iterations if this number is
> reached.
> 
> -----Original Message-----
> From: Dmitry Vasilenko [mailto:vasilenko@soft-ukraine.com]
> Sent: Wednesday, December 18, 2002 21:08
> To: Struts Users Mailing List; andrew.david.hill@gridnode.com
> Subject: Re: <html:errors/> question
> 
> 
> In my sample space for error information is limited. I want to outut only
> first 3 errors. :(
> 
> ----- Original Message -----
> From: "Andrew Hill" <andrew.david.hill@gridnode.com>
> To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> Sent: Wednesday, December 18, 2002 3:05 PM
> Subject: RE: <html:errors/> question
> 
> 
> > Get the user to enter data into 7 of the fields before they submit the
> form.
> > ;->
> >
> > -----Original Message-----
> > From: Dmitry Vasilenko [mailto:vasilenko@soft-ukraine.com]
> > Sent: Wednesday, December 18, 2002 20:52
> > To: Struts Users Mailing List
> > Subject: <html:errors/> question
> >
> >
> >
> > Dear,
> >
> > Describe:
> > I have for example 10 form field (with validaton required). I see in the
> > jsp(<html:errors/>) 10 errors when I try to inut ntohing.
> >
> > Question:
> > I  want to see in the jsp only for example 3 errors.
> >
> >
> > Best regards,
> > Dmitry.
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:struts-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:struts-user-help@jakarta.apache.org>
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> 


-- 
Kris Schneider <mailto:kris@dotech.com>
D.O.Tech       <http://www.dotech.com/>

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message