Awesome, I'll have to give that a go

Alex

On Sat, Nov 8, 2008 at 10:59 AM, Chris Herron <[EMAIL PROTECTED]> wrote:

> Alex,
>
> For Striperist and other pre-binding TypeConverter approaches, there's a
> little gotcha that trips people up sometimes; you need to pass the object's
> ID like so:
>
> <s:hidden name="foo.bar.yourTargetedProperty" value="3" />
>
> instead of
>
> <s:hidden name="foo.bar. yourTargetedProperty.id" value="3" />
>
> Note that you don't target the property's ID field, you target the property
> itself in order to allow the TypeConversion-driven find-entity-by-id to
> work.
>
> See the 'simpleEntity' deletion example bundled with Stripersist:
>
> http://stripes-stuff.svn.sourceforge.net/viewvc/stripes-stuff/Stripersist/trunk/example/web/index.jsp?revision=61&view=markup
>
> Chris.
>
> On Nov 8, 2008, at 1:56 AM, Levi Hoogenberg wrote:
>
> You might want to look into type converters (see
> http://www.stripesframework.org/display/stripes/Validation+Reference, the
> Type Conversion section). That way, the ID (or any other unique field that
> you choose) is indeed enough and you can have a setter that accepts the
> entity.
>
> I believe that the Stripernate/Stripersist plugin registers type converters
> for all of your managed entities automatically, but I've never used it, so
> I'm not sure.
>
>   Levi
>
> On Sat, Nov 8, 2008 at 5:56 AM, Alex Turner <[EMAIL PROTECTED]> wrote:
>
>> I have a form that builds an object on the ActionBean.  The object is
>> called trifoldBrochure.  trifoldBrochure has itself objects that represent
>> selection items and therefore point to xref tables in the database, so they
>> are themselves objects.  How I have currently figured on doing this is as
>> follow
>>
>> <s:radio name="copySourceId" value="3"/>
>>
>> then have a setter for this variable, and do
>>
>> trifoldBrochure.copySource = copySourceDao.read(copySourceId);
>>
>> this seems laborious.  isn't there some way I can just do
>>
>> <s:radio name="trifoldBrochure.copySource.id"/>
>>
>> plus some other magic and have it work?
>>
>> Do I even have to load the sub-object to save it?  is the id enough of the
>> object to persist it to the parent?
>>
>> yours,
>>
>> Alex
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Stripes-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>
>>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
>
> http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to