I finally gave up w/ 1.0 and moved to 1.1b2 (the one that comes w/
WSAD).
And the first thing I try w/ it doesn't work, so I must have the wrong
model again. So here goes;
I have a top level User -- who has a bunch of Preferences.
There is a UserForm, and a UserPrefForm.
The UserForm has a collection of UserPrefForm, and in addition has a
property called "selectedPref" which actions set to one of the
UserPrefForms. (The reason I want to do this is simple: I want to
display a table with all the UserPrefForms in summary form, and when
the user clicks on a Preference to display the detail along with the
form). The trouble is how can I display a UserPrefForm's fields when
I'm displaying a User? So I think <nested> can help.
1. I first try
<nested:text property="selectedPref.someField"> </nested:text>
Doesn't work -- PropertyUtils.throw an IllegalArgument exception --
No bean specified.
2. I then try
<nested:nest property="selectedPref"
<html:text property="someField">...
</nested:nest>
and
<nested:nest property="selectedPref"
<nested:text property="someField">...
</nested:nest>
nada ..
3. Then I think.. hmm I did read something about "root" and maybe
that's needed to set the scoping right..
<nested:root name="selectedPref">
<...>
</nested:root>
Now I get "selectedPref" not found in any scope!
How is this supposed to work!!!
Frustrated.
p.s. do I have the right model here.. that if I use the nested tag,
and invoke the action (say Save), the populate process in struts will
find the appropriate "selected" preference and save the nested fields
"in" the selected form. Note that this is what the document seems to
imply with all the discussion of bananas and monkeys.. does the code
not correspond to the documentation? (I was assuming that I'd get
bi-directional transfer.. i.e. from the forms to the jsp, and
vice-versa.. i.e. jsp to actions to the forms -- and that such
master-detail traversals are what nesting was designed for).
If I have this wrong, or if the implementation is just plain not
working yet, please could someone let me know.
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]