Cant change channel name for @PushEndpoint("/notify")

UI Components for JSF
Post Reply
dincofaces
Posts: 10
Joined: 06 Jan 2016, 14:36

06 Sep 2016, 15:05

Hello guys,

I implemented the sample Notify PF Push demo page, and it worked fine, but when i tried changing @PushEndpoint("/notify") channel name to @PushEndpoint("/test") (or any other name than notify) it doesnt trigger the broadcast. No matter what i do it only works with "notify".

If anyone else encountered this problem, i would be glad for any help.

Code: Select all

...
EventBus eventBus = EventBusFactory.getDefault().eventBus();
eventBus.publish("/test", "test string");
...

@Named
@Scope("application")
@PushEndpoint("/test")
public class EvaluationNotificationResource{

    @OnMessage(encoders = {JSONEncoder.class})
    public String onMessage(String notificationDetail) {
		return notificationDetail;
    }
	
}
JSF 2.2.10
PrimeFaces 5.3 (Spark Layout 2.1)

User avatar
andyba
Expert Member
Posts: 2473
Joined: 31 Mar 2011, 16:27
Location: Steinfeld, near Bremen/Osnabrück, DE
Contact:

06 Sep 2016, 18:28

Did you change the channel name in the <p:socket .../> component?
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now

dincofaces
Posts: 10
Joined: 06 Jan 2016, 14:36

07 Sep 2016, 08:14

It worked, thank you.
JSF 2.2.10
PrimeFaces 5.3 (Spark Layout 2.1)

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 36 guests