No, it's not working with getParams either.
Here is complete client code:
<code>
<HTML><HEAD>
<SCRIPT>var isomorphicDir="../../common/isomorphic/";</SCRIPT>
<SCRIPT SRC=../../common/isomorphic/system/modules/ISC_Core.js></SCRIPT>
<SCRIPT SRC=../../common/isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
<SCRIPT SRC=../../common/isomorphic/system/modules/ISC_Containers.js></SCRIPT>
<SCRIPT SRC=../../common/isomorphic/system/modules/ISC_Grids.js></SCRIPT>
<SCRIPT SRC=../../common/isomorphic/system/modules/ISC_Forms.js></SCRIPT>
<SCRIPT SRC=../../common/isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
<SCRIPT SRC=../../common/isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
isc.DataSource.create({
ID:"countryDS",
dataFormat:"xml",
dataURL:"accidents.asp?datarequest=xml&methodexecute=",
recordXPath:"//country",
fields:[
{name:"countryCode", title:"Code"},
{name:"countryName", title:"Country"},
{name:"independence", title:"Nationhood", type:"date"},
{name:"population", title:"Population", type:"integer"},
{name:"gdp", title:"GDP", type:"float"}
]
});
/*isc.ListGrid.create({
ID: "countryList",
width:500, height:224,
alternateRecordStyles:true,
showAllRecords:true,
dataSource: countryDS,
autoFetchData: true
});*/
isc.DynamicForm.create({
ID:"frmFileIdAction",
dataSource: countryDS,
top: 20,
// numCols: "5",
border:"1px solid blue", padding:5,
// colWidths: ["12%", "10%", "10%", "10%", "*"],
fields:[
{name: "ActionCode", title: "Action Code", type: "select",
valueMap:
{
"1" : "Create New",
"2" : "Update",
"3" : "Delete",
"4" : "Print/View"
}
},
{name: "BRCFile", title: "BRC File Number", type: "Integer", length: "4", width: "50"}
]
});
isc.DynamicForm.create({
ID:"frmGeneral",
dataSource: countryDS,
numCols: 5,
colWidths: ["12%", "3%", "10%", "4%", "*"],
wrapItemTitles:false,
fields:[
{name:"DateOfAccident", title:"Date Of Accident", type:"date",
useTextField:true, width: 100, endRow: true, colSpan:2
},
{name: "RailRoadInvolved", title: "Other RailRoad Involved", type: "select",
colSpan:2,
valueMap:{"1" : "N/A"}
},
{name: "RailRoadInvolvedFile", title: "File Number", type: "Integer",
length: 4, width: 50},
{name: "RailRoadResponsible", title: "RailRoad Responsible For Track",
type: "select", colSpan:2,
valueMap:{"1" : "BRC"}
},
{name: "RailRoadResponsibleFile", title: "File Number", type: "Integer",
length: 4, width: 50
},
{name: "TimeOfAccident", title: "Time Of Accident", type: "time",
endRow: true, colSpan:2},
{name: "Yard", title: "Yard", type: "select", endRow: true,
colSpan:2,
valueMap:{"1" : "ECLS"}
},
{name: "Division", title: "Division", type: "select", endRow: true,
colSpan:2,
valueMap:{"1" : "System"}
},
{name: "NearestCityOrTown", title: "Nearest City Or Town",
type: "select", endRow: true, colSpan:2,
valueMap:{"1" : "Badford Park"}
},
{name: "IndustryNumber", title: "Industry Number", type: "Integer",
length: 2, width: 25, colSpan:2
},
{name: "SpecificSiteTrackNumber", title: "Specific Site/Track",
type: "Integer", length: 2, width: 25, startRow: true
},
{name: "SpecificSiteTrackName", showTitle: false, type: "text",
length: 20, width: 50
},
{name: "TypeOfTrack", title: "Type Of Track", type: "select",
startRow: true, colSpan:2,
valueMap:{
"1" : "Yard",
"2" : "Main",
"3" : "Siding",
"4" : "Industry"
}
},
{name: "MilePostNumber", title: "Mile Post Number", type: "float",
length: 10, width: 50, startRow: "true", colSpan:2
},
{name: "Weather", title: "Weather", type: "select", startRow: true,
colSpan:2,
valueMap:{
"1" : "Clear",
"2" : "Cloudy",
"3" : "Rain",
"4" : "Fog",
"5" : "Sleet",
"6" : "Snow"
}
}
]
});
isc.TabSet.create({
ID: "tabSet",
width: "100%",
height: "100%",
tabs: [{
id: "General",
title: "General",
pane: frmGeneral
},{
id: "Consists1",
title: "Consists #1"
}]
});
isc.IButton.create({
ID: "Process",
name: "Process",
title: "Process",
type: "button",
// top: 370,
left: 40,
click :
function ()
{
originaldataURL = countryDS.dataURL;
countryDS.dataURL = countryDS.dataURL + 'mProcessAccidentFileRequest';
countryDS.dataProtocol = 'getParams';
frmGeneral.saveData();
countryDS.dataURL = originaldataURL;
}
});
isc.VLayout.create({
width:"100%", height:"100%",
members:[
isc.Canvas.create({
ID:"TopFrame",
showEdges:false,
width:"100%",
height:"8%",
autoDraw:false
}),
isc.HLayout.create({
width:"100%",
members:[
isc.Canvas.create({
ID:"LeftFrame",
backgroundColor:"#CCFFCC",
showEdges:true,
width:"20%",
autoDraw:false
}),
isc.VLayout.create({
ID:"RightFrame",
showEdges:true,
autoDraw:false,
width:"*",
backgroundColor:"#63CCCC",
members:[frmFileIdAction, tabSet, Process]
})
]
})
]
});
countryDS.fetchData(null, "frmGeneral.setValues(data[0])");
</SCRIPT>
</BODY></HTML>
</code>
Here is complete client code:
<code>
<HTML><HEAD>
<SCRIPT>var isomorphicDir="../../common/isomorphic/";</SCRIPT>
<SCRIPT SRC=../../common/isomorphic/system/modules/ISC_Core.js></SCRIPT>
<SCRIPT SRC=../../common/isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
<SCRIPT SRC=../../common/isomorphic/system/modules/ISC_Containers.js></SCRIPT>
<SCRIPT SRC=../../common/isomorphic/system/modules/ISC_Grids.js></SCRIPT>
<SCRIPT SRC=../../common/isomorphic/system/modules/ISC_Forms.js></SCRIPT>
<SCRIPT SRC=../../common/isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
<SCRIPT SRC=../../common/isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
isc.DataSource.create({
ID:"countryDS",
dataFormat:"xml",
dataURL:"accidents.asp?datarequest=xml&methodexecute=",
recordXPath:"//country",
fields:[
{name:"countryCode", title:"Code"},
{name:"countryName", title:"Country"},
{name:"independence", title:"Nationhood", type:"date"},
{name:"population", title:"Population", type:"integer"},
{name:"gdp", title:"GDP", type:"float"}
]
});
/*isc.ListGrid.create({
ID: "countryList",
width:500, height:224,
alternateRecordStyles:true,
showAllRecords:true,
dataSource: countryDS,
autoFetchData: true
});*/
isc.DynamicForm.create({
ID:"frmFileIdAction",
dataSource: countryDS,
top: 20,
// numCols: "5",
border:"1px solid blue", padding:5,
// colWidths: ["12%", "10%", "10%", "10%", "*"],
fields:[
{name: "ActionCode", title: "Action Code", type: "select",
valueMap:
{
"1" : "Create New",
"2" : "Update",
"3" : "Delete",
"4" : "Print/View"
}
},
{name: "BRCFile", title: "BRC File Number", type: "Integer", length: "4", width: "50"}
]
});
isc.DynamicForm.create({
ID:"frmGeneral",
dataSource: countryDS,
numCols: 5,
colWidths: ["12%", "3%", "10%", "4%", "*"],
wrapItemTitles:false,
fields:[
{name:"DateOfAccident", title:"Date Of Accident", type:"date",
useTextField:true, width: 100, endRow: true, colSpan:2
},
{name: "RailRoadInvolved", title: "Other RailRoad Involved", type: "select",
colSpan:2,
valueMap:{"1" : "N/A"}
},
{name: "RailRoadInvolvedFile", title: "File Number", type: "Integer",
length: 4, width: 50},
{name: "RailRoadResponsible", title: "RailRoad Responsible For Track",
type: "select", colSpan:2,
valueMap:{"1" : "BRC"}
},
{name: "RailRoadResponsibleFile", title: "File Number", type: "Integer",
length: 4, width: 50
},
{name: "TimeOfAccident", title: "Time Of Accident", type: "time",
endRow: true, colSpan:2},
{name: "Yard", title: "Yard", type: "select", endRow: true,
colSpan:2,
valueMap:{"1" : "ECLS"}
},
{name: "Division", title: "Division", type: "select", endRow: true,
colSpan:2,
valueMap:{"1" : "System"}
},
{name: "NearestCityOrTown", title: "Nearest City Or Town",
type: "select", endRow: true, colSpan:2,
valueMap:{"1" : "Badford Park"}
},
{name: "IndustryNumber", title: "Industry Number", type: "Integer",
length: 2, width: 25, colSpan:2
},
{name: "SpecificSiteTrackNumber", title: "Specific Site/Track",
type: "Integer", length: 2, width: 25, startRow: true
},
{name: "SpecificSiteTrackName", showTitle: false, type: "text",
length: 20, width: 50
},
{name: "TypeOfTrack", title: "Type Of Track", type: "select",
startRow: true, colSpan:2,
valueMap:{
"1" : "Yard",
"2" : "Main",
"3" : "Siding",
"4" : "Industry"
}
},
{name: "MilePostNumber", title: "Mile Post Number", type: "float",
length: 10, width: 50, startRow: "true", colSpan:2
},
{name: "Weather", title: "Weather", type: "select", startRow: true,
colSpan:2,
valueMap:{
"1" : "Clear",
"2" : "Cloudy",
"3" : "Rain",
"4" : "Fog",
"5" : "Sleet",
"6" : "Snow"
}
}
]
});
isc.TabSet.create({
ID: "tabSet",
width: "100%",
height: "100%",
tabs: [{
id: "General",
title: "General",
pane: frmGeneral
},{
id: "Consists1",
title: "Consists #1"
}]
});
isc.IButton.create({
ID: "Process",
name: "Process",
title: "Process",
type: "button",
// top: 370,
left: 40,
click :
function ()
{
originaldataURL = countryDS.dataURL;
countryDS.dataURL = countryDS.dataURL + 'mProcessAccidentFileRequest';
countryDS.dataProtocol = 'getParams';
frmGeneral.saveData();
countryDS.dataURL = originaldataURL;
}
});
isc.VLayout.create({
width:"100%", height:"100%",
members:[
isc.Canvas.create({
ID:"TopFrame",
showEdges:false,
width:"100%",
height:"8%",
autoDraw:false
}),
isc.HLayout.create({
width:"100%",
members:[
isc.Canvas.create({
ID:"LeftFrame",
backgroundColor:"#CCFFCC",
showEdges:true,
width:"20%",
autoDraw:false
}),
isc.VLayout.create({
ID:"RightFrame",
showEdges:true,
autoDraw:false,
width:"*",
backgroundColor:"#63CCCC",
members:[frmFileIdAction, tabSet, Process]
})
]
})
]
});
countryDS.fetchData(null, "frmGeneral.setValues(data[0])");
</SCRIPT>
</BODY></HTML>
</code>
Comment