SmartGWT 3.0
GWT 2.4
Firefox 6.0
I followed the Dynamic Include example but I seem to be missing something. Any help would be appreciated. Below is an example of my scenario.
Here are my datasources....
manifest.ds.xml
Here is my Employees.ds.xml file....
And finally the message that I am getting is the following:
=== 2011-12-21 13:09:02,443 [80-7] WARN DSRequest - In outputs, definition 'Pas
sportNumber' refers to a related DataSource ('Employees') that is not related to
this dataSource ('Manifest'). You can only specify fields in related DataSource
s where a foreignKey property establishes the relation from this dataSource ('Ma
nifest') to the related DataSource. Ignoring this outputs entry.
=== 2011-12-21 13:09:02,446 [80-7] WARN DSRequest - In outputs, definition 'Pas
sportExpiration' refers to a related DataSource ('Employees') that is not relate
d to this dataSource ('Manifest'). You can only specify fields in related DataSo
urces where a foreignKey property establishes the relation from this dataSource
('Manifest') to the related DataSource. Ignoring this outputs entry.
I thought that I had already related the datasources by having the field "EmployeeId" in Manifest.ds.xml show have the foreignKey attribute pointing to "employees.EmployeeId".
What am I missing?
GWT 2.4
Firefox 6.0
I followed the Dynamic Include example but I seem to be missing something. Any help would be appreciated. Below is an example of my scenario.
Code:
final ListGrid manifestDetails = new ListGrid(); manifestDetails.setDataSource(manifestDS); manifestDetails.setWidth100(); manifestDetails.setMargin(25); manifestDetails.setCanEdit(false); manifestDetails.setAlternateRecordStyles(true); manifestDetails.setAutoFetchData(true); ListGridField country = new ListGridField(); country.setAttribute("includeFrom", "Employees.CountryOfCitizenship"); country.setAlign(Alignment.CENTER); country.setWrap(true); ListGridField passNum = new ListGridField(); passNum.setAttribute("includeFrom", "Employees.PassportNumber"); passNum.setAlign(Alignment.CENTER); passNum.setWrap(true); ListGridField passExp = new ListGridField(); passExp.setAttribute("includeFrom", "Employees.PassportExpiration"); passExp.setAlign(Alignment.CENTER); passExp.setWrap(true); manifestDetails.setFields(country, passNum, passExp);
manifest.ds.xml
Code:
<DataSource ID="Manifest" dbName="manifest" serverType="sql" tableName="manifest"> <fields> <field name="ManifestId" type="sequence" primaryKey="true" hidden="true" /> <field name="EmployeeId" type="integer" hidden="true" foreignKey="employees.EmployeeId" /> <field name="ProjectId" type="integer" hidden="true" foreignKey="projects.ProjectId" /> <field name="EmployeeName" title="Name" type="text"/> <field name="Position" title="Position" type="text" /> <field name="DateOfBirth" title="DOB" type="date" /> <field name="EmbarkDate" title="Embark Date" type="date" /> <field name="DisembarkDate" title="Disembark Date" type="date" /> <field name="CompanyId" title="Company Id" type="sequence" foeignKey="companies.CompanyId" /> </fields>
Here is my Employees.ds.xml file....
Code:
<DataSource ID="Employees" dbName="manifest" serverType="sql" tableName="employees"> <fields> <field name="EmployeeId" type="sequence" primaryKey="true" hidden="true" /> <field name="PrimaryEmail" title="Contact Email" type="text" length="100" /> <field name="PassportNumber" title="Passport #" type="text" length="64" /> <field name="PassportExpiration" title="Passport Expiration (MM/DD/YYYY)" type="date" /> <field name="SubContractorName" title="Subcontractor Company Name" type="text" length="64" /> <field name="CountryOfCitizenship" title="Country of Citizenship" type="text" foreignKey="countries.iso" /> <field name="CompanyId" title="Company" type="integer" foreignKey="companies.CompanyId" /> </fields>
=== 2011-12-21 13:09:02,443 [80-7] WARN DSRequest - In outputs, definition 'Pas
sportNumber' refers to a related DataSource ('Employees') that is not related to
this dataSource ('Manifest'). You can only specify fields in related DataSource
s where a foreignKey property establishes the relation from this dataSource ('Ma
nifest') to the related DataSource. Ignoring this outputs entry.
=== 2011-12-21 13:09:02,446 [80-7] WARN DSRequest - In outputs, definition 'Pas
sportExpiration' refers to a related DataSource ('Employees') that is not relate
d to this dataSource ('Manifest'). You can only specify fields in related DataSo
urces where a foreignKey property establishes the relation from this dataSource
('Manifest') to the related DataSource. Ignoring this outputs entry.
I thought that I had already related the datasources by having the field "EmployeeId" in Manifest.ds.xml show have the foreignKey attribute pointing to "employees.EmployeeId".
What am I missing?
Comment