Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

223
Views
JSF-Primefaces 6.0 Push

i have a question.

do i need a new request to get the new value of a bean attribute? I want to refresh the outputtext by push without reloading the page.

<p:outputLabel value="PushString"/><h:outputText id="out" value="#{testController.pushString}" styleClass="display" />
<p:socket onMessage="handleMessage" channel="/imageStream" />

i have a form with an outputtext which should get the text from server by primefaces push.

PushEndpoint:

@PushEndpoint("/imageStream")
public class ImagePushEndpoint{     
    @OnMessage(encoders = {JSONEncoder.class})
    public String onMessage (String message){
        System.out.println("PushEndpoint: "+message);
        return message;
    }
}

And in the ManagedBean the eventBus publishes the String to the endpoint:

eventBus.publish("/imageStream", pushString);

But i have to reload the page to get the new Value of the String.

My ApplicationServer is an embedded Jetty 9.3.

Do i have to configure the webappContext for primefaces push?

<dependency>
    <groupId>org.atmosphere</groupId>
    <artifactId>atmosphere-runtime</artifactId>
    <version>2.4.8</version>
</dependency>
<dependency>
    <groupId>org.atmosphere</groupId>
    <artifactId>atmosphere-runtime-native</artifactId>
    <version>2.4.8</version>
</dependency>
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!