You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kumar Kadiyala <ku...@yahoo.com> on 2006/02/03 20:23:57 UTC
Problem with html:select
Hello,
I am running into a problem with the html:select tag.
I have the "multiple" attribute set so that the list
renders as a multi select list box. I am using the
value attribute of this tag and if I specify an Array
as the value, the initial selection in the list box is
not correct. I looked into the source code (SelectTag)
and it seems like the value property has a dataType
String. Shouldn't the dataType be String for single
select lists and Arrays(or Collections) for multi
select lists? I have to use the value attribute on the
SelectTag. Is there a workaround?
Help appreciated,
Kumar
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Problem with html:select
Posted by Michael Jouravlev <jm...@gmail.com>.
Apparently, "preselect" was a bad term. The better one would be
"position selection bar". To preselect as in "to mark as selected" use
"properties" array.
Michael.
On 2/3/06, Kumar Kadiyala <ku...@yahoo.com> wrote:
> Thanks for the clarification. How would I preselect
> more than one value using html:select?
>
> Kumar
>
> --- Michael Jouravlev <jm...@gmail.com> wrote:
>
> > On 2/3/06, Michael Jouravlev <jm...@gmail.com>
> > wrote:
> > > On 2/3/06, Kumar Kadiyala <ku...@yahoo.com>
> > wrote:
> > > > Hello,
> > > >
> > > > I am running into a problem with the html:select
> > tag.
> > > > I have the "multiple" attribute set so that the
> > list
> > > > renders as a multi select list box. I am using
> > the
> > > > value attribute of this tag and if I specify an
> > Array
> > > > as the value, the initial selection in the list
> > box is
> > > > not correct. I looked into the source code
> > (SelectTag)
> > > > and it seems like the value property has a
> > dataType
> > > > String. Shouldn't the dataType be String for
> > single
> > > > select lists and Arrays(or Collections) for
> > multi
> > > > select lists? I have to use the value attribute
> > on the
> > > > SelectTag. Is there a workaround?
> > >
> > > Have you read the article I gave you link for?
> > Does it not answer your question?
> > >
> > > Do not use "value", it is for immediate
> > comparison. Instead, use
> > > "property" like you wanted to use "value", as
> > String[] with actual
> > > values.
> >
> > http://wiki.apache.org/struts/StrutsWidgets
> >
> > Michael.
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> > user-help@struts.apache.org
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Problem with html:select
Posted by Kumar Kadiyala <ku...@yahoo.com>.
Thanks for the clarification. How would I preselect
more than one value using html:select?
Kumar
--- Michael Jouravlev <jm...@gmail.com> wrote:
> On 2/3/06, Michael Jouravlev <jm...@gmail.com>
> wrote:
> > On 2/3/06, Kumar Kadiyala <ku...@yahoo.com>
> wrote:
> > > Hello,
> > >
> > > I am running into a problem with the html:select
> tag.
> > > I have the "multiple" attribute set so that the
> list
> > > renders as a multi select list box. I am using
> the
> > > value attribute of this tag and if I specify an
> Array
> > > as the value, the initial selection in the list
> box is
> > > not correct. I looked into the source code
> (SelectTag)
> > > and it seems like the value property has a
> dataType
> > > String. Shouldn't the dataType be String for
> single
> > > select lists and Arrays(or Collections) for
> multi
> > > select lists? I have to use the value attribute
> on the
> > > SelectTag. Is there a workaround?
> >
> > Have you read the article I gave you link for?
> Does it not answer your question?
> >
> > Do not use "value", it is for immediate
> comparison. Instead, use
> > "property" like you wanted to use "value", as
> String[] with actual
> > values.
>
> http://wiki.apache.org/struts/StrutsWidgets
>
> Michael.
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Problem with html:select
Posted by Michael Jouravlev <jm...@gmail.com>.
On 2/3/06, Michael Jouravlev <jm...@gmail.com> wrote:
> On 2/3/06, Kumar Kadiyala <ku...@yahoo.com> wrote:
> > Hello,
> >
> > I am running into a problem with the html:select tag.
> > I have the "multiple" attribute set so that the list
> > renders as a multi select list box. I am using the
> > value attribute of this tag and if I specify an Array
> > as the value, the initial selection in the list box is
> > not correct. I looked into the source code (SelectTag)
> > and it seems like the value property has a dataType
> > String. Shouldn't the dataType be String for single
> > select lists and Arrays(or Collections) for multi
> > select lists? I have to use the value attribute on the
> > SelectTag. Is there a workaround?
>
> Have you read the article I gave you link for? Does it not answer your question?
>
> Do not use "value", it is for immediate comparison. Instead, use
> "property" like you wanted to use "value", as String[] with actual
> values.
http://wiki.apache.org/struts/StrutsWidgets
Michael.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Problem with html:select
Posted by Michael Jouravlev <jm...@gmail.com>.
On 2/3/06, Kumar Kadiyala <ku...@yahoo.com> wrote:
> Hello,
>
> I am running into a problem with the html:select tag.
> I have the "multiple" attribute set so that the list
> renders as a multi select list box. I am using the
> value attribute of this tag and if I specify an Array
> as the value, the initial selection in the list box is
> not correct. I looked into the source code (SelectTag)
> and it seems like the value property has a dataType
> String. Shouldn't the dataType be String for single
> select lists and Arrays(or Collections) for multi
> select lists? I have to use the value attribute on the
> SelectTag. Is there a workaround?
Have you read the article I gave you link for? Does it not answer your question?
Do not use "value", it is for immediate comparison. Instead, use
"property" like you wanted to use "value", as String[] with actual
values.
Michael J.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org