/* * Isomorphic SmartGWT web presentation layer * Copyright 2000 and beyond Isomorphic Software, Inc. * * OWNERSHIP NOTICE * Isomorphic Software owns and reserves all rights not expressly granted in this source code, * including all intellectual property rights to the structure, sequence, and format of this code * and to all designs, interfaces, algorithms, schema, protocols, and inventions expressed herein. * * If you have any questions, please email
. * * This entire comment must accompany any portion of Isomorphic Software source code that is * copied or moved from this file. */ package com.smartgwt.sample.showcase.client.dataintegration.java.hibernate.relations; import com.smartgwt.client.data.DataSource; import com.smartgwt.client.types.ListGridEditEvent; import com.smartgwt.client.widgets.Canvas; import com.smartgwt.client.widgets.form.fields.ComboBoxItem; import com.smartgwt.client.widgets.grid.ListGrid; import com.smartgwt.client.widgets.grid.ListGridField; import com.smartgwt.client.widgets.layout.VLayout; import com.google.gwt.core.client.EntryPoint; public class HBIncludeFromDynamic implements EntryPoint { @Override public void onModuleLoad() { final ListGrid listGrid = new ListGrid(); listGrid.setDataSource(DataSource.get("cityIncludeFromHB")); listGrid.setWidth(700); listGrid.setHeight(224); listGrid.setShowFilterEditor(true); listGrid.setAlternateRecordStyles(true); listGrid.setAutoFetchData(true); listGrid.setDataPageSize(50); listGrid.setCanEdit(true); listGrid.setEditEvent(ListGridEditEvent.CLICK); ListGridField countryCodeField = new ListGridField(); countryCodeField.setIncludeFrom("countryIncludeFromHB.countryCode"); listGrid.setFields(new ListGridField("cityName"), new ListGridField("country"), countryCodeField); VLayout layout = new VLayout(15); layout.addMember(listGrid); layout.draw(); } }