This means, each time when data change will happen in Popup window, main read-only table will be refreshed automatically. It works well, but there is one side effect with this approach, unfortunately. Table refresh will happen each time, when user simply selects another record. For simple tables thats Ok, but if we have complex screen with Master-Detail data - screen performance will be down immediately. It will refresh not only Master table, but all dependent Detail tables as well. So, we need to disable ppr for iterator binding:
The question now - how we trigger table refresh. Actually, it is quite straightforward - we need to set PartialTriggers dependency for Panel Collection from Popup and Popup Dialog components. We need to set it from both, because:
- Popup Dialog component triggers partial refresh on OK event (when we save data)
- Popup component triggers partial refresh on Popup Cancel event and on Popup fetch event (we can see newly inserted row)
Let's set PartialTriggers property for Panel Collection:
PartialTriggers property must be based on two components:
Popup component and Popup Dialog:
Let's see how it works now. There is one record selected in the table:
We select another one, and no table refresh happens - thats what we want:
We can edit data:
Table is refreshed after we close dialog and shows latest changes:
When new row is being inserted, table is pre-populated with new empty row:
Download sample application - TableDialogEdit4.zip.
27 comments:
great post
CUDA is a really very great tool for oracle user. I just love it's UI functionality.
your samples are just gr8.
Thanks :)
hi
Really grate .. but i have one doubt please send one link to build a popup functionality.
hi great post.. but i have some problems.. I can't delete / update/insert a data to database.. to sum up i couldnt make crud operations.. i download your application but i dont understand..
What error you are getting?
Andrejus
Hi Andrejus, I'm trying to replicate what you did, but I can get the bindings for the popup inputs right... where can I learn to do this???
Thanks in advance...
Call Red Samurai, if you will manage to find us, we will come for rescue :)
I have tried your sample inside the region, but when I clcik the 'delete' button, the all three lines in the table are disapper, only when i click edit and choose the 'cancel' button, then those not deleted lines are appear again. could you let me know what My problem is? Thanks!
What version of ADF you are using?
Andrejus
Helo Andrejus,
I have quite the same problem. I have a table with "edit all" editing mode. I use PPR for the iterator. There are some calculations in the table.
For example, value*percentage=result. Those three fields are the columns of the table, all are auto submit, and each has custom value change listener.
My problem is when I change the value (pressing TAB) )in value or percentage or result field, the table always refreshes and lost its focus for the next field.
What I want to achieve is that the table does not lose its focus for the next field when I press TAB.
Any suggestion for this?
Thank You.
Agung
You should not user PPR on iterator, but declare PPR on table column by yourself.
Andrejus
How to do that?
Thanks..
Hi, i got it worked out.. thanks a lot for your help..
Great ! :)
Hi Andrejus,
Thanks for samples. They are very useful. I have one question though. Do you have a sample for a CRUD ops for Master Table - Detail Table. I need the ops for both master and detail on the same page.No popups or page navigations.
Appreciate your help.
Cheers,
Ravi
You can try this sample, may be it will help - http://andrejusb.blogspot.com/2009/03/create-operation-for-master-detail.html
Both Master and Detail on same page.
Andrejus
Thumbs Up for your blog!
it helped me with my refresh master-detail tables problem.
set changeventpolicy to ppr and my details tables refresh when change the row on the master table.
Hi Andrejus,
I got really strange behaviour of crud operations in popup component. I'm using Jdev 11g R2.
So, I've got table and popup form for crud operations(like your sample). Both table and form relias on same view instance. And evertything runs smoothely if there's no af:selectonechoice component on form, but if I add some selectonechoice component which list is declared in BC, this selectonechoice control seems to lose all it's data(it hard to explain even). I'm not an adf expert, but also not a beginner, and this error bugs me alot, and tried some googling but withou any success. I've also tried to create new app from scratch and error remains. If you like I could mail you some HR sample which I've created for this purpose?
Regards,
Patrik
Hi Patrik,
Yes, please send sample app - I will look through it, may be I will spot something.
Andrejus
did anybody get null pointer exception on bindings following this example? the example works but when I my own usecase I get the exception. I am sure some of the things are not getting registered right. It would be nice to have a step by step process of this example. I just copied the code changed values in the source.
Please let me know, what exactly step by step? I will try to explain.
Andrejus
like, how did you create the popup and how did you tie the popup with the insert/others buttons? How is the backing bean tied to the popup?
You can find this info from Oracle dev guide... Its already well described there.
Andrejus
THank you for your tutorial...but i want you send me this tutorial describe step by step , how to build CRUD with ADF. I'm new in ADF faces.
Thank you
Hey Buddy,
I cant seem to find a way to stop AF: Meassages from auto closing if any kind or ppr or refresh happens on screen. Do you have any clues?
Post a Comment