> From: Colin Chalmers [mailto:[EMAIL PROTECTED]
>
> I've got a problem where I have to have many objects of the same
> type in one
> page.
Hey Colin.
It has been a while since I did this, but the following gives the general
idea.
1. Make sure you use get/setQueryKey() instead of .Default in your screen
template when mapping each object. This way you get field names like
"<groupkey><querykey><namekey>", ie "TheGroup142firstname" or
"TheGroup123firstname". Otherwise, the default would make every firstname
field "TheGroup_01firstname" and you would lose the all the objects in your
form but one.
2. Put a hidden string field "querykey" for each object in the form. The
value of this should be the getQueryKey() for each object in the form. Each
of these fields need to have the same name.
3. In your action, call String[] querykeys =
data.getParameters().getStrings("querykey"). This captures a list of
querykeys contained in the form.
4. Also in your action, cycle through each member in the querykeys array
calling intake.get("TheGroup", querykey) and performing your validation and
persistence for that object.
I hope this helps,
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]