Simplistic Setup:
D1.ds.xml is a datasource for BO1 and D2.ds.xml is a datasource for BO2:-
and
I would like to set up D1 so that BO2's can be selected from a dropdown.
The objective is to assign a BO2 to BO1.item by selecting it from a drop down. This doesn't seem to work. I thought perhaps there's a special way of using valueField to point to all of selected BO2 record instead of a field within it.
In other words, it there a way that SmartGWT can auto populate BO1.item with selected BO2 on the serverside automatically. If not, is there a better way.
Thanks.
D1.ds.xml is a datasource for BO1 and D2.ds.xml is a datasource for BO2:-
Code:
class test.BO1 { long id; String name; BO2 item; }
Code:
<DataSource ID="D1" serverType="generic"> <fields> <field name="primaryKey" type="id" hidden="true" primaryKey="true" /> <field name="item" type="D2" javaClass="test.BO2" displayField="name" editorType="select" optionDataSource="D2"/> </fields> <serverObject lookupStyle="new" className="test.server.BO1DMI" /> </DataSource>
Code:
class test.BO2 { long id; String name; }
Code:
<DataSource ID="D2" serverType="generic"> <fields> <field name="primaryKey" type="id" hidden="true" primaryKey="true" /> <field name="name" type="text"/> </fields> <serverObject lookupStyle="new" className="test.server.BO2DMI" /> </DataSource>
The objective is to assign a BO2 to BO1.item by selecting it from a drop down. This doesn't seem to work. I thought perhaps there's a special way of using valueField to point to all of selected BO2 record instead of a field within it.
In other words, it there a way that SmartGWT can auto populate BO1.item with selected BO2 on the serverside automatically. If not, is there a better way.
Thanks.
Comment