I'm using
Isomorphic SmartClient/SmartGWT Framework (v9.0p_2013-09-17/Pro Deployment 2013-09-17)
I'm running this from within Eclipse and using Firefox 20.0 on a linux desktop.
I'm trying to get the balsamiq UI import to work but before that happens I wanted to verify that I can get the ComponentXML to work... and I can't. I have read tons of info pages and I even copied code straight from the samples and they do not work for me. So here is what I have and have done...
After trying my own and failing, I grabbed a ui.xml from the samples... I'm using addingHandler.ui.xml
and I'm loading it with essentially the code that I found in the showcase sample in AddingHandlers.java. I started with the full code from that method and have now just narrowed it down to a null check. And it's always null.
I *am* getting the json representation of the ui.xml in the console, so I know something is working:
Can anyone see what I'm doing wrong and why I can't load a screen properly?
Thanks,
Brian
Isomorphic SmartClient/SmartGWT Framework (v9.0p_2013-09-17/Pro Deployment 2013-09-17)
I'm running this from within Eclipse and using Firefox 20.0 on a linux desktop.
I'm trying to get the balsamiq UI import to work but before that happens I wanted to verify that I can get the ComponentXML to work... and I can't. I have read tons of info pages and I even copied code straight from the samples and they do not work for me. So here is what I have and have done...
After trying my own and failing, I grabbed a ui.xml from the samples... I'm using addingHandler.ui.xml
Code:
<VLayout xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" ID="componentsLayout" autoDraw="false"> <members> <DynamicForm ID="saveForm" dataSource="supplyItem" autoDraw="false" width="300" titleWidth="100"> <items> <item name="headerItem" type="header" defaultValue="Enter new Stock Item" /> <item name="itemName" type="text" title="Item Name" /> <item name="unitCost" type="number" title="Price" /> <item name="inStock" type="boolean" title="In stock"> <defaultValue xsi:type="xsd:boolean">false</defaultValue> </item> <item name="nextShipment" type="date" useTextField="true" title="Stock Date" /> </items> </DynamicForm> <Button ID="saveButton" title="Save" autoDraw="false" /> </members> </VLayout>
Code:
public Canvas getViewPanel() { final Canvas layout = new Canvas(); RPCManager.loadScreen("addingHandlers", new LoadScreenCallback() { @Override public void execute() { Canvas theScreen = this.getScreen(); if (theScreen == null) { //crud - it's null Window.alert("the screen was null"); } else { Window.alert("the screen was NOT null"); } } }); layout.addChild(new HTML("placeholder")); return layout; }
Code:
=== 2013-09-25 15:45:55,868 [l0-5] DEBUG ScreenLoaderServlet - screenLoader - Generated response:{ VLayout:{ ID:"componentsLayout", autoDraw:"false", xsi:"http://www.w3.org/1999/XMLSchema-instance", members:{ DynamicForm:{ ID:"saveForm", autoDraw:"false", dataSource:"supplyItem", titleWidth:"100", width:"300", items:{ item:[ { defaultValue:"Enter new Stock Item", name:"headerItem", type:"header" }, { name:"itemName", title:"Item Name", type:"text" }, { name:"unitCost", title:"Price", type:"number" }, { name:"inStock", title:"In stock", type:"boolean", defaultValue:{ type:"xsd:boolean", "#text":"false" } }, { name:"nextShipment", title:"Stock Date", type:"date", useTextField:"true" } ] } }, Button:{ ID:"saveButton", autoDraw:"false", title:"Save" } } } }
Thanks,
Brian
Comment