Re: [appfuse-user] by the way,how to save the set's element

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [appfuse-user] by the way,how to save the set's element

Matt Raible-3
On 6/27/05, Eric C. Hein <[hidden email]> wrote:
> Matt,
>
> Can you elaborate on this?
>
> I have a Question object, which has a one-to-many relationship with child
> objects called Choice(s).  I want to create/edit the Question entity and
> it's Choice(s) on the same jsp.  I cannot find "indexedProperties" in any of
> the XDoclet docs, but it looks interesting.

It's just an attribute that AppFuse's struts_form.xdt XDoclet template
looks for.

>
> Is there a way to get a variable number of choice forms added to Question
> form?

I don't understand the question.  If you use indexedProperties="true"
on @struts.form and you have a List - the appropriate getters and
setters should be produced for you in your forms.  Of course, you'll
also need to use convertLists() in your edit and save methods to get
your POJOs converted to Forms and vise versa.

Matt

>
> - Eric
>
>
>
> ----- Original Message -----
> From: "Matt Raible" <[hidden email]>
> To: <[hidden email]>
> Sent: Wednesday, June 22, 2005 9:54 PM
> Subject: Re: [appfuse-user] by the way,how to save the set's element
>
>
> If you're using Struts, your children have to be Lists (not Sets) and
> you have to put indexedProperties="true" as part of the @struts.form
> tag.  Following that, you have to make a call to convertLists(pojo) in
> your Action.edit() (before forwarding to your JSP) and Action.save()
> before saving it.
>
> Matt
>
> On 6/22/05, shu <[hidden email]> wrote:
> > if i have A class,which has one-to-many relationship ( a set )
> > i can save this pojo,but i cann't save the relationship .
> > did you met this problem?
> > thank you,
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]