Hi Mone! Thanks for the reply, I've connected between metadata adapter and the data adapter through the setFeed. On the web client, I use "DynaScrollTable" to recieve messages from the "NotifyUserMessage" function on the metada adapter. Here is my code:
var group = "im_" + userName;
var schema = ["fromNick", "toNick", "message"];
var imTable = new DynaScrollTable(group, schema, "DISTINCT");
imTable.setDataAdapter("PROXY_HS_MARKETDATA");
imTable.setSnapshotRequired(false);
imTable.setPushedHtmlEnabled(false);
imTable.setMaxDynaRows("unlimited");
imTable.setUpwardScroll(true);
imTable.setAutoScroll("ELEMENT","message_scroll");
imTable.onChangingValues = function(domNode, visualUpdateInfo) {
if (visualUpdateInfo != null) {
var from = visualUpdateInfo.getServerValue("fromNick");
//Don't recieve message from DataAdater
alert(from);
}
};
pushPage.addTable(imTable, "messages");
And here is DataAdapter Code:
// Call by Metadata to notify to client
public void sendMessage(string from, string to, string message)
{
if (localListener != null)
{
IDictionary dic = new Hashtable();
dic.Add("fromNick", from);
dic.Add("toNick", to);
dic.Add("message", message);
localListener.OnUpdate(dic);
}
}
I don't know why the web client doesn't receive any messages.
Thanks and Regards!