You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by xxshutong <xx...@gmail.com> on 2013/11/02 04:55:54 UTC

How to sort by foreign table column

Hi Guys,
I have a list page with form as bellow:
<service service-name="performFind" result-map="result" result-map-list="listIt">
          <field-map field-name="inputFields" from-field="inputCtx"/>
          <field-map field-name="entityName" value="InventoryInput"/>
          <field-map field-name="orderBy" value="productId"/>
          <field-map field-name="viewIndex" from-field="viewIndex"/>
          <field-map field-name="viewSize" from-field="viewSize"/>
</service>

productId is a foreign key, how can I sort by a foreign column.
like <field-map field-name="orderBy" value="product.name"/> can not work.

Thanks,
Leon.Zhou

Re: How to sort by foreign table column

Posted by xxshutong <xx...@gmail.com>.
I know I can do it with java. But I have many pages like this. I don't want to code so much for many pages just for sorting.

Thanks,
Leon.Zhou

On Nov 2, 2013, at 11:55 AM, xxshutong <xx...@gmail.com> wrote:

> Hi Guys,
> I have a list page with form as bellow:
> <service service-name="performFind" result-map="result" result-map-list="listIt">
>           <field-map field-name="inputFields" from-field="inputCtx"/>
>           <field-map field-name="entityName" value="InventoryInput"/>
>           <field-map field-name="orderBy" value="productId"/>
>           <field-map field-name="viewIndex" from-field="viewIndex"/>
>           <field-map field-name="viewSize" from-field="viewSize"/>
> </service>
> 
> productId is a foreign key, how can I sort by a foreign column.
> like <field-map field-name="orderBy" value="product.name"/> can not work.
> 
> Thanks,
> Leon.Zhou