You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Roumen Ganeff <ga...@wizcom.bg> on 2001/10/03 17:41:27 UTC
Hi
I am trying to display a <select>, which will be for informational purposes
only, and thus is not connected to the form I am currently displaying. It
fills in the <options> correctly, but the <select> itself demands to have
"property='something'". When I write it, it tries to look it up against the
current ActionForm that is being displayed, and fails miserably. I move it
outside the <form> tag, it still complains.
now, I can write this with a simple <select>, and generate the options with
a <iterate>, or write e custom tag for this <select>.. but.. Is there a
problem in Struts, or am being stupid?
Thanx
Ganeff
Re:
Posted by ma...@tumbleweed.com.
The <html:select> tag is designed to work in cooperation with the form bean,
so that the option which is initially selected is determined from the form
bean, and the value selected at form submit time is set in the form bean
prior to perform() being called.
If you want to have a select tag that is unrelated to a form bean, then you
should use the regular HTML <select> tag, and not the Struts <html:select>
tag.
Hope this helps.
--
Martin Cooper
----- Original Message -----
From: "Roumen Ganeff" <ga...@wizcom.bg>
To: <st...@jakarta.apache.org>
Sent: Wednesday, October 03, 2001 8:41 AM
Subject: <html:select>
> Hi
>
> I am trying to display a <select>, which will be for informational
purposes
> only, and thus is not connected to the form I am currently displaying. It
> fills in the <options> correctly, but the <select> itself demands to have
> "property='something'". When I write it, it tries to look it up against
the
> current ActionForm that is being displayed, and fails miserably. I move it
> outside the <form> tag, it still complains.
> now, I can write this with a simple <select>, and generate the options
with
> a <iterate>, or write e custom tag for this <select>.. but.. Is there a
> problem in Struts, or am being stupid?
>
> Thanx
> Ganeff
>