Hello,
I have a bind-define-template with a repeater. Is it possible to do a sort
in a repeater? How?
so instead of showing the different element of the repeater order by the
input, i want it sorted by p.e. name of by buid
here are the contents of the files;
bind file;
<bnd:repeater id="customers" parent-path="AlternateSessions"
row-path="SofToken" unique-row-id="sessionid" unique-path="sessionID">
<bnd:on-bind>
<bnd:value id="sessionid" path="sessionID" />
<bnd:value id="partnerid" path="partnerid" />
<bnd:value id="buid" path="unitId" />
<bnd:value id="name" path="partnerName" />
</bnd:on-bind>
</bnd:repeater>
define;
<wd:repeater id="customers">
<wd:widgets>
<wd:output id="partnerid">
<wd:datatype base="string">
<wd:validation />
</wd:datatype>
<wd:label>
<i18n:text>customers.label.id</i18n:text>
</wd:label>
</wd:output>
<wd:output id="buid">
<wd:datatype base="string">
<wd:validation />
</wd:datatype>
<wd:label>
<i18n:text>customers.label.id</i18n:text>
</wd:label>
</wd:output>
</wd:repeater>
<wd:output id="name">
<wd:datatype base="string">
<wd:validation />
</wd:datatype>
<wd:label>
<i18n:text>customers.label.name</i18n:text>
</wd:label>
</wd:output>
template;
<wt:repeater-size id="customers" />
<table border="0" cellspacing="0" cellpadding="0" alternate="true">
<wt:repeater-widget id="customers">
<tr>
<td valign="top" width="5%">
<wt:widget id="selected" />
</td>
<td>
<font class="small">
<wt:widget id="name"/>
</font>
(<wt:widget id="partnerid"/>)
</td>
</tr>
</wt:repeater-widget>
</table>
Roel Croonenberghs