/* * 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.form; import com.smartgwt.client.data.DataSource; import com.smartgwt.client.widgets.Canvas; import com.smartgwt.client.widgets.form.DynamicForm; import com.smartgwt.client.widgets.form.fields.ButtonItem; import com.smartgwt.client.widgets.form.fields.ComboBoxItem; import com.smartgwt.client.widgets.form.fields.HeaderItem; import com.smartgwt.client.widgets.form.fields.IntegerItem; import com.smartgwt.client.widgets.form.fields.TextAreaItem; import com.google.gwt.core.client.EntryPoint; public class InlineScriptValidationSample implements EntryPoint { @Override public void onModuleLoad() { final DynamicForm form = new DynamicForm(); DataSource dataSource = DataSource.get("inlineScript_orderForm"); form.setDataSource(dataSource); HeaderItem header = new HeaderItem("header"); header.setDefaultValue("Add an item to your Order"); ComboBoxItem item = new ComboBoxItem("itemId", "Item"); item.setOptionDataSource(DataSource.get("StockItem")); item.setValueField("id"); item.setDisplayField("description"); IntegerItem quantity = new IntegerItem("quantity"); quantity.setValidateOnExit(true); TextAreaItem instructions = new TextAreaItem("instructions"); ButtonItem submit = new ButtonItem("submit", "Submit Order"); form.setFields(header, item, quantity, instructions, submit); form.draw(); } }