XMLTools.loadXMLSchema("IED.xsd", new XSDLoadCallback() { @Override public void execute(SchemaSet schemaSet) { } }); DynamicForm testForm = new DynamicForm(); testForm.setNumCols(4); final TextItem testTextItem = new TextItem("testText", "Test text:"); testTextItem.setWidth(240); testTextItem.setValue("EquipmentId"); ButtonItem testButtonItem = new ButtonItem("defTypeItem", "Define SimpleType"); testButtonItem.setStartRow(false); final TextAreaItem testTextArea = new TextAreaItem(); testTextArea.setShowTitle(false); testTextArea.setWidth("100%"); testTextArea.setHeight(120); testTextArea.setColSpan(4); testForm.setFields(testTextItem, testButtonItem, testTextArea); testButtonItem.addClickHandler(new com.smartgwt.client.widgets.form.fields.events.ClickHandler() { @Override public void onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent event) { try { String typeName = testTextItem.getValueAsString(); SimpleType st = SimpleType.getType(typeName); if (st == null) { SC.say("Not found: " + typeName); } else { testTextArea.setValue("SimpleType name=" + st.getName()); } } catch (Exception e) { StringBuilder sb = new StringBuilder(); sb.append("Exception " + e.getMessage()); sb.append("\n"); for (StackTraceElement el : e.getStackTrace()) { sb.append(el.toString()); sb.append("\n"); } testTextArea.setValue(sb.toString()); } } }); vStack.addMember(testForm);