Using SmartGWT Power 3.0 (NB from 11/08/12)
I have a number field in an Oracle DB that needs to be represented as a java.sql.Timestamp value in both a ListGrid and a FilterBuilder. Originally I used createRecordComponent() to format the value in the ListGrid but that left undesirable behavior in the FilterBuilder.
I've tried using a customSelectExpression in the ds.xml
but that doesn't work -- conversion fails.
There are so many approaches to this task (another strategy in ds.xml? some sort of handler on the Client side? something along the lines of the ORMDataSource sample in the Showcase?) I am hoping you might be able to make a suggestion.
I have a number field in an Oracle DB that needs to be represented as a java.sql.Timestamp value in both a ListGrid and a FilterBuilder. Originally I used createRecordComponent() to format the value in the ListGrid but that left undesirable behavior in the FilterBuilder.
I've tried using a customSelectExpression in the ds.xml
Code:
<field name="TIMESTMP" type="datetime" customSelectExpression="CAST(TIMESTMP as NUMBER)"/>
There are so many approaches to this task (another strategy in ds.xml? some sort of handler on the Client side? something along the lines of the ORMDataSource sample in the Showcase?) I am hoping you might be able to make a suggestion.
Comment