Forums

Home » Liferay IDE » English

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Rui Maciel
Multiple Order in Service Builder
July 23, 2012 8:56 AM
Answer

Rui Maciel

Rank: Junior Member

Posts: 36

Join Date: July 23, 2012

Recent Posts

Hi, i'm new in Liferay Community, i wonder if i can do this in Service Builder:
 1<!-- Order -->
 2        <order by="asc"><order-column name="entityId"/></order>
 3        <order by="desc"><order-column name="entityId"/></order>
 4        <order by="asc"><order-column name="field1"/></order>
 5        <order by="desc"><order-column name="field1"/></order>
 6        <order by="asc"><order-column name="field2"/></order>
 7        <order by="desc"><order-column name="field2"/></order>
 8        <order by="asc"><order-column name="field3"/></order>
 9        <order by="desc"><order-column name="field3"/></order>

My goal is to use this in a search container. I want to know if the service builder generates automatically the needed methods, because if i set the needed values in "orderable" and "orderableproperty" parameters in liferay-ui:search-container-column-tex fields, it doesn't work.

Thanks
Rui Maciel
Rui Maciel
RE: Multiple Order in Service Builder
July 23, 2012 9:51 AM
Answer

Rui Maciel

Rank: Junior Member

Posts: 36

Join Date: July 23, 2012

Recent Posts

I got myself the answer, so I opened the file in the liferay IDE and i got and error in service.xml. I can only have one <order> tag per entity.
Since i was editing service.xml file in notepad ++, this kind of errors weren't detected.
Marco Antônio Leite Cavalcante
RE: Multiple Order in Service Builder
August 7, 2015 1:01 PM
Answer

Marco Antônio Leite Cavalcante

Rank: Junior Member

Posts: 57

Join Date: June 4, 2012

Recent Posts

1<order>
2    <order-column name="articleId" order-by="asc" />
3    <order-column name="version" order-by="desc" />
4</order>

The above settings will order by articleId in an ascending manner and then by version in a descending manner.