selectionmodel with mvp

2014-03-30 Thread Amir kessentini
Hello :)
i have two classes :DevisPresenter and DevisView.
im mu devispresenter i'm called an rpc call wich return me a list of 
data.i'm setting this data with method setdata for the view to display data.
for that i'm using a celltable, my problem is that i want to recupered the 
object in the selected row.i have to use the singleselectionmodel but i 
don't khnow how :( i don't khnow what i should create in the presenter or 
the view ?
plz help

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to @Override Comparator to make the Column in CellTable sort based on Integer not based on String (GWT)?

2014-03-30 Thread Tom
Thank you very much for your answer. So we have to use Integer when declare 
property of object then.

On Monday, March 31, 2014 1:31:48 AM UTC+11, Jens wrote:
>
> Integer.parseInt() does not return an Integer object, it returns a 
> primitive int.
>
> You want Integer.valueOf().
>
> -- J.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Why “word-wrap” css style doesn't work inside a (GWT)?

2014-03-30 Thread Jens
You have to use table-layout:fixed in your CSS for the table element.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to @Override Comparator to make the Column in CellTable sort based on Integer not based on String (GWT)?

2014-03-30 Thread Jens
Integer.parseInt() does not return an Integer object, it returns a 
primitive int.

You want Integer.valueOf().

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


How to @Override Comparator to make the Column in CellTable sort based on Integer not based on String (GWT)?

2014-03-30 Thread Tom
 

Ok, I got a Table with a list of No.

No
1
2
5
10
20

If i set columnSortHandler for the No column using String like this:

columnSortHandler.setComparator(noColumn, new Comparator() {
@Override
public int compare(String[] o1, String[] o2) {
if (o1==o2) {
  return 0;
}


if (o1 != null) {

return (o2 != null) ? o1[0].compareTo(o2[0]) : 1;
}
return -1;
}
});

Then it won't sort like integer but like String. Ex: it will sort like this:

No
1
10
2
20
5

Then it is not correct.

So tried:

 columnSortHandler.setComparator(noColumn, new Comparator() {
@Override
public int compare(String[] o1, String[] o2) {
if (o1==o2) {
  return 0;
}


if (o1 != null) {

return (o2 != null) ? 
Integer.parseInt(o1[0]).compareTo(Integer.parseInt(o2[0]) : 1;
}
return -1;
}
});

But compareTo does not apply for Integer.

So my question is 

*How to @Override Comparator to make the Column in CellTable sort based on 
Integer not based on String (GWT)?* 

*(also 
**http://stackoverflow.com/questions/22743000/how-to-override-comparator-to-make-the-column-in-celltable-sort-based-on-intege
 
)*


-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.