Hi there,
I need some help.
I built a Custom GridView using .NET (C#) to render a table as LS needs and a helper class that put all LightStreamer js scripts on the page. I'm using the STOCKLISTDEMO application that comes with the evaluation version of LS, running on port 8080 in my developer machine. The pages are served by IIS, in the same machine.
But it doesn't work. After a few seconds that pages was load, I receive the message "ER bind Unable to find the Engine".
Below follows the code generated by my custom grid view and my helper class.
-------------------------------------------------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Page </title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="ls/lscommons.js" />
<script type="text/javascript" src="ls/lspushpage.js" />
</head>
<body>
<form name="form1" method="post" action="Default.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJLTUzNzgxOTg3D2QWAgIDD2QWAgIBDzwrAA0BCxYEHghDc3NDbGFzcwUGcXVvdGVzHgRfIVNCAgJkGAEFBGxpc3QPZ2RQRKuR3537OEHL/IFDxOfkdxbYrA==" />
</div>
<script src="/AEHomebroker/WebResource.axd?d=txnR2yUMltS39i4d2e_bwnzdWamIsn8AWjoeRpuo207lVqBJr3RH_nrV5XsGRcd5jAomS-GEIj9cB8dLCnsZXQ2&t=633372070028906250"
type="text/javascript"></script>
<script src="/AEHomebroker/WebResource.axd?d=txnR2yUMltS39i4d2e_bwnzdWamIsn8AWjoeRpuo207lVqBJr3RH_nrV5XsGRcd5I-aO0tXZ6V8aD5KBjeSYoQ2&t=633372070028906250"
type="text/javascript"></script>
<div>
<!-- THIS CODE IS GENERATED BY MY CUSTOM GRIDVIEW //-->
<table id="list" class="quotes">
<tr>
<th>
last_price</th>
<th>
time</th>
<th>
pct_change</th>
<th>
bid_quantity</th>
<th>
ask</th>
<th>
ask_quantity</th>
<th>
min</th>
<th>
max</th>
<th>
ref_price</th>
<th>
open_price</th>
<th>
stock_name</th>
<th>
item_status</th>
</tr>
<tr>
<td>
<div source="lightstreamer" table="list" item="item1" field="last_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item1" field="time">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item1" field="pct_change">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item1" field="bid_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item1" field="ask">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item1" field="ask_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item1" field="min">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item1" field="max">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item1" field="ref_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item1" field="open_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item1" field="stock_name">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item1" field="item_status">
</div>
</td>
</tr>
<tr>
<td>
<div source="lightstreamer" table="list" item="item2" field="last_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item2" field="time">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item2" field="pct_change">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item2" field="bid_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item2" field="ask">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item2" field="ask_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item2" field="min">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item2" field="max">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item2" field="ref_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item2" field="open_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item2" field="stock_name">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item2" field="item_status">
</div>
</td>
</tr>
<tr>
<td>
<div source="lightstreamer" table="list" item="item3" field="last_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item3" field="time">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item3" field="pct_change">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item3" field="bid_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item3" field="ask">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item3" field="ask_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item3" field="min">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item3" field="max">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item3" field="ref_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item3" field="open_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item3" field="stock_name">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item3" field="item_status">
</div>
</td>
</tr>
<tr>
<td>
<div source="lightstreamer" table="list" item="item4" field="last_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item4" field="time">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item4" field="pct_change">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item4" field="bid_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item4" field="ask">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item4" field="ask_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item4" field="min">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item4" field="max">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item4" field="ref_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item4" field="open_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item4" field="stock_name">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item4" field="item_status">
</div>
</td>
</tr>
<tr>
<td>
<div source="lightstreamer" table="list" item="item5" field="last_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item5" field="time">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item5" field="pct_change">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item5" field="bid_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item5" field="ask">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item5" field="ask_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item5" field="min">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item5" field="max">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item5" field="ref_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item5" field="open_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item5" field="stock_name">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item5" field="item_status">
</div>
</td>
</tr>
<tr>
<td>
<div source="lightstreamer" table="list" item="item6" field="last_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item6" field="time">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item6" field="pct_change">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item6" field="bid_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item6" field="ask">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item6" field="ask_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item6" field="min">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item6" field="max">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item6" field="ref_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item6" field="open_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item6" field="stock_name">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item6" field="item_status">
</div>
</td>
</tr>
<tr>
<td>
<div source="lightstreamer" table="list" item="item7" field="last_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item7" field="time">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item7" field="pct_change">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item7" field="bid_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item7" field="ask">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item7" field="ask_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item7" field="min">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item7" field="max">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item7" field="ref_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item7" field="open_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item7" field="stock_name">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item7" field="item_status">
</div>
</td>
</tr>
<tr>
<td>
<div source="lightstreamer" table="list" item="item8" field="last_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item8" field="time">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item8" field="pct_change">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item8" field="bid_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item8" field="ask">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item8" field="ask_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item8" field="min">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item8" field="max">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item8" field="ref_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item8" field="open_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item8" field="stock_name">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item8" field="item_status">
</div>
</td>
</tr>
<tr>
<td>
<div source="lightstreamer" table="list" item="item9" field="last_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item9" field="time">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item9" field="pct_change">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item9" field="bid_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item9" field="ask">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item9" field="ask_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item9" field="min">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item9" field="max">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item9" field="ref_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item9" field="open_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item9" field="stock_name">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item9" field="item_status">
</div>
</td>
</tr>
<tr>
<td>
<div source="lightstreamer" table="list" item="item10" field="last_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item10" field="time">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item10" field="pct_change">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item10" field="bid_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item10" field="ask">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item10" field="ask_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item10" field="min">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item10" field="max">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item10" field="ref_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item10" field="open_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item10" field="stock_name">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item10" field="item_status">
</div>
</td>
</tr>
<tr>
<td>
<div source="lightstreamer" table="list" item="item11" field="last_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item11" field="time">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item11" field="pct_change">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item11" field="bid_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item11" field="ask">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item11" field="ask_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item11" field="min">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item11" field="max">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item11" field="ref_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item11" field="open_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item11" field="stock_name">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item11" field="item_status">
</div>
</td>
</tr>
<tr>
<td>
<div source="lightstreamer" table="list" item="item12" field="last_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item12" field="time">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item12" field="pct_change">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item12" field="bid_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item12" field="ask">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item12" field="ask_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item12" field="min">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item12" field="max">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item12" field="ref_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item12" field="open_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item12" field="stock_name">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item12" field="item_status">
</div>
</td>
</tr>
<tr>
<td>
<div source="lightstreamer" table="list" item="item13" field="last_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item13" field="time">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item13" field="pct_change">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item13" field="bid_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item13" field="ask">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item13" field="ask_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item13" field="min">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item13" field="max">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item13" field="ref_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item13" field="open_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item13" field="stock_name">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item13" field="item_status">
</div>
</td>
</tr>
<tr>
<td>
<div source="lightstreamer" table="list" item="item14" field="last_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item14" field="time">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item14" field="pct_change">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item14" field="bid_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item14" field="ask">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item14" field="ask_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item14" field="min">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item14" field="max">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item14" field="ref_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item14" field="open_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item14" field="stock_name">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item14" field="item_status">
</div>
</td>
</tr>
<tr>
<td>
<div source="lightstreamer" table="list" item="item15" field="last_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item15" field="time">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item15" field="pct_change">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item15" field="bid_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item15" field="ask">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item15" field="ask_quantity">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item15" field="min">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item15" field="max">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item15" field="ref_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item15" field="open_price">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item15" field="stock_name">
</div>
</td>
<td>
<div source="lightstreamer" table="list" item="item15" field="item_status">
</div>
</td>
</tr>
</table>
<!-- THIS CODE IS GENERATED BY MY CUSTOM GRIDVIEW //-->
<div>
</div>
</div>
<!-- THIS CODE IS GENERATED BY MY HELPER CLASS //-->
<script type="text/javascript">
//<![CDATA[
var lsPage = new PushPage();
lsPage.context.setDebugAlertsOnClientError(true);
lsPage.context.setDomain("localhost");
lsPage.onEngineCreation = startEngine;
lsPage.bind();
lsPage.createEngine("SLEngine", "/aehomebroker/ls");
function startEngine(eng) {
eng.policy.setMaxBandwidth(30);
eng.policy.setIdleTimeout(30000);
eng.connection.setLSHost("localhost");
eng.connection.setLSPort("8080");
eng.connection.setAdapterName("STOCKLISTDEMO");
eng.changeStatus("STREAMING");
alert("aqui");
}
var group = ['item1','item2','item3','item4','item5','item6','item7','item8','item9','item10','item11','item12','item13','item14','item15'];
var schema = ['last_price', 'time', 'pct_change', 'bid_quantity', 'ask', 'ask_quantity', 'min', 'max', 'ref_price', 'open_price', 'stock_name', 'item_status'];
var newTable = new OverwriteTable(group, schema,'MERGE');
newTable.setSnapshotRequired(true);
newTable.setRequestedMaxFrequency(1.0);
newTable.setPushedHtmlEnabled(true);
lsPage.addTable(newTable, 'list');
//]]>
</script>
<!-- THIS CODE IS GENERATED BY MY HELPER CLASS //-->
</form>
<script type="text/javascript">
function updateItem(item, updateInfo) {
if (updateInfo == null) {
return;
}
alert(item);
if (updateInfo.isValueChanged(3)) {
var val = updateInfo.getNewValue(3);
if (val.indexOf("-") > -1) {
updateInfo.addField(16,imgDown);
} else {
updateInfo.addField(16,imgUp);
}
}
var oldLast = updateInfo.getOldValue(1);
var newColor;
if (oldLast == null) { //first update for this item
updateInfo.addField(14,greenColor,true);
//no fade for snapshot
if (doFade) {
updateInfo.addField(15,"OFF",true);
}
} else if (updateInfo.isValueChanged(1)) {
//at least second update
if (oldLast > updateInfo.getNewValue(1)) {
updateInfo.addField(14,redColor,true);
} else {
updateInfo.addField(14,greenColor,true);
}
if (doFade) {
updateInfo.addField(15,"ON",true);
}
}
}
</script>
</body>
</html>
-------------------------------------------------------------------------------------------------
If anyone could help me, I'll be very greatful!
Eduardo Ramires