Re: [Trinidad] check for ppr with javascript
Hi Walter, Walter Mourão-2 wrote: Makes the generalPPRMonitor method function be executed only when the PPR starts/stops. ... but i want to monitor *non* ppr-request!? Daniel -- View this message in context: http://www.nabble.com/-Trinidad--check-for-ppr-with-javascript-tp20957976p21029570.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [Trinidad] check for ppr with javascript
No idea... maybe using the page onload event. Walter Mourão http://waltermourao.com.br http://arcadian.com.br http://oriens.com.br On Tue, Dec 16, 2008 at 7:10 AM, Daniel Niklas co...@dniklas.de wrote: Hi Walter, Walter Mourão-2 wrote: Makes the generalPPRMonitor method function be executed only when the PPR starts/stops. ... but i want to monitor *non* ppr-request!? Daniel -- View this message in context: http://www.nabble.com/-Trinidad--check-for-ppr-with-javascript-tp20957976p21029570.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [Trinidad] check for ppr with javascript
Hi, perhaps i found a solution. Register an event-Handler on form-elements and then check for varialbe busy: if (typeof busy == 'undefined') // non-ppr-request This seems to work... Daniel :-) -- View this message in context: http://www.nabble.com/-Trinidad--check-for-ppr-with-javascript-tp20957976p21033978.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [Trinidad] check for ppr with javascript
http://myfaces.apache.org/trinidad/devguide/ppr.html#Javascript%20APIs%20for%20PPR sample code: ... function generalPPRMonitor(state) { if (state == TrRequestQueue.STATE_BUSY) { showDivWait(); } else { closeDivWait(); } } function generalOnLoad() { var requestQueue = TrPage.getInstance().getRequestQueue(); requestQueue.addStateChangeListener(generalPPRMonitor); } ... trh:body onload=generalOnLoad(); ... Walter Mourão http://waltermourao.com.br http://arcadian.com.br http://oriens.com.br On Thu, Dec 11, 2008 at 1:44 PM, Daniel Niklas [EMAIL PROTECTED] wrote: Hi, how can i check if a submit is/becomes a ppr-request? I want to register a (javascript) Event-Listener on form-tags and check if the submitted form is/becomes a ppr-submit. Is there anywhere a javascript documentation? (I know the ppr-site in developers guide, allready...) Any suggestions? Thanks, Daniel -- View this message in context: http://www.nabble.com/-Trinidad--check-for-ppr-with-javascript-tp20957976p20957976.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [Trinidad] check for ppr with javascript
Hi, Walter Mourão-2 wrote: function generalPPRMonitor(state) { if (state == TrRequestQueue.STATE_BUSY) { showDivWait(); } else { closeDivWait(); } } I'm not sure, but i think, that i wouldn't get a notification if it isn't a ppr request?! Daniel -- View this message in context: http://www.nabble.com/-Trinidad--check-for-ppr-with-javascript-tp20957976p20958883.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [Trinidad] check for ppr with javascript
Hi, the code: ... function generalOnLoad() { var requestQueue = TrPage.getInstance().getRequestQueue(); requestQueue.addStateChangeListener(generalPPRMonitor); } ... Makes the generalPPRMonitor method function be executed only when the PPR starts/stops. Walter Mourão http://waltermourao.com.br http://arcadian.com.br http://oriens.com.br On Thu, Dec 11, 2008 at 2:26 PM, Daniel Niklas co...@dniklas.de wrote: Hi, Walter Mourão-2 wrote: function generalPPRMonitor(state) { if (state == TrRequestQueue.STATE_BUSY) { showDivWait(); } else { closeDivWait(); } } I'm not sure, but i think, that i wouldn't get a notification if it isn't a ppr request?! Daniel -- View this message in context: http://www.nabble.com/-Trinidad--check-for-ppr-with-javascript-tp20957976p20958883.html Sent from the MyFaces - Users mailing list archive at Nabble.com.