Hello there,
I am using SmartClient Version: v10.0p_2015-07-08/PowerEdition Deployment (built 2015-07-08) with FF26.
I am trying to populate a Treegrid with data from two datasource which have FK relationship. But for some reason I am not able to display the tree. I have also attached the screenshot of the parent-child.
cheers
Zolf
Below is my Server logs
=== 2015-07-21 13:45:14,596 [2-24] DEBUG ISCKeyedObjectPool - Borrowing object for 'distributorProductDS'
=== 2015-07-21 13:45:14,596 [2-24] DEBUG PoolableDataSourceFactory - Activated DataSource 61 of type 'distributorProductDS'
=== 2015-07-21 13:45:14,596 [2-24] DEBUG DSRequest - Caching instance 61 of DS 'distributorProductDS' from DSRequest.getDataSource()
=== 2015-07-21 13:45:14,596 [2-24] DEBUG DSRequest - Caching instance 61 of DS distributorProductDS
=== 2015-07-21 13:45:14,597 [2-24] DEBUG RPCManager - Request #1 (DSRequest) payload: {
criteria:{
mfk:1
},
operationConfig:{
dataSource:"distributorProductDS",
repo:null,
operationType:"fetch",
textMatchStyle:"exact"
},
componentId:"isc_DistributorTreeGrid_0",
appID:"builtinApplication",
operation:"distributorProductDS_fetch",
oldValues:{
mfk:1
},
progressiveLoading:false,
resultTreeIdField:"id",
resultTreeParentIdField:"mfk"
}
=== 2015-07-21 13:45:14,597 [2-24] INFO IDACall - Performing 1 operation(s)
=== 2015-07-21 13:45:14,597 [2-24] DEBUG ISCKeyedObjectPool - Borrowing object for 'distributorDS'
=== 2015-07-21 13:45:14,597 [2-24] DEBUG PoolableDataSourceFactory - Activated DataSource 21 of type 'distributorDS'
=== 2015-07-21 13:45:14,597 [2-24] DEBUG Relation - Caching instance of toDS 'distributorDS' in the DSRequest map
=== 2015-07-21 13:45:14,597 [2-24] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
=== 2015-07-21 13:45:14,597 [2-24] DEBUG DeclarativeSecurity - DataSource distributorProductDS is not in the pre-checked list, processing...
=== 2015-07-21 13:45:14,597 [2-24] DEBUG DeclarativeSecurity - Processing security checks for DataSource distributorDS, field id
=== 2015-07-21 13:45:14,597 [2-24] DEBUG DeclarativeSecurity - DataSource distributorDS is not in the pre-checked list, processing...
=== 2015-07-21 13:45:14,598 [2-24] DEBUG DeclarativeSecurity - Processing security checks for DataSource distributorDS, field name
=== 2015-07-21 13:45:14,598 [2-24] DEBUG DeclarativeSecurity - DataSource distributorDS is not in the pre-checked list, processing...
=== 2015-07-21 13:45:14,598 [2-24] DEBUG AppBase - [builtinApplication.distributorProductDS_fetch] No userTypes defined, allowing anyone access to all operations for this application
=== 2015-07-21 13:45:14,598 [2-24] DEBUG AppBase - [builtinApplication.distributorProductDS_fetch] No public zero-argument method named '_distributorProductDS_fetch' found, performing generic datasour
ce operation
=== 2015-07-21 13:45:14,598 [2-24] INFO SQLDataSource - [builtinApplication.distributorProductDS_fetch] Performing fetch operation with
criteria: {mfk:1} values: {mfk:1}
=== 2015-07-21 13:45:14,600 [2-24] INFO SQLDataSource - [builtinApplication.distributorProductDS_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause$defaultAnsiJoinClause WHERE
$defaultWhereClause
=== 2015-07-21 13:45:14,600 [2-24] INFO SQLDataSource - [builtinApplication.distributorProductDS_fetch] 61: Executing SQL query on 'SQLServer': SELECT expd.id, expd.name, expd.mfk, dtor.name AS didi
FROM expd LEFT OUTER JOIN dtor ON expd.mfk = dtor.id WHERE (expd.mfk=1)
=== 2015-07-21 13:45:14,600 [2-24] DEBUG SQLConnectionManager - [builtinApplication.distributorProductDS_fetch] Borrowed connection '20627506'
=== 2015-07-21 13:45:14,600 [2-24] DEBUG SQLDriver - [builtinApplication.distributorProductDS_fetch] About to execute SQL query in 'SQLServer' using connection '20627506'
=== 2015-07-21 13:45:14,600 [2-24] INFO SQLDriver - [builtinApplication.distributorProductDS_fetch] Executing SQL query on 'SQLServer': SELECT expd.id, expd.name, expd.mfk, dtor.name AS didi FROM exp
d LEFT OUTER JOIN dtor ON expd.mfk = dtor.id WHERE (expd.mfk=1)
=== 2015-07-21 13:45:14,602 [2-27] DEBUG XML - Parsed XML from (in memory stream): 18ms
=== 2015-07-21 13:45:14,602 [2-27] DEBUG ISCKeyedObjectPool - Borrowing object for 'transaction'
=== 2015-07-21 13:45:14,602 [2-27] DEBUG PoolableDataSourceFactory - Created DataSource null of type 'transaction' in the pooling flow
=== 2015-07-21 13:45:14,602 [2-27] DEBUG ISCKeyedObjectPool - Borrowing object for 'Object'
=== 2015-07-21 13:45:14,603 [2-27] DEBUG PoolableDataSourceFactory - Created DataSource 78 of type 'Object' and assigned it to thread qtp31122332-27
=== 2015-07-21 13:45:14,603 [2-27] DEBUG PoolableDataSourceFactory - Created DataSource 78 of type 'Object' in the pooling flow
=== 2015-07-21 13:45:14,603 [2-27] DEBUG PoolableDataSourceFactory - Activated DataSource 78 of type 'Object'
=== 2015-07-21 13:45:14,603 [2-27] DEBUG ISCKeyedObjectPool - Borrowing object for 'List'
=== 2015-07-21 13:45:14,603 [2-27] DEBUG PoolableDataSourceFactory - Created DataSource 79 of type 'List' and assigned it to thread qtp31122332-27
=== 2015-07-21 13:45:14,603 [2-27] DEBUG PoolableDataSourceFactory - Created DataSource 79 of type 'List' in the pooling flow
=== 2015-07-21 13:45:14,603 [2-27] DEBUG PoolableDataSourceFactory - Activated DataSource 79 of type 'List'
=== 2015-07-21 13:45:14,603 [2-27] DEBUG ISCKeyedObjectPool - Borrowing object for 'elem'
=== 2015-07-21 13:45:14,603 [2-27] DEBUG PoolableDataSourceFactory - Created DataSource null of type 'elem' in the pooling flow
=== 2015-07-21 13:45:14,603 [2-27] DEBUG RPCManager - Processing 1 requests.
I am using SmartClient Version: v10.0p_2015-07-08/PowerEdition Deployment (built 2015-07-08) with FF26.
I am trying to populate a Treegrid with data from two datasource which have FK relationship. But for some reason I am not able to display the tree. I have also attached the screenshot of the parent-child.
cheers
Zolf
Code:
DataSource ds = DataSource.get("distributorProductDS"); Tree distributorTree = new Tree(); distributorTree.setModelType(TreeModelType.PARENT); distributorTree.setRootValue(1); distributorTree.setNameProperty("name"); distributorTree.setIdField("id"); distributorTree.setParentIdField("mfk"); distributorTree.setShowRoot(true); //employeeTree1.setOpenProperty("isOpen"); final DistributorTreeGrid treeGrid = new DistributorTreeGrid(); treeGrid.setDragDataAction(DragDataAction.MOVE); treeGrid.setDataProperties(distributorTree); treeGrid.setDataSource(ds); treeGrid.setAlwaysShowOpener(false); treeGrid.addDrawHandler(new DrawHandler() { public void onDraw(DrawEvent event) { treeGrid.fetchData(); } });
Code:
<DataSource ID="distributorProductDS" serverType="sql" tableName="expd"> <fields> <field name="id" type="sequence" hidden="true" primaryKey="true" /> <field name="name" title="Product Name" type="ntext" /> <field name="mfk" title="ecid" foreignKey="distributorDS.id" type="integer" joinType="outer" displayField = "didi" required="true"/> <field name="didi" includeFrom="distributorDS.name" hidden="true" /> </fields> </DataSource>
Code:
public class DistributorTreeGrid extends TreeGrid { public DistributorTreeGrid() { setWidth(300); setHeight100(); setShowEdges(true); setBorder("0px"); setBodyStyleName("normal"); setShowHeader(false); setLeaveScrollbarGap(false); setEmptyMessage("<br>Drag & drop parts here"); setManyItemsImage("cubes_all.png"); setAppImgDir("pieces/16/"); setCanReorderRecords(true); setCanAcceptDroppedRecords(true); setCanDragRecordsOut(true); } }
=== 2015-07-21 13:45:14,596 [2-24] DEBUG ISCKeyedObjectPool - Borrowing object for 'distributorProductDS'
=== 2015-07-21 13:45:14,596 [2-24] DEBUG PoolableDataSourceFactory - Activated DataSource 61 of type 'distributorProductDS'
=== 2015-07-21 13:45:14,596 [2-24] DEBUG DSRequest - Caching instance 61 of DS 'distributorProductDS' from DSRequest.getDataSource()
=== 2015-07-21 13:45:14,596 [2-24] DEBUG DSRequest - Caching instance 61 of DS distributorProductDS
=== 2015-07-21 13:45:14,597 [2-24] DEBUG RPCManager - Request #1 (DSRequest) payload: {
criteria:{
mfk:1
},
operationConfig:{
dataSource:"distributorProductDS",
repo:null,
operationType:"fetch",
textMatchStyle:"exact"
},
componentId:"isc_DistributorTreeGrid_0",
appID:"builtinApplication",
operation:"distributorProductDS_fetch",
oldValues:{
mfk:1
},
progressiveLoading:false,
resultTreeIdField:"id",
resultTreeParentIdField:"mfk"
}
=== 2015-07-21 13:45:14,597 [2-24] INFO IDACall - Performing 1 operation(s)
=== 2015-07-21 13:45:14,597 [2-24] DEBUG ISCKeyedObjectPool - Borrowing object for 'distributorDS'
=== 2015-07-21 13:45:14,597 [2-24] DEBUG PoolableDataSourceFactory - Activated DataSource 21 of type 'distributorDS'
=== 2015-07-21 13:45:14,597 [2-24] DEBUG Relation - Caching instance of toDS 'distributorDS' in the DSRequest map
=== 2015-07-21 13:45:14,597 [2-24] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
=== 2015-07-21 13:45:14,597 [2-24] DEBUG DeclarativeSecurity - DataSource distributorProductDS is not in the pre-checked list, processing...
=== 2015-07-21 13:45:14,597 [2-24] DEBUG DeclarativeSecurity - Processing security checks for DataSource distributorDS, field id
=== 2015-07-21 13:45:14,597 [2-24] DEBUG DeclarativeSecurity - DataSource distributorDS is not in the pre-checked list, processing...
=== 2015-07-21 13:45:14,598 [2-24] DEBUG DeclarativeSecurity - Processing security checks for DataSource distributorDS, field name
=== 2015-07-21 13:45:14,598 [2-24] DEBUG DeclarativeSecurity - DataSource distributorDS is not in the pre-checked list, processing...
=== 2015-07-21 13:45:14,598 [2-24] DEBUG AppBase - [builtinApplication.distributorProductDS_fetch] No userTypes defined, allowing anyone access to all operations for this application
=== 2015-07-21 13:45:14,598 [2-24] DEBUG AppBase - [builtinApplication.distributorProductDS_fetch] No public zero-argument method named '_distributorProductDS_fetch' found, performing generic datasour
ce operation
=== 2015-07-21 13:45:14,598 [2-24] INFO SQLDataSource - [builtinApplication.distributorProductDS_fetch] Performing fetch operation with
criteria: {mfk:1} values: {mfk:1}
=== 2015-07-21 13:45:14,600 [2-24] INFO SQLDataSource - [builtinApplication.distributorProductDS_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause$defaultAnsiJoinClause WHERE
$defaultWhereClause
=== 2015-07-21 13:45:14,600 [2-24] INFO SQLDataSource - [builtinApplication.distributorProductDS_fetch] 61: Executing SQL query on 'SQLServer': SELECT expd.id, expd.name, expd.mfk, dtor.name AS didi
FROM expd LEFT OUTER JOIN dtor ON expd.mfk = dtor.id WHERE (expd.mfk=1)
=== 2015-07-21 13:45:14,600 [2-24] DEBUG SQLConnectionManager - [builtinApplication.distributorProductDS_fetch] Borrowed connection '20627506'
=== 2015-07-21 13:45:14,600 [2-24] DEBUG SQLDriver - [builtinApplication.distributorProductDS_fetch] About to execute SQL query in 'SQLServer' using connection '20627506'
=== 2015-07-21 13:45:14,600 [2-24] INFO SQLDriver - [builtinApplication.distributorProductDS_fetch] Executing SQL query on 'SQLServer': SELECT expd.id, expd.name, expd.mfk, dtor.name AS didi FROM exp
d LEFT OUTER JOIN dtor ON expd.mfk = dtor.id WHERE (expd.mfk=1)
=== 2015-07-21 13:45:14,602 [2-27] DEBUG XML - Parsed XML from (in memory stream): 18ms
=== 2015-07-21 13:45:14,602 [2-27] DEBUG ISCKeyedObjectPool - Borrowing object for 'transaction'
=== 2015-07-21 13:45:14,602 [2-27] DEBUG PoolableDataSourceFactory - Created DataSource null of type 'transaction' in the pooling flow
=== 2015-07-21 13:45:14,602 [2-27] DEBUG ISCKeyedObjectPool - Borrowing object for 'Object'
=== 2015-07-21 13:45:14,603 [2-27] DEBUG PoolableDataSourceFactory - Created DataSource 78 of type 'Object' and assigned it to thread qtp31122332-27
=== 2015-07-21 13:45:14,603 [2-27] DEBUG PoolableDataSourceFactory - Created DataSource 78 of type 'Object' in the pooling flow
=== 2015-07-21 13:45:14,603 [2-27] DEBUG PoolableDataSourceFactory - Activated DataSource 78 of type 'Object'
=== 2015-07-21 13:45:14,603 [2-27] DEBUG ISCKeyedObjectPool - Borrowing object for 'List'
=== 2015-07-21 13:45:14,603 [2-27] DEBUG PoolableDataSourceFactory - Created DataSource 79 of type 'List' and assigned it to thread qtp31122332-27
=== 2015-07-21 13:45:14,603 [2-27] DEBUG PoolableDataSourceFactory - Created DataSource 79 of type 'List' in the pooling flow
=== 2015-07-21 13:45:14,603 [2-27] DEBUG PoolableDataSourceFactory - Activated DataSource 79 of type 'List'
=== 2015-07-21 13:45:14,603 [2-27] DEBUG ISCKeyedObjectPool - Borrowing object for 'elem'
=== 2015-07-21 13:45:14,603 [2-27] DEBUG PoolableDataSourceFactory - Created DataSource null of type 'elem' in the pooling flow
=== 2015-07-21 13:45:14,603 [2-27] DEBUG RPCManager - Processing 1 requests.
Comment