problem with <specialization-of>

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

problem with <specialization-of>

sqlien
Hi,

I created an  entity "MyPerson" like this:
<entity entity-name="MyPerson"
        package-name="org.ofbiz.party.party"
        title="">
        <field name="partyId" type="id-ne"></field>
        <field name="myfield" type="name"></field>
        <prim-key field="partyId"/>     
        <relation type="one" fk-name="My_PERSON" rel-entity-name="Person">
            <key-map field-name="partyId"/>
        </relation>
        <specialization-of entity-name="Person"/>

in my ftl i have an GenericValue  MyPerson. i want to display the firstname of MyPerson. remember that the field firstname is defined in the entity Person not in my entity MyPerson.

I get this error in .ftl file:
MyPerson.firstName is undefined

how to implement the inheritance to have access to fileds defined in the super entity ?

Thanks

in my ftl I want to
Reply | Threaded
Open this post in threaded view
|

Re: problem with <specialization-of>

Jacques Le Roux
Administrator
One more time this is Neogia specific. Please try to discern between topics.

Jacques

De : "sqlien" <[hidden email]>


>
> Hi,
>
> I created an  entity "MyPerson" like this:
> <entity entity-name="MyPerson"
>         package-name="org.ofbiz.party.party"
>         title="">
>         <field name="partyId" type="id-ne"></field>
>         <field name="myfield" type="name"></field>
>         <prim-key field="partyId"/>      
>         <relation type="one" fk-name="My_PERSON" rel-entity-name="Person">
>             <key-map field-name="partyId"/>
>         </relation>
>         <specialization-of entity-name="Person"/>
>
> in my ftl i have an GenericValue  MyPerson. i want to display the firstname
> of MyPerson. remember that the field firstname is defined in the entity
> Person not in my entity MyPerson.
>
> I get this error in .ftl file:
> MyPerson.firstName is undefined
>
> how to implement the inheritance to have access to fileds defined in the
> super entity ?
>
> Thanks
>
> in my ftl I want to
> --
> View this message in context: http://www.nabble.com/problem-with-%3Cspecialization-of%3E-tf4608266.html#a13159054
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: problem with <specialization-of>

sqlien
In reply to this post by sqlien
Sorry !
sqlien wrote
Hi,

I created an  entity "MyPerson" like this:
<entity entity-name="MyPerson"
        package-name="org.ofbiz.party.party"
        title="">
        <field name="partyId" type="id-ne"></field>
        <field name="myfield" type="name"></field>
        <prim-key field="partyId"/>     
        <relation type="one" fk-name="My_PERSON" rel-entity-name="Person">
            <key-map field-name="partyId"/>
        </relation>
        <specialization-of entity-name="Person"/>

in my ftl i have an GenericValue  MyPerson. i want to display the firstname of MyPerson. remember that the field firstname is defined in the entity Person not in my entity MyPerson.

I get this error in .ftl file:
MyPerson.firstName is undefined

how to implement the inheritance to have access to fileds defined in the super entity ?

Thanks

in my ftl I want to