package com.smartgwt.sample.client;
import com.smartgwt.client.data.DataSource;
import com.smartgwt.client.data.fields.DataSourceTextField;
public class CountryClientOnlyDS extends DataSource {
	private static CountryClientOnlyDS instance = null;  
	  
    public static CountryClientOnlyDS getInstance() {  
        if (instance == null) {  
            instance = new CountryClientOnlyDS("CountryClientOnlyDS");  
        }  
        return instance;  
    }  
  
    public CountryClientOnlyDS(String id) {  
  
        setID(id);  
        setRecordXPath("/List/branch");  
  
  
        DataSourceTextField idField = new DataSourceTextField("id", "ID");  
        idField.setPrimaryKey(true);  
        idField.setHidden(true); 
        idField.setRequired(true);  
        
        DataSourceTextField displayTextField = new DataSourceTextField("displayText", "displayText");  
        displayTextField.setRequired(true); 
  
        setFields(idField, displayTextField);  
  
        setDataURL("ds/country.data.xml");  
          
        setClientOnly(true);  
  
    }  
}
