Hi,
I created a custom data type class (mySimpleMoney) which extends SimpleType. I've set the name property to 'myMoney' and the
inheritsFrom property to 'float'.
Whenever I embed a field with this type inside a listGrid, sorting doesn't work properly for that column (undefined fields don't get sorted). The
only way I found to have this work was to define a sortNormalizer within my datasource, on every field occurrence for this custom data type. I
believe this is somewhat cumbersome and error prone (not DRY at all).
I noticed that the ISC framework will by default set field.type as the sortNormalizer when none is provided, but the problem I'm facing
is that the underlying Array sorting method doesn't know about my custom data type.
I'm trying to find a better approach to fixing this sorting issue with my custom data type, without the need to specify a sortNormalizer
on each field instance, but rather inside the mySimpleMoney definition or override the Array _getNormalizerFromType() method. I'm
looking for a do-once-and-forget solution so that my custom data type becomes a first class citizen and behaves properly in terms of sorting ...
Any idea on where/how I could make this work in a more simple way?
Once again, thanks for your help ...
I created a custom data type class (mySimpleMoney) which extends SimpleType. I've set the name property to 'myMoney' and the
inheritsFrom property to 'float'.
Whenever I embed a field with this type inside a listGrid, sorting doesn't work properly for that column (undefined fields don't get sorted). The
only way I found to have this work was to define a sortNormalizer within my datasource, on every field occurrence for this custom data type. I
believe this is somewhat cumbersome and error prone (not DRY at all).
I noticed that the ISC framework will by default set field.type as the sortNormalizer when none is provided, but the problem I'm facing
is that the underlying Array sorting method doesn't know about my custom data type.
I'm trying to find a better approach to fixing this sorting issue with my custom data type, without the need to specify a sortNormalizer
on each field instance, but rather inside the mySimpleMoney definition or override the Array _getNormalizerFromType() method. I'm
looking for a do-once-and-forget solution so that my custom data type becomes a first class citizen and behaves properly in terms of sorting ...
Any idea on where/how I could make this work in a more simple way?
Once again, thanks for your help ...
Comment