" }",
"}");
}
public void test_addField_pseudo() throws Exception {
CanvasInfo canvas =
parseJavaInfo(new String[]{
"public class Test implements EntryPoint {",
" public void onModuleLoad() {",
" Canvas canvas = new Canvas();",
" DataSource dataSource = new DataSource();",
" FilterBuilder filterBuilder = new FilterBuilder();",
" filterBuilder.setDataSource(dataSource);",
" canvas.addChild(filterBuilder);",
" Calendar calendar = new Calendar();",
" calendar.setDataSource(dataSource);",
" canvas.addChild(calendar);",
" canvas.draw();",
" }",
"}"});
canvas.refresh();
//
DataSourceInfo dataSource =
NonVisualBeanContainerInfo.get(canvas).getChildren(DataSourceInfo.class).get(0);
assertThat(canvas.getChildren(FilterBuilderInfo.class).size()).isEqualTo(1);
assertThat(canvas.getChildren(CalendarInfo.class).size()).isEqualTo(1);
// create new DataSourceField
DataSourceFieldInfo dataSourceField =
createJavaInfo("com.smartgwt.client.data.fields.DataSourceBooleanField");
{
FlowContainer flowContainer = new FlowContainerFactory(dataSource, false).get().get(0);