Announcement Announcement Module
No announcement yet.
List of beans, JTable and binders.... Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • List of beans, JTable and binders....

    Hi there.

    I'm new with RC and I'm having some problems getting examples or documentation about it.

    Rigth now I'm trying to figure out how to bind the beans that I have in a list, and then build a JTable with it.

    Until now I've just achieve to build a table model from the list using the BeanTableModel class.

    The thing here is that I don't know how to associate or configure a binder for each bean in the list, with the purpose of having a JTable that updates the bean's properties each time I edit a cell on the JTable.

    Is this possible?

    Is there any examples that show something similar?

    Thanks in advance guys.

  • #2
    No good news for "in table" data entry:



    • #3
      If you can live without direct "in table" editing, you might consider using master/detail forms to handle the data in your list. It was designed to handle exactly this problem.

      Here's a writeup in the wiki:

      The code's in the sandbox.



      • #4
        Well the problem has been solved, I just realized that the BeanTableModel works exactly as I wanted, I can edit the cells and automatically the properties in the beans are modified.

        So it seems that this specific problem(a problem for me of course), has been solved.

        Right now I'm checking the link that lstreepy posted it.

        Thanks guys, you have been a lot of help.


        • #5
          Glad you found a workable solution. Just be aware that the BeanTableModel will allow for in place editing, but most of the other features of the RCP platform are not supported: no commit/revert handling, no validation support, no dirty tracking (so it can't participate fully in a form), etc.

          As long as you don't need any of those features, you should be good to go.