Hello,
I'm trying JSF 2.3's new WebSocket support.
When I declare onmessage function above of <f:websocket declaration, it
finds referenced function. So the following usage works;
<script type="application/javascript">
function onMessage(message) {
document.getElementById('holder').innerText = message;
}
</script>
<f:websocket
channel="push"
onmessage="onMessage"/>
But, when I move the script declaration below the <f:websocket, it doesn't
find onMessage function. So the following usage doesn't work;
<f:websocket
channel="push"
onmessage="onMessage"/>
<script type="application/javascript">
function onMessage(message) {
document.getElementById('holder').innerText = message;
}
</script>
I think it would be good if the last usage supported.
Thanks.
--
Rahman USTA
Istanbul JUG
https://github.com/rahmanusta