Solution:
1. Set popup's 'contentDelivery' property to 'lazyUncached'. Setting this property won't cache the data entered and won't restore the previously entered values. This is highly recommended to set contentDelivery="lazyUncached" for better performance as the popup will be loaded only on invocation but not at the time of page loading.
<af:popup id="popup1" binding="#{pageFlowScope.ClassSectionCreateBean.cancelWarningPopup}" contentDelivery="lazyUncached">
2. If the step1 doesn't work, drop af:resetActionListener as a sub-element to 'Cancel' button in the popup. ResetActionListener will reset the form fields in the popup. We can also call ResetActionListener programmatically in an actionlistener method as follows using Oracle's internal API.
public void saveSections(ActionEvent ae) { //Your logic here ResetActionListener ral = new ResetActionListener(); ral.processAction(ae); }
But, using internal API in the code is not encouraged. There is public API to achieve the same using the below code.
UIComponent comp = actionEvent.getComponent(); oracle.adf.view.rich.util.ResetUtils.reset(comp);
But, this Public API is not yet available in the latest publicly available Jdeveloper available and it'll be available in the upcoming versions. Until then, we need to go ahead using internal API only as shown in step2.
Helped me like anything..thanks :)
ReplyDelete@Asit Great to be of help :)
ReplyDeleteYou cannot add a resetActionListener to a popup and secondly, if you have a dialog inside the popup, you NEED TO have a actionListener to the dialog, else there will be a NullPointerException thrown when the popup is shown up (processAction is called internally if done declaratively and as processAction of ResetActionListener needs ActionEvent as a parameter).
ReplyDelete@Pavan: I mentioned that we can use af:resetActionListener as a sub-element to the 'Cancel' button to reset the fields in the form elements in the popup on clicking 'Cancel'. So, when the same popup is launched again, the previously entered values won't appear gain. The same could be achieved programatically using ResetUtils public API.
ReplyDeleteAnd, when the dialog is inside the popup, there is no necessity to have the listeners defined. I'm not really clear why a NPE will be thrown without a listener.
Hi Murali,
DeleteI have an LOV in a popup and both contentDelivery="lazyUncached" and have failed to reset the LOV. Any thoughts on that?
Hi Remya,
DeleteI am facing the same issue. Was the issue resolved?
Thanks
Swetha
I have 3 LOVs in my popup, and I am using the 'Ok' and "cancel' buttons that come with the dialog box. Out of the 3 LOVs, 3 rd LOV is dependent on the 1st LOV, and so it has a view accessor. The other 2 LOVs have no view accessors. I notice that on 'Cancel' and relaunch , the 3rd LOV i.e the one which has view accessor always shows blank, where as the other 2 independent LOVs render the right values. Is there any workaround to reset the LOV values on Cancel.
ReplyDeleteIn the Cancel logic, I tried re-executing the VA query and did a PPR on the LOV, but has no impact.
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThank you very much...
ReplyDelete20170303shizhong
ReplyDeletepandora uk
red bottoms shoes
true religion jeans
adidas uk
beats headphones
louboutin uk
pandora charms
hermes handbags
christian louboutin
nike factory store
red bottoms
On cancel the reset functionality is working perfectly fine. But when I click on OK button and save some data and try to open the popup , the form inside the popup is holding the previous set of field values.
ReplyDeletebirkin bag
ReplyDeletecoach factory outlet
nike outlet
michael kors outlet
nike air force 1 high
russell westbrook shoes
nike epic react flyknit
off white shoes
christian louboutin shoes
jordan retro
n3j27z0g90 k9z96p5e51 c0e84t9m55 o5g53b7l68 m0m47k4o44 a4b81i2y27
ReplyDeleteaydın
ReplyDeleteizmir
çankırı
giresun
konya
NTSK