-
April 29th, 2009, 05:30 PM
#1
Hi Mone.
I changed it (and went a little more simple), and this is what I have now:
Hosts file:
127.0.0.1 web.aagtestdom.com
127.0.0.1 push.web.aagtestdom.com
Client script:
<script type="text/javascript">
var page = new PushPage();
page.context.setDomain("web.aagtestdom.com");
page.onEngineCreation = function startEngine(engine)
{
engine.connection.setAdapterName("LSADAPTERDEMO");
engine.changeStatus("STREAMING");
engine.connection.setLSHost("push.web.aagtestdom.c om");
engine.connection.setLSPort("8080");
}
page.bind();
page.createEngine("CBOFlightPublisher", "JSLib/", "SHARE_SESSION");
var pushtable = new OverwriteTable(null, null, "MERGE");
page.addTable(pushtable, "EventTargetTable");
</script>
But I still get the same error: Unable to find the Engine.
If I change the hosts file with web.aagtestdom.com, then I have to load the webpage with the same domain: http://web.aagtestdom.com/WebClientA...ayFlights.aspx
And it doesn't matter whether in the code I do
page.context.setDomain("web.aagtestdom.com");
or
page.context.setDomain("aagtestdom.com");
I still get the same error.
I looked at the resource links provided, but can't spot anything different at the basic level from what I have. I see other properties being used (setMaxBandwidth, setIdleTimeout, etc), but I don't think they would make a difference in my case, would they?
Any ideas of what I might try next?
Thanks.
-Guillermo
-
April 29th, 2009, 07:45 PM
#2
Hi Mone.
To answer another question of yours, the createEngine code is in the BODY section, underneath the DIV tags for the table receiving the updates.
I tested the ASP.NET page in Firefox and it worked fine!
I'm noticing that the DIV tags in the client page contain properties not recognized by Microsoft's VisualStudio Editor, namely: source, table, item and field. I can't find them either as recognized properties in W3C and other web sites, but seems to be the difference between IE and Firefox. Any ideas on what do I need to change in the client page to be able to load it from IE? I saw a posting related to a hidden table or something similar to use instead of OverwriteTable. Would that be able to use more generic DIV properties, or another HTML tag instead of DIV that is more browser-agnostic?
Thanks.
-Guillermo
-
April 30th, 2009, 08:49 AM
#3
Do you mean that you could see your page working in Firefox?
Then, the URL supplied to "createEngine" seems correct.
Anyway, may you please show the URLs by which you include the library javascript files (i.e. lscommons.js and lsengine.js) ?
Then, the problem might be in the domain management, where some differences between IE and Firefox lie.
In order to simplify the matter, please try with a canonical use of the host and domain names first, i.e.
127.0.0.1 web.aagtestdom.com
127.0.0.1 push.aagtestdom.com
and issue:
page.context.setDomain("aagtestdom.com");
Do you still see the page working with Firefox and not working in IE with this configuration?
If your tools pose any problem with the custom nonstandard attributes that Lightstreamer needs to identify the visual cells, then you can give up taking advantage of the cell support and use NonVisualTables to receive push data. In this case, you have to put the streaming data on the page in your own way.
-
April 30th, 2009, 03:30 PM
#4
Hi Dario.
Now I have it working in both, IE7 and Firefox 2.
To recap, and for those who run into "Unable to find the engine" error, here's what I found.
I have LS Moderato in a server that also hosts a test IIS v6 web server. I created a C# data adapter per the guidelines of the demo projects and an aspx .NET application deployed on IIS. I used VS2005 and .NET framework 2.0.
In the server's hosts file I have:
127.0.0.1 web.aagtestdom.com
127.0.0.1 push.web.aagtestdom.com
I tried with "127.0.0.1 push.aagtestdom.com" and it works as well.
Client code in the .aspx page.:
<script language="JavaScript" type="text/javascript">
var page = new PushPage();
page.context.setDomain("aagtestdom.com");
page.onEngineCreation = function(engine)
{
engine.connection.setAdapterName("LSADAPTERDEMO");
engine.changeStatus("STREAMING");
engine.connection.setLSHost("push.web.aagtestdom.c om");
engine.connection.setLSPort("8080");
}
page.bind();
page.createEngine("CBOFlightPublisher", "JSLib", "SHARE_SESSION");
var pushtable = new OverwriteTable(null, null, "MERGE");
page.addTable(pushtable, "EventTargetTable");
</script>
The rest of the code is the same as provided from the LS' website.
To test this from a different machine, I created the same entries in the hosts file of that machine to resolve to the LS/IIS web server:
xxx.xxx.234.206 web.aagtestdom.com
xxx.xxx.234.206 push.web.aagtestdom.com
Next, I'm going to try creating DNS entries in our network to do the same mapping, so we can test these apps from any other machine.
The address I use to the to the page is:
http://web.aagtestdom.com/myapp/mypage.aspx
JSLib is the folder where lscommons.js and lspushpage.js reside and it's located in the same level as the .NET aspx page.
A word about these files. I started using the files from the Moderato download package, but I noticed that the sample project provided in one of previous replies of this thread included different js files, and only with those my app worked.
The ones from Moderato package have the date of when I installed Moderato, so that's no good, but their sizes are lscommons 45KB and lspushpage 153 KB. The new ones that do work are 49 KB and 168 KB respectively, and are dated 2/24/2009. The error I get in both browsers when using Moderatos' files is "ER bind Unable to find the engine", which made it also confusing with the domain management problem.
If you want me to post the files, let me know how I can upload them.
Thank you Mone and Dario for your guidance, patience and the examples provided.
If I may have one last question. Could you point me to the document(s) or forum threads that talk about how to get events in non-visible HTML tags on which you can trap events like "onchange" to execute different sets of javascript code based on the data received before they are posted to the browser?
Thanks again.
-Guillermo
-
May 4th, 2009, 12:51 PM
#5
If I may have one last question. Could you point me to the document(s) or forum threads that talk about how to get events in non-visible HTML tags on which you can trap events like "onchange" to execute different sets of javascript code based on the data received before they are posted to the browser?
you can specify the schema of the table passing an array instead of a null to the table constructor. This way you can provide a schema that is larger than the schema used by the table on the html but you will receive in the callbacks the updates for all the fields.
OR
if you need only not-visible cells you could use a NonVisualTable instead of using an OverwriteTable
all the docs for the web client are available online and in the distribution zip.
(in case you are referring to DOM events instead of referring to Lightstreamer callbacks, you can find the complete list of DOM events on wikipedia)
HTH
Similar Threads
-
By karthikjai in forum Client SDKs
Replies: 5
Last Post: April 6th, 2011, 08:41 AM
-
By karthikjai in forum Client SDKs
Replies: 0
Last Post: April 1st, 2011, 03:22 PM
-
By mohamida in forum Client SDKs
Replies: 10
Last Post: August 18th, 2010, 12:50 PM
-
By mohamida in forum Client SDKs
Replies: 10
Last Post: August 18th, 2010, 12:50 PM
-
By vaduganathan in forum Client SDKs
Replies: 3
Last Post: April 9th, 2010, 08:58 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 03:22 PM.
Bookmarks