Here are my DataSources:
Main DataSource
Additional DataSource
Relation
Tell me please what is the best way to edit many-to-many DataSources? I want something like - when I select row in ListGrid with main datasource entries, I see TreeGrid with additional datasource entries with pre-selected entries according to "ca_template_requirement" relation.
Main DataSource
Code:
<DataSource schema="ca" dbName="CA" tableName="ca_template" ID="ca_template" dataSourceVersion="1" serverType="sql" > <fields> <field implicitSequence="true" primaryKey="true" name="id" type="sequence" hidden="true" sequenceName="ca_template_id_seq" /> <field name="scaption" length="255" type="text" title="Template" required="true" /> <field name="sdescription" length="2000" type="text" title="Description" required="true" /> </fields> </DataSource>
Code:
<DataSource schema="ca" dbName="CA" tableName="ca_requirement" ID="ca_requirement" dataSourceVersion="1" serverType="sql" > <fields> <field implicitSequence="true" primaryKey="true" name="id" type="sequence" hidden="true" sequenceName="ca_requirement_id_seq" /> <field name="code" length="255" type="text" title="Code" required="true" /> <field name="scaption" length="255" type="text" title="Requirement" required="true" /> <field name="sdescription" length="2000" type="text" title="Description" required="true" /> <field name="requirement_id" type="integer" title="Parent requirement" required="false" foreignKey="ca_requirement.id" /> <field name="standard_id" type="integer" title="Standard" required="true" foreignKey="ca_standard.id" /> </fields> </DataSource>
Code:
<DataSource schema="ca" dbName="CA" tableName="ca_template_requirement" ID="ca_template_requirement" dataSourceVersion="1" serverType="sql" > <fields> <field implicitSequence="true" primaryKey="true" name="id" type="sequence" hidden="true" sequenceName="ca_template_requirement_id_seq" /> <field name="template_id" type="integer" title="Template" required="true" foreignKey="ca_template.id" /> <field name="requirement_id" type="integer" title="Requirement" required="true" foreignKey="ca_requirement.id" /> </fields> </DataSource>
Comment