struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff_Mycha...@nlgroup.ca
Subject Re: Nested Tags question
Date Fri, 14 Jun 2002 14:08:39 GMT


Looking forward to that tutorial....

BTW A comment on your tutorial work:
IMHO, you have raised the standards regarding Struts tutorials.
 After completing these on your site, you were able to convince me why I wanted
to use nested tags
as well how to use them.

Keep up the good work.





Arron Bates <struts-user@keyboardmonkey.com> on 06/14/2002 12:14:56 AM

Please respond to "Struts Users Mailing List" <struts-user@jakarta.apache.org>

To:   Struts Users Mailing List <struts-user@jakarta.apache.org>
cc:

Subject:  Re: Nested Tags question


Adam,

Back to the old "want lists, but no session objects" issue. It's a
common problem these days. It's hard to get the list model working
nicely without "knowing" how big the list is going to be so that objects
can be set against valid indexes.

The post you speek of in the archives is that I've made a collections
wrapps in the commons project which will wrap collections so that they
can expand by definition when the request comes in with indexed or
mapped properties.

I'm cutting a short tutorial on it ("how to make funky complex form
models leaving the session object in the closet"), should be finished in
the next few days. It should help a lot of people. Most people end up
with indexed lists, but it's hard to get them working properly on the
back end. It's not just a nested tags thing.

If you don't mind wading through code and having a go at the collections
wrapper with nothing but javadoc (good javadoc though :)...

http://cvs.apache.org/viewcvs/jakarta-commons/collections/src/java/org/apache/commons/collections/LazyCollections.java



Arron.


Adam Hardy wrote:

> Hi Down Under,
>
> thanks for the reply. I figured that the form properties setting thing
> must be struts, after checking out the JSP spec. JSP does do a certain
> amount of it though, since you can specify a tag in your jsp and say
> parameters="*" - and JSP will match any parameters in the request to
> methods on the tag's bean.
>
> Anyway sorry for sounding like such a dumbass but I've been through
> your tutorials. For the display, I've got the nested tags sussed -
> it's for the save on submit that I'm having problems. It's one of
> those aggravating problems that I can't pin down so it's difficult to
> ask the right questions.
>
> I've actually hacked out some code to stuff the request parameters
> into the bean structure by hand in the form's validate method.
> Obviously I'd like to do it automatically but I had to get the app
> working. To try to sort out what I've done wrong, I'll strip it back
> to the simplest bare bones and take it from there.
>
> What I can't work out from playing with your SavingMonkey demo is how
> struts gets the request parameters into beans inside each other inside
> the formbean. Is it necessary to instantiate the right amount of empty
> beans first? I see SavingMonkey instantiates everything on construction.
>
> When saving request parameters to the beans in the formbean, does
> struts call the beans' getter methods to get the ArrayLists and beans?
> I can't see how else it would get access the setter methods on the
> deeper nested beans.
>
> Thanks for your help. I did see a message in the archives here but I
> can't find it again, where you were talking about changes awaiting
> acceptance in CVS - is that just stuff that is now incorporated into
> struts 1.1? I'm using 1.0.2
>
> All the best,
> Adam




--
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