-
1. Re: How to detect AJAX request in a filter
ilya_shaikovsky Oct 15, 2009 4:57 AM (in response to spiau)hm.. why just not use ajax queue?
-
2. Re: How to detect AJAX request in a filter
spiau Oct 15, 2009 8:56 AM (in response to spiau)Hello Ilya,
If i've all well understood, ajax queue are used with <a4j:commandlink>, but the form is submitted with <h:commandLink>.
I've noticed some differences in using <a4j:commandlink> instead. For example, the mouse cursor is not changed to 'wait'. And my page doesn't use navigation-case (the page is reloaded by returning "null" and some messages are displayed), using <h:commandLink> doesn't reload the page. I don't want to make deep modifications in the existing jsf page and faces configuration in order to use that.
Is it possible to use a queue via h:commandLink, if not is there a way to detect ajax request?
I'm still aware for any other way to achieve this task.
Sebastien -
3. Re: How to detect AJAX request in a filter
spiau Oct 15, 2009 9:05 AM (in response to spiau)Ilya,
Moreover, I'm using RF 3.1.6... queue doesn't exist in this release.
It's an enough good reason not to use it!
Sebastien -
4. Re: How to detect AJAX request in a filter
ahoehma Oct 15, 2009 10:38 AM (in response to spiau)Each ajax-request will contain a parameter "AJAXREQUEST".
You find such a method in
org.ajax4jsf.webapp.BaseXMLFilter#isAjaxRequest(ServletRequest request)
The method is not public so you have to copy&paste the code :-( -
5. Re: How to detect AJAX request in a filter
nbelaevski Oct 15, 2009 10:48 AM (in response to spiau)3.1.6 includes queuing features for AJAX components - you can use them.
-
6. Re: How to detect AJAX request in a filter
spiau Oct 15, 2009 11:25 AM (in response to spiau)Thanks a lot everybody,
Detecting ajax request thru org.ajax4jsf.webapp.BaseXMLFilter#isAjaxRequest(ServletRequest request) works fine for me!
See you,
Sebastien