Jack A. Rider:
If nothing is defined (<order> in field ) the view comes out by default ordered by primaryKey. You can add the <order>true</order> in case you want a column "orderable".
In case you have a very special need about ordering fields in the view, you can modify the generated code.
Very special?
Ok, maybe I need to rephrase my question:
Is there a possibility to define how the xmlportletfactory will create service.xml, especially the <order> element?
This snipped is taken from liferay-portal-src-6.0.5\definitions\liferay-service-builder_6_0_0.dtd:
1
2<!--
3The order element specifies a default ordering and sorting of the entities when
4they are retrieved from the database.
5-->
6<!ELEMENT order (order-column+)>
Jack A. Rider:
If I had to do something like you need, I would go, by modifying generated portlet "showViewDefault" function. As you will notice, records are stored in a java List (tempResults), and sended in the request object to the JSP. The order here is defined by the comparator.
Yes, this is what needs to be done ultimately. I'm just trying to understand how much I can get automatically generated and when I take over coding again.
Jack A. Rider:
Definitely. From what I saw so far this generation attempt will save me quite some tedious work, however I want to understand how it works so I get most out of it. :-)