According to Primefaces User Guide this method takes a json as parameter; but it seems has no effect at all.
Socket component is as follows:
Code: Select all
<p:socket channel="/people/#{account.info._id}" autoConnect="true" onMessage="socketHandler"
widgetVar="websocket"></p:socket>
<script>
var ws = PF('websocket');
// JSON.stringify is used based on atmosphere js solution!
// Also tested ws.push({ content: "hello" });
ws.push(JSON.stringify({ content: "hello" }));
</script>
Thanks in advance!