:: Forum >> Version 2 >>

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>
    <
stylebodyhtml {margin:0pxpadding0pxoverflowhidden;} </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 {height40%; width100%; bordernonefontmenu;}

        .
aw-column-{text-alignleft;}
        .
aw-column-{text-alignleft;}
        .
aw-column-{text-alignleft;}
        .
aw-column-{text-alignleft;}
        .
aw-column-{text-alignleft;}
        .
aw-column-{text-alignleft;}
        .
aw-column-{text-alignleft;}
        .
aw-column-{text-alignleft;}
        .
aw-column-{text-alignleft;}

        .
aw-grid-cell {border-right1px solid threedshadow;}
        .
aw-grid-row {border-bottom1px 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([stringstring,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
Monday, February 20, 2006
The real problem is always the xml file that is too large. How can I avoid this problem without cutting the file?
Daniele
Monday, February 20, 2006



This topic is archived.

Back to support forum

Forum search