On my current project, who I wrote several blog posts before, I was missing something, the possibility to notify users when a backend process was finished.
After I read the post of Jesse Gallagher, Generating Toaster, dGrowl, etc. Notifications From Server Code, I was wondering if I can use this principle for Growl.
I found a JQuery Growl plugin who implement the Bootstrap alert classes.
So I created a managed Bean, Growl, added it to faces-config.xml, so I can use it everywhere in my application.
To the Growl class I added the toaster method from the post of Jesse and made some modifications, so it suits my needs.
[dropshadowbox align=”none” effect=”lifted-both” width=”500px” height=”” background_color=”#ffffff” border_width=”1″ border_color=”#dddddd” ][/dropshadowbox]
Now I am able to add a message to my application, by one line of code
[dropshadowbox align=”none” effect=”lifted-both” width=”600px” height=”” background_color=”#ffffff” border_width=”1″ border_color=”#dddddd” ][/dropshadowbox]
With the following result
[dropshadowbox align=”none” effect=”lifted-both” width=”600px” height=”” background_color=”#ffffff” border_width=”1″ border_color=”#dddddd” ][/dropshadowbox]
For possible future use I also implemented a method who reads all the FacesMessages from the FacesConext and display all the messages with the right style class for every Severity Level.
Hello Frank,
I am recommending this list of bootstrap resources available at twittstrap
Regards