Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

SmartClient Treegrid with multiple DB tables

$
0
0
SmartClient: v10.0p_2014-11-23/EVAL Development Only


Hi there,

I am sure this must have been covered many times but I seem unable to locate a basic example to get me going. I have created a simple MySQL DB containing three tables, for arguments sake I'll call them A, B & C.

Each table contains a field called "ID" which is an auto-incrementing sequence.

Each table contains a unique identifier called "GUID" (string representation of a GUID.

Tables B & C contain a pointer to their parent table row called "PARENT_GUID" and each has a relationship created between it and its parent as a one to many foreign key.

A is the overall parent, rows in table B use their "PARENT_GUID" column to point to the parent in table A. Rows in table C use their "PARENT_GUID" column to point to the parent in table B.

I have used the Datasource creator to create a DS, set the auto-discover schema option to true, set loadondemand to false.

However, when I load my simple jsp, the treegrid renders with the parent folders, (the only two rows in table A) ... but when I double click a folder, the expansion simply shows the same folders at the next level down. If I use the dev console I can see the SQL reselecting the same rows for each expansion.

I must be missing the point and am happy to admit it but I cannot see what I'm overlooking.

Any examples / advice would be very much appreciated.

Cheers
Andrew

Viewing all articles
Browse latest Browse all 4756

Trending Articles