jsf - af:popup is throwing required field validation error as soon as it opens (Jdev version 11.1.2.4) -
today came across 1 exception not able find root cause error unpredictable.
my requirement simple, developing adf form performing simple dml operation. adding new record , using popup. issue comes here, whenever click on add button popup opens , automatically throws required field validations. please go through below popup code reference. (jdev version 11.1.2.4)
<af:popup childcreation="deferred" autocancel="enabled" id="p1" popupfetchlistener="#{pageflowscope.bean.onpopupfetch}" contentdelivery="lazyuncached" popupcanceledlistener="#{pageflowscope.bean.oncancelpopup}"> <af:dialog id="d1" dialoglistener="#{pageflowscope.bean.ondialoglistener}" type="okcancel"> <af:panelformlayout id="pfl1"> <af:inputtext value="#{bindings.code.inputvalue}" label="#{bindings.code.hints.label}" required="#{bindings.code.hints.mandatory}" columns="#{bindings.code.hints.displaywidth}" maximumlength="#{bindings.code.hints.precision}" shortdesc="#{bindings.code.hints.tooltip}" id="it1"> <f:validator binding="#{bindings.code.validator}"/> <af:convertnumber groupingused="false" pattern="#{bindings.code.format}"/> </af:inputtext> <af:selectonechoice value="#{bindings.notifind1.inputvalue}" label="#{bindings.notifind1.label}" required="#{bindings.notifind1.hints.mandatory}" shortdesc="#{bindings.notifind1.hints.tooltip}" id="soc1"> <f:selectitem itemlabel="received" itemvalue="r" id="si2"/> <f:selectitem itemlabel="send" itemvalue="s" id="si1"/> </af:selectonechoice> <af:inputtext value="#{bindings.blockoccur.inputvalue}" label="#{bindings.blockoccur.hints.label}" required="#{bindings.blockoccur.hints.mandatory}" columns="#{bindings.blockoccur.hints.displaywidth}" maximumlength="#{bindings.blockoccur.hints.precision}" shortdesc="#{bindings.blockoccur.hints.tooltip}" id="it3"> <f:validator binding="#{bindings.blockoccur.validator}"/> <af:convertnumber groupingused="false" pattern="#{bindings.blockoccur.format}"/> </af:inputtext> <af:inputtext value="#{bindings.name.inputvalue}" label="#{bindings.name.hints.label}" required="#{bindings.name.hints.mandatory}" columns="#{bindings.name.hints.displaywidth}" maximumlength="#{bindings.name.hints.precision}" shortdesc="#{bindings.name.hints.tooltip}" id="it4"> <f:validator binding="#{bindings.name.validator}"/> </af:inputtext> </af:panelformlayout> <f:facet name="buttonbar"/> </af:dialog> </af:popup> <af:commandbutton text="add" id="cbinsert" immediate="true"> <af:showpopupbehavior popupid="::p1" triggertype="action" align="afterend"/> </af:commandbutton>
in popupfetchlistener performing simple createinsert operation , on cancel listener rollback.
kindly suggest solution issue. using same approach in 2-3 places there not throwing error in case not able resolve this.
tried workarounds: 1. tried keeping immediate= true fields in popup, issue got resolved not throw validation error if user didnt enter required field, not desirable.
- keeping skipvalidation= true/skipdatacontrol. not working
please let me know if knows better approach.
thanks in advance.
instead of using createinsert use create operation .
Comments
Post a Comment