working on smartEE eval + eclipse + google app engine
1. The line with the error is
countryDS.addField( field );
I didn't start to use DataSource (got the error before DataSource is added to VStack ???)
code bellow is updated from gae-CloudSQL which I managed to make it work at - http://adaptcloud.appspot.com/
final VStack vStack = new VStack();
final DataSource countryDS = DataSource.get( master_data_source);//"country_DataSource"
final DataSource cityDS = DataSource.get( details_data_source);//"city_DataSource"
if( countryDS != null){
//DataSourceField(String name, FieldType type, String title, int length, boolean required)
DataSourceField field = new DataSourceField( "counties", FieldType.TEXT, "Counties", 30, true);
countryDS.addField( field );
String[] fields = countryDS.getFieldNames();
Window.alert( "Country fields = " + fields);
}
2. P.S. now I am tring hard to make it dynamic with "extends DataSourceLoader" and load with DataSource.fromXML but the order of operations kills me - I am always too late and the system rejects me - so I switch to 1.
The only time when fromXML() is early and accepted is the call from inside initial html of app engine = GAECloud.html
3. I will probably switch to open source to understand the process and than come back to smartEE eval
1. The line with the error is
countryDS.addField( field );
I didn't start to use DataSource (got the error before DataSource is added to VStack ???)
code bellow is updated from gae-CloudSQL which I managed to make it work at - http://adaptcloud.appspot.com/
final VStack vStack = new VStack();
final DataSource countryDS = DataSource.get( master_data_source);//"country_DataSource"
final DataSource cityDS = DataSource.get( details_data_source);//"city_DataSource"
if( countryDS != null){
//DataSourceField(String name, FieldType type, String title, int length, boolean required)
DataSourceField field = new DataSourceField( "counties", FieldType.TEXT, "Counties", 30, true);
countryDS.addField( field );
String[] fields = countryDS.getFieldNames();
Window.alert( "Country fields = " + fields);
}
2. P.S. now I am tring hard to make it dynamic with "extends DataSourceLoader" and load with DataSource.fromXML but the order of operations kills me - I am always too late and the system rejects me - so I switch to 1.
The only time when fromXML() is early and accepted is the call from inside initial html of app engine = GAECloud.html
3. I will probably switch to open source to understand the process and than come back to smartEE eval
Comment