Does anyone know how to display a modal panel using richfaces 3 from a backing bean. I can do modal window from user clicking a button but how do I display it from backing bean
On my page, I have a text field and ok button, user enter some number and send this number to backing bean, if some condition is met, than modal panel displays.
I thought about using HtmlComponentControl but no luck, here is code snippet
A modal panel is normally not controlled by the backing bean for the simple reason that J2EE/HTTP is not asynchronous (AJAX) is only "fake-asynchronous"), so there's no way a server-side bean could just up and decide to show or hide a dialog.
An IDE is no substitute for an Intelligent Developer.
Joined: Aug 05, 2007
Thank Tim for providing the reason. I have decide to do a redirect to a different page if the condition is met. However, if not using backing bean to call a pop-up directly, is it possible to call javascrip functions that creates a pop-up ( maybe a modal panel ) from the backing bean?
Using RichFaces, you define the dialog as part of the page View definition. It has to be in a separate form from the rest of the page, and any backing bean references in it are going to reflect the values from when the page was loaded, so if you want to do things on the page and have those changes reflected in the dialog, you should reRender the dialog before making it visible.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com