0

I am working on JSF with primefaces, i have been assigned a task to notify the browser when new message arrived in client desktop, its like Message alert.

I found some concepts p:poll, and p:notificationBar, p:growl but those are happeniing inside the browser window itself, when browser is minimized the user can't get notify the new message arrival.

My question is:

  • Is it possible to do it in JSF with the help of Javascript?
  • I don't know whether it is possible to notify to the client?

How can i enable notifications for window minimised state as well?

Aditya
  • 2,876
  • 4
  • 34
  • 30
kark
  • 4,763
  • 6
  • 30
  • 44

1 Answers1

0

You can make the title bar flash and on some platforms, even get the user's attention.

Make browser window blink in task Bar

Possible to flash a Browser window using Javascript?

This question shows part of your possible answer.

You should then use a to watch for the notification change. You could use the push framework, but that could be a bit of overkill on the network / connectivity side.

There are some solutions that work for only specific browsers. If you are doing this for your company intranet environment and everyone uses chrome or IE, there might be better solutions. Nonetheless, you should strive to do something that works on all compliant browsers (w3c compliant, that is).


There are some boundaries you should observe, regarding web apps in browser windows and what is the expected behavior. The user expects a minimized / offline browser window to sit quiet. If you are in a corporate environment, this could be waived, but for an app for the general public on the web, some people could (I would) be annoyed by this attention-seeking behavior (on a browser game, for example).

Community
  • 1
  • 1
Mindwin Remember Monica
  • 1,469
  • 2
  • 20
  • 35