Unable to get the correct selection with sorting

View: New views
4 Messages — Rating Filter:   Alert me  

Unable to get the correct selection with sorting

by julien.1486 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there !

I'm using Glazedlist with a JXTable and I have some troubles with selection.

I am using a EventSelectionModel with my EventList and it works fine if a don't sort the row (getSelected() return the correct instance).
If I sort the row the getSelected() function do not return the correct selected instance but it return the instance that was previously at this index (before sorting).

Is there a way to correctly retreive the user selection with sorting ?

Thanks for your help !
And sorry for my english :)

Julien

Parent Message unknown Re: Unable to get the correct selection with sorting

by Holger Brands :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Julien,

how did you setup your JXTable with Glazed Lists?
Did you disable the selection mapper?
What versions of SwingX and GL do you use?

Some info is available here:
http://sites.google.com/site/glazedlists/documentation/swingx

Hope this helps,
Holger

>
> Hi there !
>
> I'm using Glazedlist with a JXTable and I have some troubles with selection.
>
> I am using a EventSelectionModel with my EventList and it works fine if a
> don't sort the row (getSelected() return the correct instance).
> If I sort the row the getSelected() function do not return the correct
> selected instance but it return the instance that was previously at this
> index (before sorting).
>
> Is there a way to correctly retreive the user selection with sorting ?
>
> Thanks for your help !
> And sorry for my english :)
>
> Julien
> --
> View this message in context: http://www.nabble.com/Unable-to-get-the-correct-selection-with-sorting-tp24641582p24641582.html
> Sent from the GlazedLists - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


________________________________________________________________
Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Unable to get the correct selection with sorting

by James Lemieux :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ensure you pass the same, identical EventList to the constructor of EventTableModel and EventSelectionModel.

James

On Sun, Jul 26, 2009 at 1:36 PM, Holger Brands <hbrands@...> wrote:
Hi Julien,

how did you setup your JXTable with Glazed Lists?
Did you disable the selection mapper?
What versions of SwingX and GL do you use?

Some info is available here:
http://sites.google.com/site/glazedlists/documentation/swingx

Hope this helps,
Holger

>
> Hi there !
>
> I'm using Glazedlist with a JXTable and I have some troubles with selection.
>
> I am using a EventSelectionModel with my EventList and it works fine if a
> don't sort the row (getSelected() return the correct instance).
> If I sort the row the getSelected() function do not return the correct
> selected instance but it return the instance that was previously at this
> index (before sorting).
>
> Is there a way to correctly retreive the user selection with sorting ?
>
> Thanks for your help !
> And sorry for my english :)
>
> Julien
> --
> View this message in context: http://www.nabble.com/Unable-to-get-the-correct-selection-with-sorting-tp24641582p24641582.html
> Sent from the GlazedLists - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


________________________________________________________________
Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Re: Unable to get the correct selection with sorting

by julien.1486 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Holger,

I have disabled the selection mapper but I was only focus on the "Maintaining Selection" title on the swingX's page.
I tried the second approach but I did not succeed (I've maybe misunderstood the snippet) but it worked with the first one.

Thanks a lot for your answers and for maintaining this great project !

Julien
Holger Brands wrote:
Hi Julien,

how did you setup your JXTable with Glazed Lists?
Did you disable the selection mapper?
What versions of SwingX and GL do you use?

Some info is available here:
http://sites.google.com/site/glazedlists/documentation/swingx

Hope this helps,
Holger

>
> Hi there !
>
> I'm using Glazedlist with a JXTable and I have some troubles with selection.
>
> I am using a EventSelectionModel with my EventList and it works fine if a
> don't sort the row (getSelected() return the correct instance).
> If I sort the row the getSelected() function do not return the correct
> selected instance but it return the instance that was previously at this
> index (before sorting).
>
> Is there a way to correctly retreive the user selection with sorting ?
>
> Thanks for your help !
> And sorry for my english :)
>
> Julien
> --
> View this message in context: http://www.nabble.com/Unable-to-get-the-correct-selection-with-sorting-tp24641582p24641582.html
> Sent from the GlazedLists - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glazedlists.dev.java.net
> For additional commands, e-mail: users-help@glazedlists.dev.java.net
>
>


________________________________________________________________
Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glazedlists.dev.java.net
For additional commands, e-mail: users-help@glazedlists.dev.java.net