Upgrading from 1.0 to 1.0.1 broke sorting?
My code works fine with 1.0, but when I use 1.0.1, clicking on the column header no longer sorts the grid data. The status bar briefly flashes "sorting...", but nothing changes in the table. Does anyone else have a similar problem? Is there something new we need to set to make sorting work? I diff'ed the examples, and didn't see any changes. Here is a snippet of my code:
<script>
var locations = new Array(); // Array of oLocation
function oLocation(locationId, location) {
this.locationId = locationId;
this.location = location;
}
var locationsColumns = [
"<bean:message bundle="resmgmt" key="location.label"/>"
];
// oLocation(locationId, location)
<c:forEach items="${resourceForm.allLocations}" var="l_location">
locations[locations.length] = new oLocation(
'<c:out value="${l_location.locationId}"/>',
'<c:out value="${l_location.locationName}"/>'
);
</c:forEach>
var oLocationsGrid = new Active.Controls.Grid;
oLocationsGrid.setId("LocationsGrid");
oLocationsGrid.setRowProperty("count", locations.length);
oLocationsGrid.setColumnProperty("count", 1);
oLocationsGrid.setDataProperty("text", function(i, j){
switch (j) {
case 0:
return locations[i].location;
}
});
oLocationsGrid.setColumnProperty("text", function(i){return locationsColumns[i]});
// Add a doubleclick listener
var row = new Active.Templates.Row;
row.setEvent("ondblclick", function(){this.action("myAction")});
oLocationsGrid.setTemplate("row", row);
oLocationsGrid.setAction("myAction", function(src){doEditLocation()});
document.write(oLocationsGrid);
</script>
Any suggestions would be greatly appreciated. Thanks!
<script>
var locations = new Array(); // Array of oLocation
function oLocation(locationId, location) {
this.locationId = locationId;
this.location = location;
}
var locationsColumns = [
"<bean:message bundle="resmgmt" key="location.label"/>"
];
// oLocation(locationId, location)
<c:forEach items="${resourceForm.allLocations}" var="l_location">
locations[locations.length] = new oLocation(
'<c:out value="${l_location.locationId}"/>',
'<c:out value="${l_location.locationName}"/>'
);
</c:forEach>
var oLocationsGrid = new Active.Controls.Grid;
oLocationsGrid.setId("LocationsGrid");
oLocationsGrid.setRowProperty("count", locations.length);
oLocationsGrid.setColumnProperty("count", 1);
oLocationsGrid.setDataProperty("text", function(i, j){
switch (j) {
case 0:
return locations[i].location;
}
});
oLocationsGrid.setColumnProperty("text", function(i){return locationsColumns[i]});
// Add a doubleclick listener
var row = new Active.Templates.Row;
row.setEvent("ondblclick", function(){this.action("myAction")});
oLocationsGrid.setTemplate("row", row);
oLocationsGrid.setAction("myAction", function(src){doEditLocation()});
document.write(oLocationsGrid);
</script>
Any suggestions would be greatly appreciated. Thanks!
JohnG
June 27,