0

Just migrated from jboss 7.1 to wildfly 16 and PrimeFaces 4.0 to 6.2.

As I know PrimeFaces uses ajax with its elements such p:commandLink, p:commandButton, etc.

I have:

<p:commandLink action="#{exampleBean.redirrectSomewhere}">
     labelName
</p:commandLink>

After tapping at the commandLink nothing is happening, but if I add ajax='false' as an attribute, it is going to work fine.

Is there some way to get redirected using ajax?

Ask for extra information.

  • 2
    First thing as web developer would be to look in browser's JS console for any hints. – BalusC Feb 27 '20 at 17:39
  • also using `p:link` is better for redirecting except you want to execute and the redirect for that return a string in that method that matches this pattern `urltofile?faces-redirect=true` – fuggerjaki61 Feb 27 '20 at 17:47
  • 1
    Sure this worked in PF 4? And [mcve] please – Kukeltje Feb 28 '20 at 07:25
  • @BalusC Found out the solution via looking in the browser's **Network** tab. It's said there was render error. Somehow happened that after migration js script has just broken. Thank everybody for your help. – Artyom Lobko Mar 02 '20 at 13:07

1 Answers1

0

This is a known issue (at least to me). Use process="@this" to make sure that the ajax updates current component instead of the whole view. You can then remove ajax="false".

Noah
  • 68
  • 1
  • 7
  • 1
    This is not normal behaviour. Adding `process=@this` to make it work mask another underlying issue like va;idation failures. https://stackoverflow.com/questions/2118656/commandbutton-commandlink-ajax-action-listener-method-not-invoked-or-input-value – Kukeltje Feb 27 '20 at 20:02