You can do this with a view entity, like here :
<view-entity entity-name="PartyAndPerson"
package-name="org.ofbiz.party.party"
title="Party and Person View Entity">
<member-entity entity-alias="PTY" entity-name="Party"/>
<member-entity entity-alias="PERS" entity-name="Person"/>
<alias-all entity-alias="PTY"/>
<alias-all entity-alias="PERS"/>
<view-link entity-alias="PTY" rel-entity-alias="PERS">
<key-map field-name="partyId"/>
</view-link>
</view-entity>
Or with a DynamicViewEntity programatically.
Cimballi
On Tue, Feb 2, 2010 at 10:58 AM, Patrick <[email protected]> wrote:
> How can I do a join for a drop-down? I need to drop down all
> categories from a specific catalog, so I need to do a join
> ProdCatalogCategory and ProductCategory. Can this be done with an
> entity-constraint? What is the appropriate way to do this for a
> drop-down?
>
> <field name="contentTypeId" position="1">
> <drop-down allow-empty="true">
> <entity-options description="${categoryName}"
> entity-name="ProductCategory" key-field-name="productCategoryId">
> <!-- need to filter on a particular productCatalogId which I
> need to get from ProdCatalogCategory-->
> </entity-options>
> </drop-down>
> </field>
>
> Thanks. Patrick
>