Hi Isomorphic,
I just wanted to let you know that I spotted some unexpected behaviour with ListGrids (not really a bug I'd guess):
.java (excerpt)
.ds.xml
As you can see, I show the STATUS_ID field, which has a displayField of STATUS_SHORTNAME and is sorted on click via STATUS_POSITION (because of the SortNormalizer).
The setSortField("STATUS_POSITION") sorts the Gird on start, BUT, as I sort by the not shown field "STATUS_POSITION", no sort indicator is shown. This is perfectly fine for me.
If it weren't I'd say "Sort by STATUS_ID", which means replace setSortField("STATUS_POSITION") by setSortField("STATUS_ID").
This is not possible. Although no error is shown anywhere, the sort on start is by displayField and also a click on the column header sorts by displayField and not STATUS_POSITION. The SortNormalizer is not accessed, breakpoints within are not hit.
For me, it is no problem, as the workaround is 99% fine (it's just missing the sort indicator), but you might want to look into this nevertheless.
Also it would be great if you updated the docs with some information on the precedence of setSortByDisplayField and setSortNormalizer, especially "Do I have to set setSortByDisplayField(false) when using setSortNormalizer".
Best regards,
Blama
PS: I'm on FF 11.0, Eclipse Dev Mode with v8.2p_2012-05-30/EVAL Deployment 2012-05-30
I just wanted to let you know that I spotted some unexpected behaviour with ListGrids (not really a bug I'd guess):
.java (excerpt)
Code:
boundList = new ListGrid() {{ setSortField("STATUS_POSITION"); ListGridFieldStatus statusLGF = new ListGridFieldStatus("STATUS_ID", false, false); statusLGF.setSortByDisplayField(false); statusLGF.setSortNormalizer(new SortNormalizer() { @Override public Object normalize(ListGridRecord record, String fieldName) { return record.getAttributeAsInt("STATUS_POSITION"); } });
Code:
<field name="STATUS_ID" title="Status" type="int" displayField="STATUS_SHORTNAME" canEdit="false" tableName="V_PERSON_STATUS" /> <field name="STATUS_POSITION" title="Status Position" canEdit="false" hidden="true" type="int" tableName="V_PERSON_STATUS" /> <field name="STATUS_SHORTNAME" title="Statusname" canEdit="false" hidden="true" type="text" length="50" tableName="V_PERSON_STATUS" escapeHTML="true" />
The setSortField("STATUS_POSITION") sorts the Gird on start, BUT, as I sort by the not shown field "STATUS_POSITION", no sort indicator is shown. This is perfectly fine for me.
If it weren't I'd say "Sort by STATUS_ID", which means replace setSortField("STATUS_POSITION") by setSortField("STATUS_ID").
This is not possible. Although no error is shown anywhere, the sort on start is by displayField and also a click on the column header sorts by displayField and not STATUS_POSITION. The SortNormalizer is not accessed, breakpoints within are not hit.
For me, it is no problem, as the workaround is 99% fine (it's just missing the sort indicator), but you might want to look into this nevertheless.
Also it would be great if you updated the docs with some information on the precedence of setSortByDisplayField and setSortNormalizer, especially "Do I have to set setSortByDisplayField(false) when using setSortNormalizer".
Best regards,
Blama
PS: I'm on FF 11.0, Eclipse Dev Mode with v8.2p_2012-05-30/EVAL Deployment 2012-05-30
Comment