3.2.0

Virtual Mode XML dataset

Why it doesn't work with IE, there is a xml file with many blocks, with firefox it works perfectly.

This is the page source:
<html>
<head>
    <title>ActiveWidgets Grid :: Examples</title>
    <style> body, html {margin:0px; padding: 0px; overflow: hidden;} </style>

    <!-- ActiveWidgets stylesheet and scripts -->
    <link href="../../runtime/styles/xp/aw.css" rel="stylesheet" type="text/css" ></link>
    <script src="../../runtime/lib/aw.js"></script>

    <!-- grid format -->
    <style>
        .aw-grid-control {height: 40%; width: 100%; border: none; font: menu;}

        .aw-column-0 {text-align: left;}
        .aw-column-1 {text-align: left;}
        .aw-column-2 {text-align: left;}
        .aw-column-3 {text-align: left;}
        .aw-column-4 {text-align: left;}
        .aw-column-5 {text-align: left;}
        .aw-column-6 {text-align: left;}
        .aw-column-7 {text-align: left;}
        .aw-column-8 {text-align: left;}

        .aw-grid-cell {border-right: 1px solid threedshadow;}
        .aw-grid-row {border-bottom: 1px solid threedlightshadow;}
        	.aw-alternate-even {background: #eeeeee;}

    </style>
</head>
<body onresize="obj.setControlSize(document.body.clientWidth-8,document.body.clientHeight-36)">
    <script>

    //	create data formats
    var string = new AW.Formats.String;
    var number1 = new AW.Formats.Number;
    var number2 = new AW.Formats.Number;
    var date = new AW.Formats.Date;

    //	define formatting rule for text output
    number1.setTextFormat("#,###.##");
    number2.setTextFormat("");

    date.setTextFormat("dd mmm yy");
    date.setDataFormat("ISO8601");

    //	create ActiveWidgets data model - XML-based table
    var table = new AW.XML.Table;

    //	provide data URL
    table.setURL("../data/relux.xml");

    //	set rows XPath
    table.setRows("//compose/*");

    //	set columns XPath
    table.setColumns(["MArtikelNr", "ArtikelNr",
    "xGeo","yGeo","zGeo","dGeo","zRot",
    "C0Rot","C90Rot"]);

    //	start asyncronous data retrieval
    table.request();

    //	define column labels
    var columns = ["MArtikelNr", "ArtikelNr",
    "xGeo","yGeo","zGeo","dGeo","zRot",
    "C0Rot","C90Rot"];

    //	create ActiveWidgets Grid javascript object
    var obj = new AW.UI.Grid;

    obj.setColumnCount(9);

    //Virtual Mode
    obj.setVirtualMode(true);

    //	provide column labels
    obj.setHeaderText(columns);

    //	enable row selectors
    obj.setSelectorVisible(true);
    obj.setSelectorText(function(i){return this.getRowPosition(i)});
    obj.setSelectorWidth(25);

    //	set row selection
    obj.setSelectionMode("single-row");

    //	set column formatting
    obj.setCellFormat([string, string,number1,number1,
    number1,number1,number1,number1,number1]);

    //	provide external model as a grid data source
    obj.setCellModel(table);

    //	write grid html to the page
    document.write(obj);

    </script>
</body>
</html>

Any hints???
Maybe is wrong the Virtual Mode call? I want that it shows 25 rows.
Thank you in advance
Daniele
February 20,
The real problem is always the xml file that is too large. How can I avoid this problem without cutting the file?
Daniele
February 20,

This topic is archived.

See also:


Back to support forum