06-06-2018, 12:17 PM
Hi,
The question I have is using IWBootstrap (TIWBSText) with templates. I'm using IW14 so it's not the new integrated IWBootstrap version from IW15.
I use bootstrap-table and the REST method for loading the table. It's all from templates.
Here the data for the table is fetched from "/$iwbs/DBGRID.dataurl". In the form an eventhandler picks up the request and outputs a json response.
This works if you set TIWServerController.AllowMultipleSessionsPerUser = False. If you set this property to True, the url that is referenced doesn't trigger the eventhandler.
Because I would like a solution that works in both situations I changed the url to "../$iwbs/DBGRID.dataurl" in the template. This works in both situations.
Question: "Is this the correct and preferred way to work with these urls?"
Using IW14.1.3 and Delphi 10.1
The question I have is using IWBootstrap (TIWBSText) with templates. I'm using IW14 so it's not the new integrated IWBootstrap version from IW15.
I use bootstrap-table and the REST method for loading the table. It's all from templates.
Code:
<script type="text/javascript">
// connect dbGrid table to bootstrap-table object
$('#DBGRID').bootstrapTable(
{"columns":[
{"field":"product","title":"product"},
{"field":"aantal","title":"aantal"},
{"field":"afmeting","title":"afmeting"},
{"field":"status","title":"status"}
],
"url":"/$iwbs/DBGRID.dataurl",
"classes":"table table-striped table-no-bordered"});
// connect table cell click event handler
$("#DBGRID").off("click-cell.bs.table").on("click-cell.bs.table", function(e, field, value, row) {
ajaxCall("DBGRID.click-cell.bs.table","&row="+row.id, false);
});
</script>
Here the data for the table is fetched from "/$iwbs/DBGRID.dataurl". In the form an eventhandler picks up the request and outputs a json response.
This works if you set TIWServerController.AllowMultipleSessionsPerUser = False. If you set this property to True, the url that is referenced doesn't trigger the eventhandler.
Because I would like a solution that works in both situations I changed the url to "../$iwbs/DBGRID.dataurl" in the template. This works in both situations.
Question: "Is this the correct and preferred way to work with these urls?"
Using IW14.1.3 and Delphi 10.1