Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it ok to have multiple primefaces socket tag on a page

Is it fine to have multiple tags with different channel on a page, for me it never worked. Is it a good use of prime push, Or is there any alternative to receive server push messages from multiple channels on a page. Here is piece of sample code what i have tried

<h:form>
  <p:socket channel="/pushMessages/#{session.id}">
     <p:ajax event="message" update=":navigation-form"/>
  </p:socket>
  <p:socket channel="/pushMessages/cart/#{session.id}">
   <p:ajax event="message" update=":message-form"/>
  </p:socket>
</h:form>
like image 634
Amit P Avatar asked Jun 05 '14 16:06

Amit P


1 Answers

Yes this works for me without a problem in PrimeFaces 6.2 (keep in mind that p:push is deprecated and the JSF 2.3 websockets is advised

like image 121
Kukeltje Avatar answered Oct 08 '22 05:10

Kukeltje