Hi,

The Jira issue tracker for Tomahawk you can find at
http://issues.apache.org/jira/browse/TOMAHAWK
. It should  be pretty straightforward after you sign up, if you don't have
an account there already, to create a new issue. Not much to worry about.

I'm running a little to short on time right now, so i can't make a promise,
but it should be resolved this week, and with the next nightly build you can
have it then.

The nightly builds can be found at:
http://people.apache.org/repo/m2-snapshot-repository/org/apache/myfaces/tomahawk/tomahawk/1.1.5-SNAPSHOT/

Regards,
Catalin

On 1/17/07, Tomislav Jakopec <[EMAIL PROTECTED]> wrote:


Hi!

I look the code and try something

public int compare(Object o1, Object o2)
        {


            int index1 = ((Integer) o1).intValue();
            int index2 = ((Integer) o2).intValue();

            _model.setRowIndex(index1);
            Object value1 = getPropertyValue(_prop);

            _model.setRowIndex(index2);
            Object value2 = getPropertyValue(_prop);

            if (value1 == null)
                return (value2 == null) ? 0 : -1;

            if (value2 == null)
                return 1;

         //my code
            if(value1 instanceof java.lang.String){
                Collator collator = Collator.getInstance(

FacesContext.getCurrentInstance().getViewRoot().getLocale());
                                collator.setStrength(Collator.PRIMARY);
                       return collator.compare(value1, value2);
            }
       //end my code

            // ?? Sometimes, isSortable returns true
            // even if the underlying object is not a Comparable.
            // This happens if the object at rowIndex zero is null.
            // So test before we cast:
            if (value1 instanceof Comparable)
            {
                return ((Comparable) value1).compareTo(value2);
            }
            else
            {
                // if the object is not a Comparable, then
                // the best we can do is string comparison:
                return value1.toString().compareTo(value2.toString());
            }
        }

I don't now how to report to jira, could you be so kind and do it?
When will change be avaiable for download and where?

Thanks lot. This will reduce my code for about 10 % :)
--
View this message in context: 
http://www.nabble.com/datatable-sortable-order-problem-for-non-english-languages-tf3019397.html#a8410212

Sent from the My Faces - Dev mailing list archive at Nabble.com.


Reply via email to