Thanks for your answer.

>> <jsp:useBean id="beanContainer" class="com.mycompany.MyBeanContainer"
>> scope="session"></jsp:useBean>>
> You shouldn't need the above on the page. You should set
> MyBeanContainer  with the id "beanContainer" into session or request
> scope in the Action  you are in "BEFORE" you get to this JSP page. The
> page will have it. No  need to use the useBean stuff.>


the point is:

1) beanContainer was put into session by another jsp previously.

2)I need to fetch his values, display them in a form, let the user
modifying them.
3) Finally, I have to post data to an action which will make some stuff
and update beanContainer into session.

>> which is nice but not satisfying. I'd like to get something like:
>>
>>
>> <input type="text" name="beanContainer.listaDanneggiati[0].nome"
>> value="SDFSDF" class="inputText"><br/>>
> I don't sew why you would want this? The form bean property is the 
> ArrayList listaDanneggiati so that's what will get set when you submit  
> the form. Your form bean doesn't have a bean property "beanContainer" so
>   you wouldn't even want that trying to be added.. you'd get a "no  
> property 'beanContainer" found in form.." error.>


ok, I was not even able to test sufficently this aspect of the problem.


> What scope is your canalizzazioneCLDForm given in the ActionMapping. The
>   quick way to avoid this problem is to make sure it has Session scope.

I've checked, it has session scope.


> If you don't give it session scope you'll have to do some other things
>  to make sure their are the proper number of fields available to set in
> your nested arrays (annoying I know, but this comes up a lot on the 
> list   so search the archives some or in the mean time just use Session 
> scope   for your form to get it working).

As I told you before, I deal with the ArrayList property of a bean which
is already in session. My problem is I don't actually realize what is the
object which is submitted by the form. You told it is the ArrayList
itself, but how is it mapped onto the (Dynamic) form I've defined in
stuts-config.xml? I don't understand why I get the
IndexOutOfBoundsExceptions. It seems the ArrayList which is passed to the
form-bean is null or empty.

thanks



-- 
Paride Perazzolo
[EMAIL PROTECTED]




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

Reply via email to