Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Florent Baud on Sep 16, 2008 03:55
open dhtmlx forum
dhtmlTree getAllChecked with enableSmartXmlParsing and enableThreeStateCheckboxes

Hi.
I've got a weird behavior on dhtml tree when I try to get all checked items. I've got Pro version 1.6
My root tree has 2 children.
I open first child and open next one of its children and chek it. So my first root child is partially checked.
I submit my form, and redraw my tree ( all nodes are closed, and first node is partially cheked ).
I open the 2nd child of my root tree, and check the first child found.
I've got a handler function to react on check event, to update an hidden input in my form, with all checked items id.
When I try to get checked items id after 2nd child of my root has been partially selected, I lose all ids of my 1st selection.

You will find below javascript called to build tree and handler method to react on check event:
function loadjsdiscTree() {
jsdiscTree=new dhtmlXTreeObject( 'divdiscTree', "100%", "100%", 0 );jsdiscTree.setImagePath( "/images/mfg/icons/dhtmlTree/" );jsdiscTree.setStdImages( "icon_leaf.gif", "icon_folderopen.png", "icon_folderclosed.png" );jsdiscTree.enableCheckBoxes( true );jsdiscTree.enableThreeStateCheckboxes( true );jsdiscTree.setOnCheckHandler(defaultHandlerdiscTree);jsdiscTree.enableDragAndDrop( false );jsdiscTree.enableKeyboardNavigation( false );jsdiscTree.setIconSize( 16, 16, null );jsdiscTree.loadXML("/servlet/mfg.ajaxProvider.GetDisciplineProvider;jsessionid=aJpizd43xjE6?time=1221558349349&pmId=1003&progMode=1&ids=7492,");jsdiscTree.setXMLAutoLoading("/servlet/mfg.ajaxProvider.GetDisciplineProvider;jsessionid=aJpizd43xjE6?time=1221558349349&pmId=1003&progMode=1&ids=7492,");};
Answer posted by Support on Sep 17, 2008 02:39
Probably you reload the tree. And it causes clearing states for checkboxes.