3.2.0

why can't refresh?

sorry my englidh is bad -:(

why can't refresh?

<table width="100%">
<tr><td height="403" width="100%"><input type="button" name="aa" onclick="getCostStructure(costStructureListTable,costStructureGrid,globalDom);"-->
<script>

var costStructureListTable = new Active.XML.Table;
var costStructureGridColumns = ["ID"];
costStructureListTable.setColumns(costStructureGridColumns);
costStructureListTable.setURL("<%=request.getContextPath()%>/xmlextras/init.xml");
var costStructureGrid = new Active.Controls.Grid;
costStructureGrid.setStyle("background", "white");
var costStructureRow = new Active.Templates.Row;
costStructureRow.setStyle("border-bottom", "1px solid buttonface");
costStructureGrid.setTemplate("row", costStructureRow);
costStructureGrid.setModel("data",costStructureListTable);
var costStructureColumn = new Active.Templates.Text;
costStructureColumn.setStyle("border-right", "1px solid buttonface");
costStructureGrid.setTemplate("column", costStructureColumn);
costStructureListTable.request();
document.write(costStructureGrid);

function getCostStructure(table ,grid ,xml){
var dom = new ActiveXObject("msxml2.DOMDocument");
var rootElement = dom.createElement("hibernate-generic");
var xpath = "/hibernate-generic/object/collection[@name='costStructures']/*";
var columnTitle =["ID","³É±¾ÀàÐÍ","³É±¾½ð¶î"];
grid.setProperty("column/texts", columnTitle);
var objNodeList = xml.selectNodes(xpath);
for (var item = objNodeList.nextNode(); item; item = objNodeList.nextNode()){
var refId = item.selectSingleNode("id").nodeTypedValue;
var refElementXpath = "/hibernate-generic/object[@class='CostStructure'][id='"+refId+"']";
var elementList = xml.selectNodes(refElementXpath);
for (var item1 = elementList.nextNode(); item1; item1 = elementList.nextNode()){
if(item1.selectSingleNode("id").nodeTypedValue==refId){
var newElement = dom.createElement("object");
newElement = item1.cloneNode(true);
rootElement.appendChild(newElement);
}
}
}
dom.appendChild(rootElement);
var dataXpath =["id[@name='id']","property[@name='costPrice']","property[@name='costType']"];
table.setColumns(dataXpath);
table.setRows('/hibernate-generic/object[@class="CostStructure"]');
grid.setModel("data", table);
table.response(dom);
grid.refresh();
}

</script>
<script>
getCostStructure(costStructureListTable,costStructureGrid,globalDom);
</script>
</td></tr>
</table>
qinfuji
April 3,

This topic is archived.

See also:


Back to support forum