Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    RESTFUL Datasource Issue

    Be sure your post includes:

    1. the SmartGWT 2.1 and all supporting browser version(s) involved;
    I have used the following code but I am getting the error image attached.
    5.
    Code:
    package com.smartgwt.sample.showcase.client.webservice;  
    
    import com.smartgwt.client.data.DataSource;  
    import com.smartgwt.client.data.fields.DataSourceTextField;  
    import com.smartgwt.client.data.fields.DataSourceLinkField;  
    import com.smartgwt.client.widgets.Canvas;  
    import com.smartgwt.client.widgets.grid.ListGrid;  
    import com.smartgwt.sample.showcase.client.PanelFactory;  
    import com.smartgwt.sample.showcase.client.ShowcasePanel;  
    
    public class RssSample implements EntryPoint {  
    
        public void onModuleLoad() {  
            DataSource dataSource = new DataSource();  
            dataSource.setDataURL("http://rss.slashdot.org/Slashdot/slashdot");  
            dataSource.setRecordXPath("//default:item");  
    
            DataSourceTextField titleField = new DataSourceTextField("title", "Title");  
            DataSourceLinkField linkField = new DataSourceLinkField("link", "Link");  
    
            dataSource.setFields(titleField, linkField);  
    
            ListGrid grid = new ListGrid();  
            grid.setAutoFetchData(true);  
            grid.setHeight(200);  
            grid.setWidth100();  
            grid.setDataSource(dataSource);  
    
            grid.draw();  
        }  
    }
    How to avoid this error? Or is there any other way to do this???
    Attached Files

    #2
    Message is pretty self-explanatory. Server-side proxy is another way around it. If you don't understand, google it.

    Comment

    Working...
    X