I'm able to display real time push messages from [RabbitMQ SockJS Server] on a browser using JQuery append whenever a new message arrives. However, I'm not able to figure out how to display the messages on Kendo UI mobile ListView (Kendo version 2013.3.1119) in descending order - newer messages at the top. This should be done without the user intervening to refresh the ListView.
I've created a test and posted on JSBin - [link]
Notes on JSBin example:
1). Stomp.js ([STOMP over websocket] and sockjs.js ([SockJS Javascript client]) is used to create the websocket client that captures messages from RabbitMQ SockJS Server.
For the JSBin example, I've appended my Javascript code that works with STOMP (listener-app.js - see - [http://pastebin.com/6qLxH8R6]) into the SockJS Javascript client (sockjs.js) as I'm not able to get the JSBin to work with listener-app.js in a separate file. The combined script is now stomp-listener-app.js. A note that I didn't have this problem when testing locally.
2). There are 2 nav buttons, "Real-time ListView" and "Debug Log". Debug Log captures stomp.js debug messages which will be displayed on "Debug Log" view using JQuery append. Real-time ListView view is suppose to display the STOMP messages in a listview - for which I'm unable to do so.
3). Although the JSBin example doesn't link to a live SockJS server, the STOMP library will still generate some error messages which can be captured by Kendo UI.
I'm a beginner in JS and Kendo UI. Please let me know if I had missed out anything. Any pointer will be very much appreciated. Thank you.
I've created a test and posted on JSBin - [link]
Notes on JSBin example:
1). Stomp.js ([STOMP over websocket] and sockjs.js ([SockJS Javascript client]) is used to create the websocket client that captures messages from RabbitMQ SockJS Server.
For the JSBin example, I've appended my Javascript code that works with STOMP (listener-app.js - see - [http://pastebin.com/6qLxH8R6]) into the SockJS Javascript client (sockjs.js) as I'm not able to get the JSBin to work with listener-app.js in a separate file. The combined script is now stomp-listener-app.js. A note that I didn't have this problem when testing locally.
2). There are 2 nav buttons, "Real-time ListView" and "Debug Log". Debug Log captures stomp.js debug messages which will be displayed on "Debug Log" view using JQuery append. Real-time ListView view is suppose to display the STOMP messages in a listview - for which I'm unable to do so.
3). Although the JSBin example doesn't link to a live SockJS server, the STOMP library will still generate some error messages which can be captured by Kendo UI.
I'm a beginner in JS and Kendo UI. Please let me know if I had missed out anything. Any pointer will be very much appreciated. Thank you.