java - How to close Popup Behavior within time interval in ADF Mobile? -



java - How to close Popup Behavior within time interval in ADF Mobile? -

i closing popup using closepopupbehavior. how can close popup within 5 seconds after invoking popup.

below amx page

<amx:view xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:amx="http://xmlns.oracle.com/adf/mf/amx" xmlns:dvtm="http://xmlns.oracle.com/adf/mf/amx/dvt"> <amx:panelpage id="pp1"> <amx:facet name="header"> <amx:outputtext value="header" id="ot1"/> </amx:facet> <amx:facet name="primary"> <amx:commandbutton id="cb1"/> </amx:facet> <amx:facet name="secondary"> <amx:commandbutton id="cb2"/> </amx:facet> <amx:commandbutton text="show popup - using java" id="cb3" actionlistener="#{test.btnclick}"> <amx:showpopupbehavior id="spb1" popupid="p1" align="after" alignid="cb3"/> </amx:commandbutton> </amx:panelpage> <amx:popup id="p1"> <amx:panelgrouplayout id="pgl2" layout="vertical"> <amx:outputtext value="i called java." id="ot2"/> </amx:panelgrouplayout> <amx:commandbutton text="close" id="cb5"> <amx:closepopupbehavior id="cpb1" popupid="p1" type="action"/> </amx:commandbutton> </amx:popup> </amx:view>

below managed bean

public class testbean{ public void btnclick(actionevent actionevent) { adfmfcontainerutilities.invokecontainerjavascriptfunction("feature1", "showpopup", new object[] {} ); } }

if possible close using javascript post answer.thank much

i see using illustration mentioned here http://www.jobinesh.com/2013/12/adfmobile-programatically-invoking.html jobinesh.

in order close popup after let's 5 seconds need add together below function in js file

(function () { hidepopup = function () { var element = document.getelementbyid("cb5"); customtriggerevent(element, "touchstart"); customtriggerevent(element, "touchend"); } var customtriggerevent = function (eventtarget, eventtype, triggerextra) { var evt = document.createevent("htmlevents"); evt.initevent(eventtype, true, true); evt.view = window; evt.altkey = false; evt.ctrlkey = false; evt.shiftkey = false; evt.metakey = false; evt.keycode = 0; evt.charcode = 'a'; if (triggerextra != null) evt.triggerextra = triggerextra; eventtarget.dispatchevent(evt); }; })();

where "cb5" id of button closepopupbehavior , @ end of showpopup js function need add together below line

settimeout(function(){hidepopup();}, 5000);

java javascript oracle-adf oracle-adf-mobile

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -