Thats a cool idea.
Good thinking :-)
Furthermore if there really is little space you could set the size to 1.
Then all the errors could be rendered as options and the user would just
need to click the select to drop down the list for reading.

-----Original Message-----
From: Kris Schneider [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 22:12
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: <html:errors/> question


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 <[EMAIL PROTECTED]>:

> 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:[EMAIL PROTECTED]]
> Sent: Wednesday, December 18, 2002 21:08
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> 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" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> 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:[EMAIL PROTECTED]]
> > 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:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>


--
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech       <http://www.dotech.com/>

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


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

Reply via email to