-
Aug 16th, 2010, 07:04 PM
#1
Refresh items on ListSelectionDialog
Is there a way, with no workaround, to get ListSelectionDialog refresh its items? i mean a public function or something to change items.
I've looking at the code and it seems there is no such function, all are protected setters. So maybe this is a dumb question, but i'd like to know if ListSelectionDialog was created thinking in that possibility, or i use Combos or another component?
thank you very much
-
Aug 19th, 2010, 04:03 PM
#2
You can call updateUI() on any JComponent.
-
Aug 19th, 2010, 04:18 PM
#3
Maybe i explain bad.
My idea is as follows:
I have an object wich has a property that i need to select from a list of values, for that reason i use ListSelectionDialog. The problem comes because the values that are shown in this Dialog depends on the value selected on another property, so i catch the value change in the property and then i would have to change the values in the ListSelectionDialog. The problem is that there are no way for doing this as i can realize. I had to implement a custom combobox binding for this purpose, because springrcp's combobinding does not allow to alter items neither.
So i ask here because of the question of my first post, ListSelectionDialog's creators made it thinking in a possible update of items or not, and if not, spring rcp's authors has something for my needs or i need to implement a custom binding.
Thank you.
-
Aug 20th, 2010, 11:21 AM
#4
It sounds like a RefreshableValueHolder will solve your problem. A description of how to use one can be found here:
http://forum.springsource.org/showthread.php?t=89773
What you are trying to do sounds similar to the shuttle list solution described. When you select the the value for the first property you simply call the refresh method on the refreshable value holder to update the set of values available from the ListSelectionDialog. Hopefully this helps. This will also work for the combobox problem you described as well.
-
Aug 21st, 2010, 02:37 AM
#5
yes, that is something similar for what i am looking for.
i'll do something with that. thank you
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules