I have an “ajax execute”-tag embedded in a commandLink-Tag in my JSF-File, which works pretty well.
My problem:
I want to execute this ajax-call directly by using a Get-Request.So far, I’m using only one html-file(index.html) without any parameters.
Is there any way to call an AJAX-tag directly by using url/get-parameters but keeping the ajax-tag in jsf?
Thanks guys
To answer the question in your question title, “How to redirect to Ajax-call in JSF?”, just add
?faces-redirect=trueto the navigation case outcome.To answer the question in your question body, “I want to execute this ajax-call directly by using a Get-Request”, replace the POST command link by a normal GET link
<h:link>or<h:outputLink>wherein you pass the parameters as<f:param>.They can be collected and processed in the target page by
<f:viewParam>or@ManagedProperty.