Re: nested:iterate - set method not called

2002-03-17 Thread Elijah Jacobs

thanks, Arron

that cleared things up.

- ej

- Original Message -
From: "Arron Bates" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Sunday, March 17, 2002 10:55 AM
Subject: Re: nested:iterate - set method not called


> The setter on a nested property, such as the list properties in my
> example, is only there as a convenience. The Struts managing code will
> never actually use it. It only worries about the last bean in the nested
> property definition. My construtors use it to make the simple example
> easier to do.
>
> As for storing a reference to the form bean in all the shild beans...
> no. This is probably not model behaviour. I only did it so I could get
> my delete buttons working for the banana objects. The setter of the
> banana's object knows that the bean is to be deleted as it's been
> called. The reference to the parent bean is there so it can call the
> parent bean and tell it that it wants to be deleted.
>
> If you don't need this more advanced bean driven functionality, then you
> really should avoid it.
>
> Arron.
>
>
> Elijah Jacobs wrote:
>
> >Thanks for the reply Arron, ... well appreciated.
> >
> >but I noticed in your example that the MonkeyBean contains an ArrayList
of
> >monkeys  (ArrayList monkeyList) and you have both a setter and a getter
> >method for it.  I was trying to duplicate this on my form bean.  My
> >ArrayList is contained in the FormBean itself. That's why I was expecting
> >the setter method in the formbean to be called.
> >
> >Also, is it necessary for the beans contained in my ArrayList to a
reference
> >to the form, much like you have a reference to the
BananasIncorporatedBean
> >from the MonkeyTeamBean.
> >
> >I apologize if these are simple question, I've struggle with this for 2
days
> >now and the project deadline is not budging.
> >
> >- ej
> >
> >- Original Message -
> >From: "Arron Bates" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Sent: Sunday, March 10, 2002 8:04 PM
> >Subject: Re: nested:iterate - set method not called
> >
> >
> >>The getter will only ever be called, as it's the middle-man.
> >>The system only wants to set the "name" property on the nested bean. It
> >>will call the getter of the "extrainfo" object to get at the nested
> >>bean, and then set its property. Never actually calling the setter of
> >>the parent bean property.
> >>
> >>Arron.
> >>
> >>
> >>Elijah Jacobs wrote:
> >>
> >>>thanks for the reply, Scott
> >>>
> >>>
> >>>My syntax looks okay on the jsp side and since the getExtrainfo method
is
> >>>being called it puzzles me that the set method is not being called on
> >>>submit.
> >>>
> >>> 
> >>>
> >>>
> >>>- ej
> >>>- Original Message -
> >>>From: "Barr, Scott [IBM GSA]" <[EMAIL PROTECTED]>
> >>>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> >>>Sent: Sunday, March 10, 2002 7:03 PM
> >>>Subject: RE: nested:iterate - set method not called
> >>>
> >>>
> >>>>Could it be that the html field in your jsp is named 'extraInfo'
> >>>>
> >>>(uppercase
> >>>
> >>>>'i'), and the setter is using a lowercase 'i' in the word info?
> >>>>
> >>>>Scott
> >>>>
> >>>>>-Original Message-
> >>>>>From: Elijah Jacobs [SMTP:[EMAIL PROTECTED]]
> >>>>>Sent: Monday, March 11, 2002 10:27 AM
> >>>>>To: Struts Users Mailing List
> >>>>>Subject: nested:iterate -  set method not called
> >>>>>
> >>>>>Hi,
> >>>>>
> >>>>>I am able to list the elements on  my Vector just fine, but I noticed
> >>>>>
> >>>that
> >>>
> >>>>>when I do a submit the set method is not being called, hence the
field
> >>>>>
> >>>is
> >>>
> >>>>>empty when it gets to the action class.
> >>>>>
> >>>>>Can someone suggest to me what the problem might be? my code is
below.
> >>>>>
> >>>>>thanks,
> >>>>>- ej
> &

Re: nested:iterate - set method not called

2002-03-17 Thread Arron Bates

The setter on a nested property, such as the list properties in my 
example, is only there as a convenience. The Struts managing code will 
never actually use it. It only worries about the last bean in the nested 
property definition. My construtors use it to make the simple example 
easier to do.

As for storing a reference to the form bean in all the shild beans... 
no. This is probably not model behaviour. I only did it so I could get 
my delete buttons working for the banana objects. The setter of the 
banana's object knows that the bean is to be deleted as it's been 
called. The reference to the parent bean is there so it can call the 
parent bean and tell it that it wants to be deleted.

If you don't need this more advanced bean driven functionality, then you 
really should avoid it.

Arron.


Elijah Jacobs wrote:

