Developed sample application - GlassPaneTest.zip is based on HR schema from Oracle XE database and implements one JSPX page with search form and results table. When you will open this application in JDeveloper 11g, be sure GlassPane reusable component (JAR file) is in correct path. You can check this in JSP Tag Libraries section by opening Project Properties for ViewController:
In this application I'm running two 'long' operations:
- filterEmployees(String firstName, String lastName) custom method from Application Module implementation class
- Simple Commit action
Here is the code from Backing bean, where Glasspane is launched and closed:
There are 3 additions comparing to original Frank Nimphius article:
- In onAction(ActionEvent actionEvent) method, I'm storing Id of button component that currently activates Glasspane. I'm doing this, in order to know what logic should I invoke in queryToLaunch(ClientEvent evt) method.
- When Glasspane component is activated, it calls back queryToLaunch(ClientEvent evt) method. In this method I'm accessing stored variable with currently pressed button Id and invoking appropriate functionality.
- In order to present visual changes when operation is finished, I'm calling refreshCurrentPage() method that is doing refresh of the current page:
When I'm running this application and doing Search operation, Glasspane appears and not allows to do any changes until operation is not finished:
After operation is finished and result is returned, Glasspane disappears and user can continue his/her work:
Same applies for Save button, during Commit operation screen is blocked and user can relax until operation will be done and Glasspane will disappear :)
Additionally, in ADF Faces RC its possible to use Blocking=True property for buttons. However in most cases its not useful, since user still can do changes on the screen.
Useful Update:
While integrating Glass Pane solution into our project, JDeveloper/ADF developer have found nice improvement. Instead of using refreshCurrentPage() method you can set PartialTriggers property for af:form tag and indicate dependency with Glass Pane popup (for example, in my sample application it will be - af:form partialtriggers="gp:busyPopup"). With this setting, page content is refreshed after popup is closed, without rerendering full page.
12 comments:
Hi Andrejus,
I can't compile your project , I am getting the below error, should I do something else to make it work.
Error: java.lang.NoClassDefFoundError: oracle/adfinternal/view/faces/taglib/region/RichDeclarativeComponentTag
Thanks
Hi,
I have tested, it compiles well in my JDeveloper TP4. However, little later I will try to compile the same application in completely fresh JDeveloper, on my Virtual machine. Will post update.
Thanks,
Andrejus
Hi,
I have tested on my VM with fresh JDeveloper 11g TP4 - application compiles and is running. I only was needed to add GlassPane.jar library to the project (as described in blog post).
Have you compiled it also?
Thanks,
Andrejus
I am getting the same compilation errors. I tested Frank Nimphius example but Im getting the same.
Well, it happens ;)
Try to reproduce described steps yourself and to build own application.
Andrejus
I was looking for same functionality in ADF Faces non RC (Jdev 10g). Is it possible? If yes could you post something on that.
Hi,
I dont think its easy to develop same functionality in 10g, since there is no Modal Popup component.
Regards,
Andrej
Hello Andrejus,
I have a requirement, where, I can enter an email id into a text box, and when I click on add, it temporarily adds into an adf table on the same page. Also, I have a search icon next to textbox, on click of which, opens a search window as a popup. I enter search criteria and hit search button, I lists the users. I can select multiple users and click on 'Done' button. This should add the selected list of users to the parent page's table.
Can you please point to some examples that address these ? Even those examples that would address parts of these requirements would be interesting to me.
Thanks in advance.
Best Regards,
Nataraja.
Hello Andrejus,
I am able to implement a solution for my requirement stated above. I managed the lifecycle of the list across the pages, and thank you, that I referred to your other blog on af:tableSelectMany, which gave invaluable inputs.
Best Regards,
nattu
Hello Andrejus,
I'm trying to run your example inside a region with page fragments. But the glasspane is not launched. If i call my region from a jspx and i include the glasspane in that page, the panel is launched but is generating a null pointer error, because can't call to the region action.
Is possible do it???
I mean, call a glasspane inside a region with page fragments?
Thanx!
Hi, Andrejus
Please, post a link to download the glasspane.jar. The link of frank nimphius, doesn't work anymore.
thk, y great blog...is such a useful
Hi Andrejus,
This sample is good.
I have one requirement, may be you can suggest me.
Open a popup (modal window) on a drag and drop operation between a table row and tree node.
Drag and drop is working fine, but need to show a popup window once dropEvent is started and close on completion.
Thanks,
Srikanth
Post a Comment