Page 1 of 1
native ClientWindow implementation
Posted: 19 Oct 2021, 19:52
by mores
According to:
https://github.com/primefaces/primefaces/issues/6030
Primefaces now has a native ClientWindow implementation.
Is there an equivalent annotation for: org.apache.deltaspike.core.api.scope.WindowScoped; ? If so, what is it ?
Re: native ClientWindow implementation
Posted: 19 Oct 2021, 20:51
by tandraschko
Nope, there isnt as PrimeFaces doesnt maintain scopes or similar but you can use DS scope with PF ClientWindow
As you can read in your docs, ClientWindowScoped is implemented in Faces 4.0
Re: native ClientWindow implementation
Posted: 19 Oct 2021, 22:20
by mores
I have been testing out primefaces 11.0 with wildfly 25.0.0
Links break when I add DeltaSpike WindowScoped to a backing bean.
Is there some special configuration I need to apply to get these two to work well together or have I stumbled across a bug ?
Re: native ClientWindow implementation
Posted: 19 Oct 2021, 22:36
by mores
Here is the code showing the issue:
https://github.com/mores/primefaces/tree/addDeltaSpike
I trimmed down the showcase and added DeltaSpike....
The main page shows the url as:
Code: Select all
/primefaces-showcase-11.0.0-SNAPSHOT/support.xhtml?jfwid=6f1f9&dswid=-1687
links are missing the jfwid -
Code: Select all
/primefaces-showcase-11.0.0-SNAPSHOT/theming.xhtml?dswid=-1687
will throw a 500 error - but when I add back the jfwid - it works again.
Re: native ClientWindow implementation
Posted: 20 Oct 2021, 09:26
by tandraschko
did you set DeltaSpike mode to DELEGATED?
Re: native ClientWindow implementation
Posted: 20 Oct 2021, 20:08
by mores
I tried to, here is the file I added to the showcase.
https://github.com/mores/primefaces/blo ... onfig.java
That seems to resolve links if you already have a page loaded in your broswer, but if you try to visit: primefaces-showcase-11.0.0-SNAPSHOT/
without a page - it throws an exception:
Code: Select all
14:07:18,625 ERROR [io.undertow.request] (default task-7) UT005023: Exception handling request to /primefaces-showcase-11.0.0-SNAPSHOT/: java.lang.NullPointerException
at com.sun.jsf-impl@2.3.14.SP04//com.sun.faces.context.flash.ELFlash.loggingGetPhaseMapForWriting(ELFlash.java:864)
at com.sun.jsf-impl@2.3.14.SP04//com.sun.faces.context.flash.ELFlash.setKeepMessages(ELFlash.java:333)
at deployment.primefaces-showcase-11.0.0-SNAPSHOT.war//org.apache.deltaspike.jsf.impl.util.JsfUtils.saveFacesMessages(JsfUtils.java:295)
at deployment.primefaces-showcase-11.0.0-SNAPSHOT.war//org.apache.deltaspike.jsf.impl.listener.request.DeltaSpikeExternalContextWrapper.redirect(DeltaSpikeExternalContextWrapper.java:51)
at javax.faces.api@3.0.0.SP04//javax.faces.context.ExternalContextWrapper.redirect(ExternalContextWrapper.java:597)
at deployment.primefaces-showcase-11.0.0-SNAPSHOT.war//org.primefaces.clientwindow.PrimeClientWindow.decode(PrimeClientWindow.java:82)
at deployment.primefaces-showcase-11.0.0-SNAPSHOT.war//org.primefaces.clientwindow.PrimeClientWindowLifecycle.attachWindow(PrimeClientWindowLifecycle.java:50)
Re: native ClientWindow implementation
Posted: 21 Oct 2021, 09:13
by tandraschko
hmm, yep
dont know if either DS or PF can fix it but try to set false here in the config by specializing it:
https://github.com/apache/deltaspike/bl ... g.java#L63
Re: native ClientWindow implementation
Posted: 21 Oct 2021, 14:13
by mores
I added:
https://github.com/mores/primefaces/blo ... onfig.java
And that seems to have fixed it.
Thanks for your help.