Hi,
I am trying to assign a cell value to a TextItem during onRecordClick of a ListGrid.
Getting the error - Uncaught JavaScript exception [error has no properties] in http://localhost:8888/com.mycompany.HelloWorld/sc/client/debug/debug.js, line 281 from GWT.
Am I missing something here. Can anyone help in resolving the issue. Thanks in advance.
Code is as follows
EntryPoint
	CountryXMLDS.java
	Country.java
	Country.data.xml
	From a standalone browser it is not working and Firebug gives the following errors,
Unknown property 'text-overflow'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/sc/skins/Enterprise/skin_styles.css
Line 1075
Unknown property 'text-overflow'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/sc/skins/Enterprise/skin_styles.css
Line 1168
Error in parsing value for property 'filter'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/sc/skins/Enterprise/skin_styles.css
Line 1231
Error in parsing value for property 'filter'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/sc/skins/Enterprise/skin_styles.css
Line 1236
Unknown property 'text-overflow'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/sc/skins/Enterprise/skin_styles.css
Line 1387
Unknown property 'text-overflow'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/sc/skins/Enterprise/skin_styles.css
Line 1394
Unknown property 'text-overflow'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/sc/skins/Enterprise/skin_styles.css
Line 1401
Error in parsing value for property 'filter'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/sc/skins/Enterprise/skin_styles.css
Line 1716
Error in parsing value for property 'filter'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/sc/skins/Enterprise/skin_styles.css
Line 1720
Error in parsing value for property 'filter'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/sc/skins/Enterprise/skin_styles.css
Line 1724
Selector expected. Ruleset ignored due to bad selector.
http://localhost:8888/com.mycompany.HelloWorld/HelloWorld.css
Line 6
Unexpected end of file while searching for closing } of invalid rule set.
http://localhost:8888/com.mycompany.HelloWorld/HelloWorld.css
Line 6
Unknown property 'wrap'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/HelloWorld.html
Line 0
					I am trying to assign a cell value to a TextItem during onRecordClick of a ListGrid.
Getting the error - Uncaught JavaScript exception [error has no properties] in http://localhost:8888/com.mycompany.HelloWorld/sc/client/debug/debug.js, line 281 from GWT.
Am I missing something here. Can anyone help in resolving the issue. Thanks in advance.
Code is as follows
EntryPoint
Code:
	
	package com.mycompany.client;
import com.google.gwt.core.client.EntryPoint;
import com.mycompany.client.sampledata.countryXmlDS;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.TextItem;
import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.grid.events.RecordClickEvent;
import com.smartgwt.client.widgets.grid.events.RecordClickHandler;
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.tab.Tab;
import com.smartgwt.client.widgets.tab.TabSet;
import com.smartgwt.client.data.DataSource;
/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class HelloWorld implements EntryPoint {
  /**
   * This is the entry point method.
   */
  public void onModuleLoad() {
  
	  DataSource countryDS = countryXmlDS.getInstance();	  
	  ListGrid grid = new ListGrid();  
      grid.setWidth("250");	      
      grid.setHeight("20%");  
      grid.setDataSource(countryDS);  
      grid.setAutoFetchData(true);
      
      final TextItem myText = new TextItem("Country");
      grid.addRecordClickHandler(new RecordClickHandler(){
		public void onRecordClick(RecordClickEvent event) {    	  
			Country Message = (Country) event.getRecord();					
			myText.setValue(Message.getCountry());		
		}		
      });
      
      final TabSet countryTabSet = new TabSet();
      countryTabSet.setWidth("250");
      countryTabSet.setHeight("20%");
      Tab tTab1 = new Tab("Country");
      final DynamicForm countryForm = new DynamicForm();          
      countryForm.setFields(myText);
      tTab1.setPane(countryForm);
      countryTabSet.addTab(tTab1);
      
      HLayout mainLayout = new HLayout();  
      mainLayout.setLayoutMargin(15);  
      mainLayout.setWidth("100%");  
      mainLayout.setHeight("100%"); 
      mainLayout.setMembersMargin(5);
      mainLayout.addMember(grid);      
      mainLayout.addMember(countryTabSet);
      mainLayout.draw();
  }  
  
}
Code:
	
	package com.mycompany.client.sampledata;
import com.smartgwt.client.data.DataSource;
import com.smartgwt.client.data.fields.*;
public class countryXmlDS extends DataSource {
    private static countryXmlDS instance = null;
    public static countryXmlDS getInstance() {
        if (instance == null) {
            instance = new countryXmlDS("countryDS");
        }
        return instance;
    }
    public countryXmlDS(String id) {
        setID(id);
        setRecordXPath("/List/country");
        
        DataSourceIntegerField pkField = new DataSourceIntegerField("pk");
        pkField.setHidden(true);
        pkField.setPrimaryKey(true);
        
        DataSourceTextField countrycodeField = new DataSourceTextField("countrycode", "Code");
        countrycodeField.setRequired(true);
        
        DataSourceTextField countryField = new DataSourceTextField("country", "Country");
        countrycodeField.setRequired(true);
                		
        setFields(pkField, countrycodeField, countryField);
        setDataURL("ds/test_data/country.data.xml");
        setClientOnly(true);
    }
}
Code:
	
	package com.mycompany.client;
import com.smartgwt.client.widgets.grid.ListGridRecord;
public class Country extends ListGridRecord {
    public Country() {
    }
    public Country(String countrycode, String country) {
        setCountryCode(countrycode);
        setCountry(country);        
        
    }
  
    public void setCountryCode(String countrycode) {
        setAttribute("countrycode", countrycode);
    }
    public String getCountryCode() {
        return getAttributeAsString("countrycode");
    }
    public void setCountry(String country) {
        setAttribute("country", country);
    }
    public String getCountry() {
        return getAttributeAsString("country");
    }
        
}
Code:
	
	<List>
<country>
    <countrycode>001</countrycode>
    <country>United States</country>    
</country>
<country>
    <countrycode>002</countrycode>
    <country>India</country>    
</country>
<country>
    <countrycode>003</countrycode>
    <country>United Kingdom</country>    
</country>
</List>
Unknown property 'text-overflow'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/sc/skins/Enterprise/skin_styles.css
Line 1075
Unknown property 'text-overflow'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/sc/skins/Enterprise/skin_styles.css
Line 1168
Error in parsing value for property 'filter'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/sc/skins/Enterprise/skin_styles.css
Line 1231
Error in parsing value for property 'filter'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/sc/skins/Enterprise/skin_styles.css
Line 1236
Unknown property 'text-overflow'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/sc/skins/Enterprise/skin_styles.css
Line 1387
Unknown property 'text-overflow'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/sc/skins/Enterprise/skin_styles.css
Line 1394
Unknown property 'text-overflow'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/sc/skins/Enterprise/skin_styles.css
Line 1401
Error in parsing value for property 'filter'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/sc/skins/Enterprise/skin_styles.css
Line 1716
Error in parsing value for property 'filter'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/sc/skins/Enterprise/skin_styles.css
Line 1720
Error in parsing value for property 'filter'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/sc/skins/Enterprise/skin_styles.css
Line 1724
Selector expected. Ruleset ignored due to bad selector.
http://localhost:8888/com.mycompany.HelloWorld/HelloWorld.css
Line 6
Unexpected end of file while searching for closing } of invalid rule set.
http://localhost:8888/com.mycompany.HelloWorld/HelloWorld.css
Line 6
Unknown property 'wrap'. Declaration dropped.
http://localhost:8888/com.mycompany.HelloWorld/HelloWorld.html
Line 0

Comment