>Thanks for the reply Arron, ... well appreciated.
>
>but I noticed in your example that the MonkeyBean contains an ArrayList of
>monkeys  (ArrayList monkeyList) and you have both a setter and a getter
>method for it.  I was trying to duplicate this on my form bean.  My
>ArrayList is contained in the FormBean itself. That's why I was expecting
>the setter method in the formbean to be called.
>
>Also, is it necessary for the beans contained in my ArrayList to a reference
>to the form, much like you have a reference to the BananasIncorporatedBean
>from the MonkeyTeamBean.
>
>I apologize if these are simple question, I've struggle with this for 2 days
>now and the project deadline is not budging.
>
>- ej
>
>- Original Message -
>From: "Arron Bates" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Sunday, March 10, 2002 8:04 PM
>Subject: Re: nested:iterate - set method not called
>
>
>>The getter will only ever be called, as it's the middle-man.
>>The system only wants to set the "name" property on the nested bean. It
>>will call the getter of the "extrainfo" object to get at the nested
>>bean, and then set its property. Never actually calling the setter of
>>the parent bean property.
>>
>>Arron.
>>
>>
>>Elijah Jacobs wrote:
>>
>>>thanks for the reply, Scott
>>>
>>>
>>>My syntax looks okay on the jsp side and since the getExtrainfo method is
>>>being called it puzzles me that the set method is not being called on
>>>submit.
>>>
>>> 
>>>
>>>
>>>- ej
>>>- Original Message -
>>>From: "Barr, Scott [IBM GSA]" <[EMAIL PROTECTED]>
>>>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>>>Sent: Sunday, March 10, 2002 7:03 PM
>>>Subject: RE: nested:iterate - set method not called
>>>
>>>
>>>>Could it be that the html field in your jsp is named 'extraInfo'
>>>>
>>>(uppercase
>>>
>>>>'i'), and the setter is using a lowercase 'i' in the word info?
>>>>
>>>>Scott
>>>>
>>>>>-Original Message-
>>>>>From: Elijah Jacobs [SMTP:[EMAIL PROTECTED]]
>>>>>Sent: Monday, March 11, 2002 10:27 AM
>>>>>To: Struts Users Mailing List
>>>>>Subject: nested:iterate -  set method not called
>>>>>
>>>>>Hi,
>>>>>
>>>>>I am able to list the elements on  my Vector just fine, but I noticed
>>>>>
>>>that
>>>
>>>>>when I do a submit the set method is not being called, hence the field
>>>>>
>>>is
>>>
>>>>>empty when it gets to the action class.
>>>>>
>>>>>Can someone suggest to me what the problem might be? my code is below.
>>>>>
>>>>>thanks,
>>>>>- ej
>>>>>
>>>>>*** code 
>>>>>public Vector extrainfo;
>>>>>
>>>>>// call successfully
>>>>>public Object[] getExtrainfo() {...}
>>>>>
>>>>>//Not being called on submit
>>>>>public void setExtrainfo(Object[] infoList) {...}
>>>>>
>>>>>*** code 
>>>>>
>>>>>
>>>>>--
>>>>>To unsubscribe, e-mail:
>>>>><mailto:[EMAIL PROTECTED]>
>>>>>For additional commands, e-mail:
>>>>><mailto:[EMAIL PROTECTED]>
>>>>>
>>>>--
>>>>To unsubscribe, e-mail:
>>>>
>>><mailto:[EMAIL PROTECTED]>
>>>
>>>>For additional commands, e-mail:
>>>>
>>><mailto:[EMAIL PROTECTED]>
>>>
>>>--
>>>To unsubscribe, e-mail:
>>>
><mailto:[EMAIL PROTECTED]>
>
>>>For additional commands, e-mail:
>>>
><mailto:[EMAIL PROTECTED]>
>
>>>
>>
>>
>>--
>>To unsubscribe, e-mail:
>>
><mailto:[EMAIL PROTECTED]>
>
>>For additional commands, e-mail:
>>
><mailto:[EMAIL PROTECTED]>
>
>>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: nested:iterate - set method not called

2002-03-15 Thread Elijah Jacobs

Thanks for the reply Arron, ... well appreciated.

but I noticed in your example that the MonkeyBean contains an ArrayList of
monkeys  (ArrayList monkeyList) and you have both a setter and a getter
method for it.  I was trying to duplicate this on my form bean.  My
ArrayList is contained in the FormBean itself. That's why I was expecting
the setter method in the formbean to be called.

Also, is it necessary for the beans contained in my ArrayList to a reference
to the form, much like you have a reference to the BananasIncorporatedBean
from the MonkeyTeamBean.

I apologize if these are simple question, I've struggle with this for 2 days
now and the project deadline is not budging.

