Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Using DataSource xml definition

$
0
0
Hi I've been experimenting with SmartGWTEE's ComponentXML -> AddingHandlers example and have been trying to load a DataSource with test data.

Modifications to EntryPoint:
Code:

import java.util.logging.Logger;

import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.data.DataSource;

public class AddingHandlers implements EntryPoint {
        private final Logger log = Logger.getLogger("AddingHandlers");

        @Override
        public void onModuleLoad() {

                String dsID = "supplyItem";
                DataSource.load(dsID, null, false);
                if (DataSource.get(dsID) == null) {
                        log.info("DataSource with ID: " + dsID + " not found");
                }
        }
}

Modifications to supplyItem.data.xml
Code:

<DataSource
    ID="supplyItem"
    dataURL="/ds/supplyItem.data.xml"
    recordXPath="//supplyItem"
    clientOnly="true"
>
...other stuff is the same

The DataSourceLoader responds with JavaScript definition of the DataSource, but I get:
"DataSource with ID: supplyItem not found".

Am I just using these API's incorrectly?
Can a DataSource XML definition work without a 'serverType'?

In the source code of the EE Showcase the supplyItem seems to be bound to a hibernate back end. I was hoping to get around copying the server code from the showcase and working with XML data for prototyping purposes.

SmartClient: v9.0p_2014-03-04/EVAL Deployment
GWT: 2.5.1

Viewing all articles
Browse latest Browse all 4756

Trending Articles