Link to home
Start Free TrialLog in
Avatar of Ahmet Ekrem SABAN
Ahmet Ekrem SABANFlag for Austria

asked on

Binding problem with JGoodies and Java 7

Hello!

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?

Best regards!
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Isn't the correct place to ask about 3rd party Java gui components at that 3rd party? afaicr those things are largely undocumented
Avatar of Ahmet Ekrem SABAN

ASKER

I think that the problem is by no means a JGoodies problem, where the code is documented fine. The problem is in my code, as I filter the JTable and somehow, the model is not informed about it.
It's difficult to say, as you've posted no code at all
Here is a first try, 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.
Improved-table-filter-binding-de.zip
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, that's what I think also. What I need is an JGoodies expert who can tell me whether or not binding could work in such a case. That's why I asked for further attention of JGoodies experts - if any.
There almost certainly won't be any. The JGoodies 'experts' are ... the authors
I mean beside the authors, who are not necessarily programmers, there could be some programmers that encountered already such a problem & solved it in one way or another...
I mean beside the authors, who are not necessarily programmers
Well i certainly hope they are programmers

It's possible that someone here might know, but not probable imo
I found the "answer" of the question by asking a rarely-found JGoodies expert - expert, because he knows the answer to this question. He told me that he knows since a long time what Karsten Lentsch, the main author of JGoodies, wrote about this issue. The reason for this behaviour is that currently, SelectionInList does not support a filtered JTable. So, to me, there is a "missing" feature to be programmed by myself or by our team...
So, what i (we) said earlier then ...