JSF: Showing/Calling a dialog programatically
- by Sway
has anybody an idea to show/call a dialog programatically and add this to stage(actual browser window) ?! I am running in circles and cannot find a solution :/
More background what I want to do:
I want to trigger a database update every 2 hours. This I have done with a TimerTask... This works fine for me, the Timertask gets all the data I want from the database... Before this TimerTask is triggered I want to "lock" the screen for some seconds that no user(session scoped) can access the database(this I also know how this will work) ... My problem is that I don't know/ cannot find a way/ i am to stupid to call a dialog programatically ...
Any tips, hints would be very cool :)
Thanks a lot !
UPDATE:
I want to set this primefaces dialog:
Dialog dialog = new Dialog();
dialog.setAppendToBody(true);
dialog.setModal(true);
dialog.setVisible(true);
dialog.setWidgetVar("generatedDialog");
dialog.setId("fancyDialog");
dialog.setClosable(false);
dialog.setHeader("Getting latest information from the database");
dialog.setDynamic(true);
dialog.setResizable(false);
dialog.setDraggable(false);
How can I do that ? :/ How do I display it to my browser ? :o
Regards