Bumping this back up, I have also been looking to do this. In my specific case, I would like to display a modal for error messages. I have a template that every facelet in my application uses. I have the error modal defined by the template. How would I display it programmatically? For the sake of simplicity, lets say the backing bean action that could result in an error returns true on success, and false on failure.
Thanks in advance for any help.
you may use data attribute - serialize the boolean property which will be the flag. After - check the flag from JS and call the wiindow if needed.
I was unable to find any information on the data attribute. Care to be more specific?
Please look at
It's your choice: In the developer guide and in the live demo you can read a lot about things you need to know concerning the suggested way.
Perhaps a look in the cookbook is useful too. For example we are currently working on a howto for ajax communication with jsFunction and JSON. The
data-attribute plays a key role.
Of course I can give an answer more precise if you post a code snippet with the best solution you currently have.