www.teamdev.com
9 Replies Last post: Aug 11, 2008 3:42 PM by Joerg Mertins  
Click to view Joerg Mertins's profile   35 posts since
Jul 16, 2007

Jul 30, 2008 3:11 PM

TreeTable and DataTable in on view: selected items from checkboxcolumn are not set to backing bean


Hello,

I have a problem with a view, which combines a treetable on the left side and a datatable on the right side. First I select a node in tree and after this I select some rows in the datatable. After this I press the button under datatable to submit the selection from checkboxColumn. I have an attribut selected in the class for storing the selection, but no one is written on the field. That is a big problem, because without the treetable the selections works very fine.

I have add my application with source code for you. I removed the quipukit libs for smaller file size.


Best regards!

Joerg

Attachments:
Click to view Dmitry Pikhulya's profile TeamDev Ltd. 147 posts since
Jan 5, 2007
1. Jul 31, 2008 10:31 PM in response to: Joerg Mertins
Re: TreeTable and DataTable in on view: selected items from checkboxcolumn are not set to backing bean
Hello Joerg,

Thank you for providing the application. We are going to investigate this problem and will let you know as soon as possible.

Regards,
Dmitry
Click to view Dmitry Pikhulya's profile TeamDev Ltd. 147 posts since
Jan 5, 2007
2. Aug 1, 2008 8:26 PM in response to: Joerg Mertins
Re: TreeTable and DataTable in on view: selected items from checkboxcolumn are not set to backing bean
Hello Joerg,

Unfortunately I wasn't able to figure out the problem by the source code that you have provided. The pages are too complex to investigate them without having a working version, and I'm not able to run the application because there are no compiled classes, and there are references to non-available files. Please simplify the page where the problem can be reproduced as much as possible to a minimum configuration where the problem still exists. This will help you resolve any possible problem in application logic if it is actually an application problem, and will let us see the specifics that causes a problem with QuipuKit component if there is such a problem. If you still won't be able to resolve the problem on the simplified application, please send us a war file with source code of the backing beans so that we can run the application and investigate the problem.

Here are also some considerations that might help you find the cause of the problem. Please double-check that the method to which the checkboxColumn is bound is indeed not invoked when the form is submitted. If it is not invoked the most likely problem is a failed validation or conversion somewhere on a page because the "update model values" phase is skipped in this case. This means that any other component would also skip saving its value into the backing bean, and you can check this assumption by placing and additional h:inputText on your page and see if its value is submitted. Please also ensure that there are no errors in server logs and no JavaScript errors in the browser.

Regards,
Dmitry
Click to view Dmitry Pikhulya's profile TeamDev Ltd. 147 posts since
Jan 5, 2007
4. Aug 4, 2008 4:56 PM in response to: Joerg Mertins
Re: TreeTable and DataTable in on view: selected items from checkboxcolumn are not set to backing bean
Hello Joerg,

I have studied the working appliaction that you have provided, and it appeared that bindings do not work because the command link that initiates page submission has the immediate="true" attribute, which skips the "update model values" phase for all components, not just the DataTable. Removing this attribute or setting it to "false" makes check-box column bindings to work as expected. So this doesn't seem to be an issue specific to some version of QuipuKit.

Regards,
Dmitry
Click to view Dmitry Pikhulya's profile TeamDev Ltd. 147 posts since
Jan 5, 2007
6. Aug 4, 2008 6:32 PM in response to: Joerg Mertins
Re: TreeTable and DataTable in on view: selected items from checkboxcolumn are not set to backing bean
Joerg,

I just have changed the value of the commandLink's immediate attribute to "false" to make binding work. This was the only change in the war file that you have provided. The modified version of WebspaceFolders.xhtml is attached to this post. Please note that I can't ensure the correct work of your application logic on this page. I have just ensured that unlike the original war, the "update model values" phase is now executed when the TreeTable node is clicked, and check-box column binding is being written to. Please confirm that binding setter works for you as well in this same case.

Regards,
Dmitry
Attachments:
Click to view Dmitry Pikhulya's profile TeamDev Ltd. 147 posts since
Jan 5, 2007
8. Aug 5, 2008 3:26 PM in response to: Joerg Mertins
Re: TreeTable and DataTable in on view: selected items from checkboxcolumn are not set to backing bean
Joerg,

We'll investigate this and will let you know as soon as possible.

Regards,
Dmitry