Changing the eventlist that filterlists are watching

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

Changing the eventlist that filterlists are watching

by Jonathan Giles :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello all,

I'm sorry if this question has been asked a number of times - I don't know what term to look for so I'm hoping someone can point me in the correct direction.

Basically, I have a 'main' Jlist of items. Each item in the list has it's own EventList associated with it. In the same user interface, I have a number of other lists, each list being backed by a filter list.

What I'm wanting to acheive is that when the main list selection changes, I can somehow update the filter lists to look at the new EventList, without duplicating the list contents. At present the hacky approach I'm using is to addAll of the eventList to an EventList shared by the other lists. This has the desired effect, but is not optimal. The main problem being that when I add things to the proper EventList, they aren't reflected in the user interface, and vice versa.

Is there a recommended way to approach this?

Many thanks in advance!
Cheers,
Jonathan Giles

Re: Changing the eventlist that filterlists are watching

by Jonathan Giles :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ah - never mind - I re-read the API docs and CompositeList is exactly what I'm after.

Sorry for the disturbance :-)

Cheers,
Jonathan

Jonathan Giles wrote:
Hello all,

I'm sorry if this question has been asked a number of times - I don't know what term to look for so I'm hoping someone can point me in the correct direction.

Basically, I have a 'main' Jlist of items. Each item in the list has it's own EventList associated with it. In the same user interface, I have a number of other lists, each list being backed by a filter list.

What I'm wanting to acheive is that when the main list selection changes, I can somehow update the filter lists to look at the new EventList, without duplicating the list contents. At present the hacky approach I'm using is to addAll of the eventList to an EventList shared by the other lists. This has the desired effect, but is not optimal. The main problem being that when I add things to the proper EventList, they aren't reflected in the user interface, and vice versa.

Is there a recommended way to approach this?

Many thanks in advance!
Cheers,
Jonathan Giles

re[2]: Changing the eventlist that filterlists are watching

by Kevin Day :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Depending on what you are trying to do, a combination of EventSelectionModel.getSelected() and PluggableList (in SVN HEAD, but not in the latest official release yet) would work as well.  This sort of binding works well for parent-child user interface constructs, and should be more performant than compositing and filtering.  Just depends on what you are trying to do.
 
I also have a Calculation that can be used for obtaining the last selected element in a list (a common need in parent-child UIs).  I bind the results of that calculation (calculation.sublist) to the PluggableList.source property in the presentation model, then display the PluggableList in the view.  If you'd like more info on this approach, let me know (it does require that you be using some sort of binding framework, or wire the property change listeners by hand).
 
- K
 
 
 
 
----------------------- Original Message -----------------------
  
From: Jonathan Giles jo@...
Cc: 
Date: Tue, 28 Apr 2009 18:12:11 -0700 (PDT)
Subject: Re: Changing the eventlist that filterlists are watching
  

Ah - never mind - I re-read the API docs and CompositeList is exactly what
I'm after.

Sorry for the disturbance :-)

Cheers,
Jonathan


Jonathan Giles wrote:

>
> Hello all,
>
> I'm sorry if this question has been asked a number of times - I don't know
> what term to look for so I'm hoping someone can point me in the correct
> direction.
>
> Basically, I have a 'main' Jlist of items. Each item in the list has it's
> own EventList associated with it. In the same user interface, I have a
> number of other lists, each list being backed by a filter list.
>
> What I'm wanting to acheive is that when the main list selection changes,
> I can somehow update the filter lists to look at the new EventList,
> without duplicating the list contents. At present the hacky approach I'm
> using is to addAll of the eventList to an EventList shared by the other
&g t; lists. This has the desired effect, but is not optimal. The main problem
> being that when I add things to the proper EventList, they aren't
> reflected in the user interface, and vice versa.
>
> Is there a recommended way to approach this?
>
> Many thanks in advance!
> Cheers,
> Jonathan Giles
>

--
View this message in context: http://www.nabble.com/Changing-the-eventlist-that-filterlists-are-watching-tp23288856p23288928.html
Sent from the GlazedLists - User mailing list archive at Nabble.com.


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


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