ADF Table with CRUD Operations in ADF Form
995542Mar 7 2013 — edited Mar 8 2013Hi everybody and thanks in advance for your help,
I'm running JDev 11.1.1.6 and I don't know how to achieve the following requirement:
I have two tables, in a Master-Detail solution: selecting a row from the master table, makes available related rows (according to a FK) from the Detail table. Well, for edition, I have a button in each row of a column which has this implementation and works great:
Button => showPopUpBehaviour => popup => dialog:
+<af:popup id="p1"+
+popupFetchListener="#{popUpEdit.editPopupFetchListener}"+
+contentDelivery="lazyUncached">+
+<af:dialog id="d2" title="Title"+
+affirmativeTextAndAccessKey="#{rcdcontroladorBundle.GUARDAR}"+
+cancelTextAndAccessKey="#{rcdcontroladorBundle.VOLVER}">+
+<!-- INPUT TEXTS -->+
+</af:dialog>+
+</af:popup>+
The bean code is:
+public void editPopupFetchListener(PopupFetchEvent popupFetchEvent) {+
+if (popupFetchEvent.getLaunchSourceClientId().contains("cbInsert")) {+
+BindingContainer bindings = getBindings();+
+OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");+
+operationBinding.execute();+
+}+
+}+
But for new records, I can't manage to bring the dialog with a new record (there's a autonumeric id defined) and to let the user to complete the fields and submit. That would be the requirement but I couldn't achieve it. I could do this:
Button (Action Listener): +#{bindings.CreateInsert1.execute}+
Afterwards, user can use the edit option in the row inserted and commit.
I have searched a lot, but solutions I found were for Forms or Table CRUD implementations, not a combination of both. For this reason, I will appreciate your help. If you need additional code, more information or anything else, please ask me and I will answer as soon as I can.
Thanks,
Mariano.