struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arron Bates <>
Subject Re: Can nested beans be arrays in Struts1.0?
Date Mon, 11 Feb 2002 22:17:08 GMT
I think that a part of the problem is that you might have tried to run 
before you were walking. :)

The automatic population will only ever come from Struts tags in one 
form or another.

I don't understand why you want to go back.
You've obviously been through the Nested Extension tutorial, and seen 
how cool the Struts tags are :)


>--- kothapallibc <> wrote:
>>Hi all,
>>I'm a newbie to Struts. I'm trying with 1.0 release.
>>My FormBean is follows...
>>public class MonkeyForm extends ActionForm  {
>>	private Monkey[] monkey = new Monkey[5];
>>	public Monkey[] getMonkey() {  return this.monkey;  }
>>	public void setMonkey(Monkey monkey[]) {this.monkey = monkey;}
>>public class Monkey{
>>	private String name;
>>	private String age;
>>	//Get and set methods are here
>>Assuming that I don't want to use Struts tab libraries, how should be 
>>the field names in HTML? Am I right to have them like this?
>>    <input type="text" name="monkey[0].name" >
>>    <input type="text" name="monkey[0].age" >
>>    <input type="text" name="monkey[1].name">
>>    <input type="text" name="monkey[1].age">
>>Somehow, these values are not populated in the form bean.
>>Do I have to specify Monkey bean anywhere in struts-config?	
>>It works with simple arrays and when the nested bean is not an array, 
>>but it doesn't if the nested bean is an array. Am I doing something 
>>To unsubscribe, e-mail:   <>
>>For additional commands, e-mail: <>
>Do You Yahoo!?
>Send FREE Valentine eCards with Yahoo! Greetings!
>To unsubscribe, e-mail:   <>
>For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message