on 06-08-2011 6:27 AM
Hi All,
I am facing an issue while sorting the date column in a table in my web dynpro java application.
When the date is displayed in the sql format in tha table, I am able to sort the date column successfully but when we convert the date field from sql format to util format in our table and then sort it does not work.
Kindly let us know the steps to be followed in this case to sort the date column of a table in Simple Date format as we do not want date in the sql format to be displayed.
Thanks & Regards,
Anurag
Hi,
That's odd, in theory you should be able to sort based on all types of objects...
By "it does not work", do you mean your table doesn't get sorted at all, or do you receive an exception?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The sorting is working fine. The only issue is that the date format is getting changed automatically.
Does it have any dependency on the Web Browser because in IE 9.0 it is coming as DD/MM/YYYY but when accessed with IE 6.0 it is coming as MM/DD/YYYY
We do not want this kind of dependency on the browser.
Thanks & Regards,
Anurag
Hi,
You might want to check whether both your browser's language settings are identical. The browser language could also determine the date format.
As a workaround, you could add an extra attribute to your context, and set the calculated property to 'true'.
In your table, add a new column and bind to this new attribute, and hide your original date column
If you sort using the date column that's hidden now, you could use the calculated field to fixed-format your date the way you prefer (by using the SimpleDateFormatter class for instance)
Cheers,
Robin
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.