hello,
I have following bean:
public class CProduct {
private Integer id;
private String name
public Integer getId() {return id;}
puclic void setId(Integer id){
...
}
My form class contains a java.util.List of CProduct bean.
How can I display the List as select box? I
never tried
this myself.
HTH
claire :)
- Original Message -
From: Otto, Frank [EMAIL PROTECTED]
To: Struts-User (E-Mail) [EMAIL PROTECTED]
Sent: Monday, February 02, 2004 12:11 PM
Subject: html:options and html:select
hello,
I have following bean:
public class CProduct {
private
ArrayList productList = new ArrayList();
CProduct product = new CProduct();
product.setId(new Integer(1));
product.setName(My Product);
productList.add(product);
request.setAttribute(products,productList.toArray());
...
html:option value=--/html:option
html:options collection=products
PROTECTED]
Gesendet: Montag, 2. Februar 2004 13:22
An: Struts Users Mailing List
Betreff: Re: html:options and html:select
you can do the following:
html:select name=FormName property=xxx
logic:iterate id=product name=FormName property=ListName
option value=bean:write name=product
-User (E-Mail)
Subject: html:options and html:select
hello,
I have following bean:
public class CProduct {
private Integer id;
private String name
public Integer getId() {return id;}
puclic void setId(Integer id){
...
}
My form class contains a java.util.List of CProduct bean
=myListOfBean
value=id label=name/
/html:select
Regards,
Frank
-Ursprüngliche Nachricht-
Von: Claire Wall [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 2. Februar 2004 13:22
An: Struts Users Mailing List
Betreff: Re: html:options and html:select
you can do the following:
html:select name
PROTECTED]
Sent: Monday, February 02, 2004 12:34 PM
Subject: Re: AW: html:options and html:select
Thank goodness for that, dunno why folks seem to do that bean:write for
dropdowns :o)
On 2 Feb 2004, at 13:27, Otto, Frank wrote:
Thanks for your answer, but
I have found out, that I can use
: Lunes, 02 de Febrero de 2004 09:28 a.m.
To: 'Struts Users Mailing List'
Subject: AW: html:options and html:select
Thanks for your answer, but
I have found out, that I can use html:optionsCollection.
html:select property=ref
html:optionsCollections name=myForm property=myListOfBean
value
-Original Message-
From: Otto, Frank [mailto:[EMAIL PROTECTED]
Sent: Monday, February 02, 2004 5:41 PM
To: Struts-User (E-Mail)
Subject: html:options and html:select
hello,
I have following bean:
public class CProduct {
private Integer id;
private String name
public Integer getId
I'm having a hardtime controlling the field-width for a dropdown using
html:select with html:options:
For example:
td ID=small width=100 maxlength=100
html:select property=addressstate size=1
disabled
: Sunday, March 24, 2002 2:54 PM
Subject: Controlling MaxWidth for html:options or html:select?
I'm having a hardtime controlling the field-width for a dropdown using
html:select with html:options:
For example:
td ID=small width=100 maxlength=100
html:select
Hi,
I have a weird problem here (as always :).
I have the following code in my *.jsp file:
form action=handleprojectaddrequest.do method=post
Select request type
html:select property=codtyp
html:options name=projectaddrequestform collection=listTyp
property=id
Make sure that you use the html:form taglib. Currently you are not
using it. It will get the bean for your page...
html:form action=handleprojectaddrequest.do
Select request type
html:select property=codtyp
html:options name=projectaddrequestform collection=listTyp
property
type de requête
html:select property=codtyp
html:options name=projectaddrequestform collection=listTyp
property=id labelProperty=name/
/html:select
/html:form
But when I do the following (however, I'm aware it's not the Struts way),
it suddenly works:
2/
html:form
14 matches
Mail list logo