• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to bind a filtered table using the JGoodies library?  RSS feed

 
Ekrem Saban
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody!

I am working for my customer in a Java EE project, where we use JGoodies for binding JTable rows to text fields below the table. This works fine, but in one dialog, there are filtering check boxes. When all the check boxes - three in number - are clicked, all items become visible. If non are checked, the table remains empty. It is possible to filter out some rows, but JGoodies, which uses the table model, is not aware of this filtering. When clicking the first row in the filtered table, the first row elements of the unfiltered table are displayed in the text fields below. Is there a way to circumvent this problem?

To my opinion, the problem is not a JGoodies problem, but binding a text field with JGoodies using the table model of a table that has been filtered.

I attached an example, where I couldn't manage to bind the text field with the Bindings.bind method, but it shows the problem. I adopted some code found on the Internet for my purposes.

The table is filtered according to the combo box contents. If the GENERAL type of eating is selected, the binding of the text field below is fine. If, however, the combo box selects parts of the table contents, the text field below still gets the information from the (unfiltered) table model. Here, I need information how can I do this in the proper way.

Thank you for your help in advance!

 
m Korbel
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
crossposted
 
Tony Docherty
Bartender
Posts: 3195
78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please BeForthrightWhenCrossPostingToOtherSites (← click). If we don't know the question is cross posted then we may end up wasting our valuable time duplicating an answer.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!