yeah, because GWT not support java.text.Collator (and java.util.Locale also) ;/
Any solutions?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I found this solution which uses javascript. This is because GWT doesn’t support Collator.
http://osdir.com/ml/GoogleWebToolkit/2009-06/msg01572.html
I have never used it personally, but it looks promising.
You might have to make changes so that there are no cross browser issues.
Edit:
Read up on JSNI.
This allows GWT to invoke raw “javascript” code within your Java code. This is what we are doing in the above class. The method “compare” makes a native call to javascript.
http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsJSNI.html#writing
Add Collator.java to your current work space.
You should be able to compare as follows.
Hope this helps.