Note that there are some explanatory texts on larger screens.

plurals
  1. POGWT RPC and data translating to GXT Grid
    text
    copied!<p>I am trying to translate data from server to client (GXT Grid). On the server side I have a List with data and its ok. Then I implement RPC methods and suppose that its ok too. Here is code:</p> <ol> <li><p>GWTService</p> <pre><code>@RemoteServiceRelativePath("gwtservice") public interface GWTService extends RemoteService { public List&lt;WebasystProductData&gt; getWebasystProductData(); } </code></pre></li> <li><p>GWTServiceAsynch</p> <pre><code>public interface GWTServiceAsync { public void getWebasystProductData(AsyncCallback&lt;List&lt;WebasystProductData&gt;&gt; callback); } </code></pre></li> <li><p>GWTServiceImpl</p> <pre><code>public class GWTServiceImpl extends RemoteServiceServlet implements GWTService { //private Map&lt;String, WebasystProductData&gt; productData; public List&lt;WebasystProductData&gt; getWebasystProductData() { WebasystConnection waConn = new WebasystConnection(); List&lt;WebasystProductData&gt; waPD = waConn.getWebasystProductData(); return waPD; } </code></pre></li> </ol> <p>Then I implement proxy using my beanmodel, beanmodelreader, listloader, listore and grid.</p> <pre><code>... rpc = RpcInit.initRpc(); RpcProxy&lt;BeanModel&gt; proxy = new RpcProxy&lt;BeanModel&gt;() { @Override public void load(Object loadConfig, AsyncCallback callback) { rpc.getWebasystProductData(callback); } }; BeanModelReader reader = new BeanModelReader(); BaseListLoader loader = new BaseListLoader(proxy, reader); ListStore&lt;BeanModel&gt; store = new ListStore&lt;BeanModel&gt;(loader); List&lt;ColumnConfig&gt; col = new ArrayList&lt;ColumnConfig&gt;(); ColumnConfig column = new ColumnConfig(); column.setId("productIdWA"); column.setHeader("ProductID"); column.setWidth(50); col.add(column); column = new ColumnConfig(); column.setId("productNameWA"); column.setHeader("productName"); column.setWidth(120); col.add(column); column = new ColumnConfig(); column.setId("productPriceWA"); column.setHeader("productPrice"); column.setWidth(80); col.add(column); column = new ColumnConfig(); column.setId("categoryIdWA"); column.setHeader("categoryID"); column.setWidth(80); column.setAlignment(HorizontalAlignment.RIGHT); col.add(column); </code></pre> <p>When start my app - no data inside grid. Dont know whats the problem, no errors... Suppose the problem is in client code</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload