www.teamdev.com
1 Replies Last post: Jul 30, 2008 6:43 PM by Dmitry Pikhulya  
Click to view thakurs04's profile   3 posts since
Jul 24, 2008

Jul 29, 2008 9:13 PM

Treetable selected row selection


Hi There,

I need some guidience in implementing it.

Here's my situation. I have a treeTable exactly like the Quikukit treetable demo with requests and sub requests. above this table I have some text fields and drop down fields (not part of this tree). What I am looking for is, if user clicks (single or double doesn't matter) on a row then the values of that selected row should be displayed in the above text and other fields. Whats the fastest way to do this ? My request object has a bit more attributes than the demo applications "Request" object.


=============================

Thanks "Dmitry Pikhulya" for suggesting something on the following line, but I could not make it work.


<q:treeTable…>

<q:singleNodeSelection nodeData=”#{…}”/>

<q:row ondblclick=”document.forms[0].submit();”/>


</q:treeTable>

=======================================

I am sure some of the devlopers there might have come across this situation.


:-)Ajay

Click to view Dmitry Pikhulya's profile TeamDev Ltd. 147 posts since
Jan 5, 2007
1. Jul 30, 2008 6:43 PM in response to: thakurs04
Re: Treetable selected row selection
Ajay,

Please give details on you tried to implement this functionality and what exactly didn't work in your case. The idea for implementing this use case is quite simple: the TreeTable's selected node should be bound to some backing bean property, and all of the fields that show the data from the selected node should in turn be bound to properties of that selected object. In addition, taking into account that selection-dependent data is to be shown in editable components, you need to ensure correct submission of the edited data.

In fact the way of implementing such use-case is not specific to QuipuKit components, but is common for any JSF components those display a list of objects. For example, you can consider an ordinary <h:selectOneListbox> in place of TreeTable, and the general logic for implementing the editable details area will be the same for both components (except maybe the possibility of TreeTable selection tag's to execute server action on selection change, which might simplify the solution).

Regards,
Dmitry