struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Galbreath, Mark" <Galbre...@tessco.com>
Subject RE: Does Indexed property in FormBean work?
Date Fri, 17 May 2002 21:24:00 GMT
Hmmm...this sounds like config/mapping issue.  Do you have the <form action=
> set to the corresponding path in struts-config and associated with the
bean and action class?  Have you declared the bean as scope="session" in
struts-config? Finally, try an empty reset() in the bean so it's properties
are not rest to their defaults.

How are you implementing the accessors and mutators in your bean?

-----Original Message-----
From: Jason Zhou [mailto:Jason.Zhou@sas.com]
Sent: Friday, May 17, 2002 4:52 PM
To: 'Struts Users Mailing List'
Subject: RE: Does Indexed property in FormBean work?


No. 

I have a FormBean called Department with an indexed property called
Employee.

Department
{
	Employee[] employee = ...
}

Employee is a javabean with names, address, etc.

In the html form, I have a table of html input field (html:text in Struts)
and each row representing one employee.

So at first row the name field is associated with Employee[0].name 
second row the name field is associated with Employee[1].name 
third row the name field is associated with Employee[2].name

I can use a for loop and Struts iterator tag. When I submit, the input field
will get back to the corresponding element in the indexed array.

But the value is not loaded to the bean after the submit.

Best Regards,

J. Jason Zhou
Business Intelligence Platform Division (BIP), R & D, 
SAS Institute, 100 SAS Campus Dr.
Cary, North Carolina 27513-8617
Voice: 919-531-0568(O)
Email: jason.zhou@sas.com

-----Original Message-----
From: Galbreath, Mark [mailto:Galbreath@tessco.com] 
Sent: Friday, May 17, 2002 4:28 PM
To: 'Struts Users Mailing List'
Subject: RE: Does Indexed property in FormBean work?

Jason,

I'm not sure I understand what you are trying to do.  It sounds like a
simple dropdown select list populated by associated List property on the
bean.  I use the indexId to access particular elements in a List in order
remove selected elements from the List.  Is this something like you need?

Mark

-----Original Message-----
From: Jason Zhou [mailto:Jason.Zhou@sas.com]
Sent: Friday, May 17, 2002 3:46 PM
To: 'Struts Users Mailing List'
Subject: Does Indexed property in FormBean work?


I have an indexed property in my form bean and I want to associate the
indexed property with a list of html input field in a form so that values of
my property can be displayed through the input field and changes can be
populated back to the indexed property.

How can I do it in Struts?

Best Regards,

J. Jason Zhou
Business Intelligence Platform Division (BIP), R & D, 
SAS Institute, 100 SAS Campus Dr.
Cary, North Carolina 27513-8617
Voice: 919-531-0568(O)
Email: jason.zhou@sas.com



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

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

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

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


Mime
View raw message