• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to bind a filtered table using the JGoodies library?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!

 
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
crossposted
 
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic