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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Matt Raible-3
On 6/25/05, shu <[hidden email]> wrote:

> Matt Raible <mraible@...> writes:
>
> >
> > If you're using Struts, your children have to be Lists (not Sets) and
> > you have to put indexedProperties="true" as part of the  <at> 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.
> >
>
> hi,Matt,thank you reply :)
> yes,i am use struts+hibernate.
> i checked User.java it use set, not list,
> also have not set IndexedProperties
> User can save children with set,
> but you said must use list..
> Did i miss something ?

I did some research on the Struts Mailing List.  In order to use
indexed properties in Struts - you have to use a List, not a Set.
This is the answer I received from folks on that list.

http://www.mail-archive.com/user@.../msg26289.html

As I see it, there are a couple of possible solutions:

1.  Modify the struts_form.xdt to generate a List for Sets and handle
the conversion.
2.  Register a Converter with ConvertUtils that handles Sets.
3.  Get rid of ActionForms since the latest version of Struts
apparently lets you live without them.

I'd prefer option 3, but I don't know if that solves the List vs. Set
for indexed properties.  If anyone has time to research this more and
figure out the best possible solution - that'd be great.

Matt

>
> Best Regards
>
>
>
>
>
>
> ---------------------------------------------------------------------
> 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]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Sergey Pariev-2
Matt Raible wrote:

> On 6/25/05, shu <[hidden email]> wrote:
>
>>Matt Raible <mraible@...> writes:
>>
>>
>>>If you're using Struts, your children have to be Lists (not Sets) and
>>>you have to put indexedProperties="true" as part of the  <at> 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.
>>>
>>
>>hi,Matt,thank you reply :)
>>yes,i am use struts+hibernate.
>>i checked User.java it use set, not list,
>>also have not set IndexedProperties
>>User can save children with set,
>>but you said must use list..
>>Did i miss something ?
>
>
> I did some research on the Struts Mailing List.  In order to use
> indexed properties in Struts - you have to use a List, not a Set.
> This is the answer I received from folks on that list.
>
> http://www.mail-archive.com/user@.../msg26289.html
>
> As I see it, there are a couple of possible solutions:
>
> 1.  Modify the struts_form.xdt to generate a List for Sets and handle
> the conversion.
> 2.  Register a Converter with ConvertUtils that handles Sets.
> 3.  Get rid of ActionForms since the latest version of Struts
> apparently lets you live without them.
>

Just wanted to ask if there plans to upgrade Appfuse to the latest
version of Struts ? And where one should look for docs/tutorials on this
topic ( I mean how to live w/o ActionForms) ?

TIA, Sergey.

> I'd prefer option 3, but I don't know if that solves the List vs. Set
> for indexed properties.  If anyone has time to research this more and
> figure out the best possible solution - that'd be great.
>
> Matt
>
>
>>Best Regards
>>
>>
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>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]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Matt Raible-3
It's my goal and desire to keep AppFuse up-to-date with all the latest
releases of its dependencies.  I didn't realize Struts 1.2.7 had been
released, but now I see that it has.  I'll enter an issue for it in
JIRA and make sure it gets into the next release.

FYI... Here's the comment from one of the Struts Developers that talks
about POJOs instead of ActionForms.

http://raibledesigns.com/comments/rd/sunsets/colorado_software_summit_spring_and#comment3

Matt

On 7/26/05, Sergey Pariev <[hidden email]> wrote:

> Matt Raible wrote:
> > On 6/25/05, shu <[hidden email]> wrote:
> >
> >>Matt Raible <mraible@...> writes:
> >>
> >>
> >>>If you're using Struts, your children have to be Lists (not Sets) and
> >>>you have to put indexedProperties="true" as part of the  <at> 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.
> >>>
> >>
> >>hi,Matt,thank you reply :)
> >>yes,i am use struts+hibernate.
> >>i checked User.java it use set, not list,
> >>also have not set IndexedProperties
> >>User can save children with set,
> >>but you said must use list..
> >>Did i miss something ?
> >
> >
> > I did some research on the Struts Mailing List.  In order to use
> > indexed properties in Struts - you have to use a List, not a Set.
> > This is the answer I received from folks on that list.
> >
> > http://www.mail-archive.com/user@.../msg26289.html
> >
> > As I see it, there are a couple of possible solutions:
> >
> > 1.  Modify the struts_form.xdt to generate a List for Sets and handle
> > the conversion.
> > 2.  Register a Converter with ConvertUtils that handles Sets.
> > 3.  Get rid of ActionForms since the latest version of Struts
> > apparently lets you live without them.
> >
>
> Just wanted to ask if there plans to upgrade Appfuse to the latest
> version of Struts ? And where one should look for docs/tutorials on this
> topic ( I mean how to live w/o ActionForms) ?
>
> TIA, Sergey.
>
> > I'd prefer option 3, but I don't know if that solves the List vs. Set
> > for indexed properties.  If anyone has time to research this more and
> > figure out the best possible solution - that'd be great.
> >
> > Matt
> >
> >
> >>Best Regards
> >>
> >>
> >>
> >>
> >>
> >>
> >>---------------------------------------------------------------------
> >>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]

Loading...