Be sure your post includes:
1. 3.0 Power nightly build.
I have a TreeGrid view that is bound to a backend SQL database table.
I set the TreeGrid view's properties, including setOpenProperty("isOpen"):
My datasource definition file bound to the tree:
However, whenever I load my app or refresh the page or call _tree.fetchData, all the folders show up collapsed/closed.
For example, here is some sample data in the DB table:
As one can see, tree folder with id #1 is 'open', but when the UI is drawn this folder is shown closed. Also, if folders within the tree view are opened/closed, this state is not saved back to the DB table although the openProperty has been set.
Can anyone verify this actually works? Am I missing a step? All the other set***Properties seem to bind to the datasource correctly.
Thanks!
1. 3.0 Power nightly build.
I have a TreeGrid view that is bound to a backend SQL database table.
I set the TreeGrid view's properties, including setOpenProperty("isOpen"):
Code:
_treeProperties = new Tree(); _treeProperties.setNameProperty("name"); _treeProperties.setIdField("id"); _treeProperties.setParentIdField("parentId"); _treeProperties.setIsFolderProperty("isFolder"); _treeProperties.setOpenProperty("isOpen"); _treeProperties.setTitleProperty("title"); _tree = new TreeGrid(); _tree.setDataProperties(_treeProperties);
Code:
<DataSource ID="categoryDevice" serverType="hibernate" titleField="Categories" beanClassName="com.bpt.db.model.CategoryDevice" dropExtraFields="true"> <fields> <field name="id" type="sequence" hidden="true" primaryKey="true" /> <field name="title" type="text" title="Categories" /> <field name="name" type="text" title="Categories" valueXPath="device/hostName" /> <field name="deviceId" type="integer" hidden="true" valueXPath="device/id" /> <field name="userId" type="integer" hidden="true" /> <field name="parentId" type="text" hidden="true" /> <field name="isFolder" type="boolean" hidden="true" valueXPath="category"/> <field name="isOpen" type="boolean" hidden="true" valueXPath="open" /> <field name="isLocked" type="boolean" hidden="true" valueXPath="locked" /> </fields> </DataSource>
For example, here is some sample data in the DB table:
Code:
id category locked open parentId title type userId device_id 1 1 1 1 NULL Provider Edge (PE) 0 1 NULL 2 1 1 1 NULL Route Reflector (RR) 1 1 NULL 16 0 0 0 1 NULL 2 1 5
Can anyone verify this actually works? Am I missing a step? All the other set***Properties seem to bind to the datasource correctly.
Thanks!
Comment