- ej

- Original Message -
From: "Arron Bates" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Sunday, March 10, 2002 8:04 PM
Subject: Re: nested:iterate - set method not called


> The getter will only ever be called, as it's the middle-man.
> The system only wants to set the "name" property on the nested bean. It
> will call the getter of the "extrainfo" object to get at the nested
> bean, and then set its property. Never actually calling the setter of
> the parent bean property.
>
> Arron.
>
>
> Elijah Jacobs wrote:
>
> >thanks for the reply, Scott
> >
> >
> >My syntax looks okay on the jsp side and since the getExtrainfo method is
> >being called it puzzles me that the set method is not being called on
> >submit.
> >
> >  
> >
> >
> >- ej
> >- Original Message -
> >From: "Barr, Scott [IBM GSA]" <[EMAIL PROTECTED]>
> >To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> >Sent: Sunday, March 10, 2002 7:03 PM
> >Subject: RE: nested:iterate - set method not called
> >
> >
> >>Could it be that the html field in your jsp is named 'extraInfo'
> >>
> >(uppercase
> >
> >>'i'), and the setter is using a lowercase 'i' in the word info?
> >>
> >>Scott
> >>
> >>>-Original Message-
> >>>From: Elijah Jacobs [SMTP:[EMAIL PROTECTED]]
> >>>Sent: Monday, March 11, 2002 10:27 AM
> >>>To: Struts Users Mailing List
> >>>Subject: nested:iterate -  set method not called
> >>>
> >>>Hi,
> >>>
> >>>I am able to list the elements on  my Vector just fine, but I noticed
> >>>
> >that
> >
> >>>when I do a submit the set method is not being called, hence the field
> >>>
> >is
> >
> >>>empty when it gets to the action class.
> >>>
> >>>Can someone suggest to me what the problem might be? my code is below.
> >>>
> >>>thanks,
> >>>- ej
> >>>
> >>>*** code 
> >>>public Vector extrainfo;
> >>>
> >>>// call successfully
> >>>public Object[] getExtrainfo() {...}
> >>>
> >>>//Not being called on submit
> >>> public void setExtrainfo(Object[] infoList) {...}
> >>>
> >>>*** code 
> >>>
> >>>
> >>>--
> >>>To unsubscribe, e-mail:
> >>><mailto:[EMAIL PROTECTED]>
> >>>For additional commands, e-mail:
> >>><mailto:[EMAIL PROTECTED]>
> >>>
> >>--
> >>To unsubscribe, e-mail:
> >>
> ><mailto:[EMAIL PROTECTED]>
> >
> >>For additional commands, e-mail:
> >>
> ><mailto:[EMAIL PROTECTED]>
> >
> >>
> >
> >--
> >To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
> >
> >
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: nested:iterate - set method not called

2002-03-10 Thread Arron Bates

The getter will only ever be called, as it's the middle-man.
The system only wants to set the "name" property on the nested bean. It 
will call the getter of the "extrainfo" object to get at the nested 
bean, and then set its property. Never actually calling the setter of 
the parent bean property.

Arron.


Elijah Jacobs wrote:

>thanks for the reply, Scott
>
>
>My syntax looks okay on the jsp side and since the getExtrainfo method is
>being called it puzzles me that the set method is not being called on
>submit.
>
>  
>
>
>- ej
>- Original Message -
>From: "Barr, Scott [IBM GSA]" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Sent: Sunday, March 10, 2002 7:03 PM
>Subject: RE: nested:iterate - set method not called
>
>
>>Could it be that the html field in your jsp is named 'extraInfo'
>>
>(uppercase
>
>>'i'), and the setter is using a lowercase 'i' in the word info?
>>
>>Scott
>>
>>>-Original Message-
>>>From: Elijah Jacobs [SMTP:[EMAIL PROTECTED]]
>>>Sent: Monday, March 11, 2002 10:27 AM
>>>To: Struts Users Mailing List
>>>Subject: nested:iterate -  set method not called
>>>
>>>Hi,
>>>
>>>I am able to list the elements on  my Vector just fine, but I noticed
>>>
>that
>
>>>when I do a submit the set method is not being called, hence the field
>>>
>is
>
>>>empty when it gets to the action class.
>>>
>>>Can someone suggest to me what the problem might be? my code is below.
>>>
>>>thanks,
>>>- ej
>>>
>>>*** code 
>>>public Vector extrainfo;
>>>
>>>// call successfully
>>>public Object[] getExtrainfo() {...}
>>>
>>>//Not being called on submit
>>> public void setExtrainfo(Object[] infoList) {...}
>>>
>>>*** code 
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:
>>><mailto:[EMAIL PROTECTED]>
>>>For additional commands, e-mail:
>>><mailto:[EMAIL PROTECTED]>
>>>
>>--
>>To unsubscribe, e-mail:
>>
><mailto:[EMAIL PROTECTED]>
>
>>For additional commands, e-mail:
>>
><mailto:[EMAIL PROTECTED]>
>
>>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: nested:iterate - set method not called

