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

xPath issue in Chrome 45

$
0
0
Hi,

after updating Chrome today, xPath parsing in DataSources seems to be somewhat broken.

I created a short example to demonstrate the issue:
Code:

public class TestClass implements EntryPoint {

        @Override
        public void onModuleLoad() {

                final Label label = new Label();

                new VLayout(){
                        {
                                setWidth100();
                                setHeight100();
                                addMember(label);
                        }
                }.draw();

                new DataSource(){
                        {
                                setDataURL("test.txt");
                                setRecordXPath("/feed/entry");

                                setFields(new DataSourceTextField("title") {
                                        {
                                                setValueXPath("./title");
                                        }
                                }, new DataSourceTextField("type") {
                                        {
                                                setValueXPath("./title/@type");
                                        }
                                });
                        }
                }.fetchData(new Criteria(), new DSCallback() {

                        @Override
                        public void execute(DSResponse dsResponse, Object data, DSRequest dsRequest) {
                                final Record record = dsResponse.getData()[0];
                                label.setContents(
                                                "Title: '" + record.getAttributeAsString("title") + "'<br />" +
                                                "Type: '" + record.getAttributeAsString("type") + "'"
                                                );
                        }
                });
        }
}

The 'test.txt' just contains the following:
Code:

<feed>
    <entry>
        <title type="test_type">test_title</title>
    </entry>
</feed>

Opening the page in Chrome 45 results in the following output:
Title: 'test_title'
Type: ''

All other browsers (IE 10, IE 9, Opera 31, FireFox 38, Safari 5.1.7) correctly display:
Title: 'test_title'
Type: 'test_type'


This issue seems just to affect the new version of chrome (45).
Opening it in chrome 44 and below results in the correct output.


Versions:
Chrome: 45.0.2454.85 m
SmartGWT: v10.0p_2015-09-01/LGPL Development Only (built 2015-09-01)

Viewing all articles
Browse latest Browse all 4756

Trending Articles