Hi Archie,

I am sorry, I don't follow you. Just to be sure, the problem here is
creating the XML (not the unmarshalling) with a constant "name" field in
each player, which comes from club.name.

I don't see how your reply answers this, can you explain further please?

Thank you,

Miguel

On Tue, 2010-09-21 at 10:18 -0500, Archie Cobbs wrote:

> You specify a factory method for creating each player that takes an
> Object parameter which you then cast to type Club.
> 
> See the description for the "factory" attribute for details.
> 
> -Archie
> 
> 
> On Tue, Sep 21, 2010 at 6:08 AM, Miguel <mig...@almeida.at> wrote:
> 
>         Hi,
>         
>         My issue is best described with an example. The question is:
>         in the following code, how can I replace
>         HOWTOGETTOPARENTOBJECT? in the binding so that I get
>         parentBindingField.name, knowing that Player doesn't have a
>         Team field:
>         
>         <club>
>           <name> Liverpool </name>
>         
>           <squad>
>             <player>
>               <team>Liverpool</team>
>               <name>Joe Cole</name>
>             </player> 
>             <player>....</player>
>           </squad>
>         </club>
>         
>         
>         Java:
>         Club{ 
>         String name; 
>         List players
>         }
>         
>         Player{
>         String playerName;
>         }
>         
>         
>         Jibx binding:
>         <binding>
>         <mapping class="Team">
>         <collection name="squad" usage="optional" field="players"
>         create-type="java.util.ArrayList">
>         <value name="squad" field="HOWTOGETTOPARENTOBJECT? I want
>         team.name here!"/>
>         <value name="name" field="name"/> 
>         </collection>
>         </mapping>
>         </binding>
>         
>         Thank you in advance,
>         
>         Miguel Almeida
>         
>         
>         
> ------------------------------------------------------------------------------
>         Start uncovering the many advantages of virtual appliances
>         and start using them to simplify application deployment and
>         accelerate your shift to cloud computing.
>         http://p.sf.net/sfu/novell-sfdev2dev
>         _______________________________________________
>         jibx-users mailing list
>         jibx-users@lists.sourceforge.net
>         https://lists.sourceforge.net/lists/listinfo/jibx-users
>         
> 
> 
> 
> 
> -- 
> Archie L. Cobbs
> 
> 
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________ jibx-users mailing list 
> jibx-users@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/jibx-users


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to