struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "CRANFORD, CHRIS" <Chris.Cranf...@setech.com>
Subject RE: How to initiate the select tag with empty list
Date Fri, 02 Aug 2013 17:37:10 GMT
You have to separate the notion of a use case where silently handling a null makes logical
sense versus where it often would imply an error condition on the part of the developer. 


If the view expects an empty list, there is no quam in passing the value stack reference as
a Collections.EMPTY_LIST and populate it later using whatever method you desire.  This way
you can still logically differentiate between the case where you mean for the select to be
empty versus where the select wasn't provided anything and in almost all cases is an error
use case.

-----Original Message-----
From: Sreekanth S. Nair [mailto:sreekanth.nair@egovernments.org] 
Sent: Friday, August 02, 2013 11:56 AM
To: Struts Users Mailing List
Subject: Re: How to initiate the select tag with empty list

That i know Chris. are you getting away from the question, i was talking about struts select
tag. Apart from tht, I got problem with normal html select with struts2, its not generating
_multiselect_xyz

--
Thanks & Regards
Srikanth

On Fri, Aug 2, 2013 at 9:41 PM, Chris Pratt <thechrispratt@gmail.com> wrote:

> It can, just use a regular <select>, instead of the <s:select>
>   (*Chris*)
>
>
> On Fri, Aug 2, 2013 at 12:36 AM, Sreekanth S. Nair < 
> sreekanth.nair@egovernments.org> wrote:
>
> > Hi,
> >     Sometimes we need to provide an empty select tag which will be 
> > populated later depending on some value in form using ajax. Now its 
> > mandatory to provide at least an empty list to make select to work. 
> > Why can't struts2 select tag can handle this case, where we can 
> > render the select tag even we dont provide a prepopulated list?
> >
> >
> > --
> > Thanks & Regards
> > Srikanth
> >
>


Email secured by Check Point



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


Mime
View raw message