2002-03-10 Thread Barr, Scott [IBM GSA]


Ahhh, sorry! You are passing in an array of objects. I should read before
replying huh?
Check previous posts for this. I seem to remember something about providing
setItemId methods being used for indexed page elements?

Scott


> -Original Message-
> From: Elijah Jacobs [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, March 11, 2002 10:43 AM
> To:   Struts Users Mailing List
> Subject:  Re: nested:iterate -  set method not called
> 
> thanks for the reply, Scott
> 
> 
> My syntax looks okay on the jsp side and since the getExtrainfo method is
> being called it puzzles me that the set method is not being called on
> submit.
> 
>   
> 
> 
> - ej
> - Original Message -
> From: "Barr, Scott [IBM GSA]" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Sunday, March 10, 2002 7:03 PM
> Subject: RE: nested:iterate - set method not called
> 
> 
> >
> > Could it be that the html field in your jsp is named 'extraInfo'
> (uppercase
> > 'i'), and the setter is using a lowercase 'i' in the word info?
> >
> > Scott
> >
> > > -Original Message-
> > > From: Elijah Jacobs [SMTP:[EMAIL PROTECTED]]
> > > Sent: Monday, March 11, 2002 10:27 AM
> > > To: Struts Users Mailing List
> > > Subject: nested:iterate -  set method not called
> > >
> > > Hi,
> > >
> > > I am able to list the elements on  my Vector just fine, but I noticed
> that
> > > when I do a submit the set method is not being called, hence the field
> is
> > > empty when it gets to the action class.
> > >
> > > Can someone suggest to me what the problem might be? my code is below.
> > >
> > > thanks,
> > > - ej
> > >
> > > *** code 
> > > public Vector extrainfo;
> > >
> > > // call successfully
> > > public Object[] getExtrainfo() {...}
> > >
> > > //Not being called on submit
> > >  public void setExtrainfo(Object[] infoList) {...}
> > >
> > > *** code 
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> >
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: nested:iterate - set method not called

2002-03-10 Thread Elijah Jacobs

thanks for the reply, Scott


My syntax looks okay on the jsp side and since the getExtrainfo method is
being called it puzzles me that the set method is not being called on
submit.

  


- ej
- Original Message -
From: "Barr, Scott [IBM GSA]" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Sunday, March 10, 2002 7:03 PM
Subject: RE: nested:iterate - set method not called


>
> Could it be that the html field in your jsp is named 'extraInfo'
(uppercase
> 'i'), and the setter is using a lowercase 'i' in the word info?
>
> Scott
>
> > -Original Message-
> > From: Elijah Jacobs [SMTP:[EMAIL PROTECTED]]
> > Sent: Monday, March 11, 2002 10:27 AM
> > To: Struts Users Mailing List
> > Subject: nested:iterate -  set method not called
> >
> > Hi,
> >
> > I am able to list the elements on  my Vector just fine, but I noticed
that
> > when I do a submit the set method is not being called, hence the field
is
> > empty when it gets to the action class.
> >
> > Can someone suggest to me what the problem might be? my code is below.
> >
> > thanks,
> > - ej
> >
> > *** code 
> > public Vector extrainfo;
> >
> > // call successfully
> > public Object[] getExtrainfo() {...}
> >
> > //Not being called on submit
> >  public void setExtrainfo(Object[] infoList) {...}
> >
> > *** code 
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: nested:iterate - set method not called

2002-03-10 Thread Barr, Scott [IBM GSA]


Could it be that the html field in your jsp is named 'extraInfo' (uppercase
'i'), and the setter is using a lowercase 'i' in the word info?

Scott

> -Original Message-
> From: Elijah Jacobs [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, March 11, 2002 10:27 AM
> To:   Struts Users Mailing List
> Subject:  nested:iterate -  set method not called
> 
> Hi,
> 
> I am able to list the elements on  my Vector just fine, but I noticed that
> when I do a submit the set method is not being called, hence the field is
> empty when it gets to the action class.
> 
> Can someone suggest to me what the problem might be? my code is below.
> 
> thanks,
> - ej
> 
> *** code 
> public Vector extrainfo;
> 
> // call successfully
> public Object[] getExtrainfo() {...}
> 
> //Not being called on submit
>  public void setExtrainfo(Object[] infoList) {...}
> 
> *** code 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 

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