package test.client;

import com.smartgwt.client.data.DataSource;   
import com.smartgwt.client.data.fields.*;   
import com.smartgwt.client.widgets.form.validator.FloatPrecisionValidator;   
import com.smartgwt.client.widgets.form.validator.FloatRangeValidator;   
  
public class TestDS extends DataSource {   
  
    private static TestDS instance = null;   
  
    public static TestDS getInstance() {   
        if (instance == null) {   
            instance = new TestDS("testDS");   
        }   
        return instance;   
    }   
  
    public TestDS(String id) {   
  
        setID(id);   
        setRecordXPath("/List/testItem"); 
        
        DataSourceTextField pkField = new DataSourceTextField("text");   
        pkField.setPrimaryKey(true);   
  
        DataSourceTextField commentField = new DataSourceTextField("comment");   
  
        setFields(pkField, commentField);   
  
        setDataURL("data/testData.xml");   
        setClientOnly(true);           
    }   
}  
