Announcement Announcement Module
No announcement yet.
Refresh items on ListSelectionDialog Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    You can call updateUI() on any JComponent.


    • #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.


      • #4
        It sounds like a RefreshableValueHolder will solve your problem. A description of how to use one can be found here:

        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.


        • #5
          yes, that is something similar for what i am looking for.

          i'll do something with that. thank you