Is there a way to get the IBM Websphere Commerce Foundation framework (WCF) sort data?
E.g. this snippet from a Websphere Commerce JSP file:
<wcf:getData type="com.ibm.commerce.store.facade.datatypes.GeoNodeType[]"
var="geoNodes" varException="geoNodeException" expressionBuilder="findChildGeoNodesByGeoNodeUniqueID">
<wcf:param name="accessProfile" value="IBM_Store_All" />
<wcf:param name="parentUniqueId" value="${provinceId}" />
</wcf:getData>
How would I get this to sort the data by a given data field in GeoNodeType? Can I add something like <wcf:param name="sortBy" value="Description" /> ?
ExpressionBuilder “findChildGeoNodesByGeoNodeUniqueID” from your example is declared in /Stores/WebContent/WEB_INF/config/com.ibm.commerce.store/get-data-config.xml as follows:
According to expression-builder tag docs, if expression-language is not specified inside expression-builder tag – XPath language is used by default. Unfortunately XPath does not support ordering.
I imagine that you can still implement your own ExpressionBuilder class (I haven’t done that), implement any kind of sorting inside this new class, and then specify it in get-data-config.xml