-
June 4th, 2008, 08:22 PM
#5
Alright, I uderstand.
I want to show a code fragment from my modified Hello World:
<script>
/////////////////PushPage Configuration
var debugAlerts = true;
var remoteAlerts = false;
var page = new PushPage();
page.context.setDomain("ufandd.local");
page.onEngineCreation = function(lsEngine) {
lsEngine.connection.setLSHost("ufdcrdev0005.ufandd .local");
lsEngine.connection.setLSPort(8080);
lsEngine.context.setDebugAlertsOnClientError(debug Alerts);
lsEngine.context.setRemoteAlertsOnClientError(remo teAlerts);
lsEngine.connection.setAdapterName("PROXY_HELLOWOR LD");
lsEngine.changeStatus("STREAMING");
}
page.bind();
page.createEngine("HelloWorldApp", "LS", "SHARE_SESSION");
var pushtable = new OverwriteTable(null, null, "MERGE");
page.addTable(pushtable, "hellotable");
pushtable.onItemUpdate =
function(itemPos, updateInfo, itemName)
{
// send completed scan to the front-end
alert(updateInfo.getNewValue(itemPos));
serverData(updateInfo.getNewValue(itemPos));
};
</script>
As you can see I am overriding onItemUpdate because I also want to send data to somewherre else. It works fine, sort of. For the very first time alert box will pop up only once (as expected), but next data update will trigger the alert box twice: first with an empty value, second with the real value.
Can you tell me what am I doing wrong here?
BTW, my adapter's console shows one value every time.
Similar Threads
-
By mode_vigilante in forum Adapter SDKs
Replies: 16
Last Post: January 27th, 2012, 03:58 PM
-
By icaiozzi in forum Adapter SDKs
Replies: 1
Last Post: November 19th, 2010, 11:52 AM
-
By AndyKelly in forum Client SDKs
Replies: 1
Last Post: July 7th, 2010, 10:50 AM
-
By devidasan in forum Adapter SDKs
Replies: 1
Last Post: March 17th, 2009, 11:00 AM
-
By markgoldin in forum General
Replies: 6
Last Post: September 28th, 2007, 01:15 PM
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 04:54 AM.
Bookmarks