native ClientWindow implementation

UI Components for JSF
Post Reply
mores
Posts: 64
Joined: 01 Dec 2010, 05:04

19 Oct 2021, 19:52

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 ?
prime faces 7.0.11
jsf 2.3.9
tomcat 9.0.50

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

19 Oct 2021, 20:51

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
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

mores
Posts: 64
Joined: 01 Dec 2010, 05:04

19 Oct 2021, 22:20

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 ?
Last edited by mores on 20 Oct 2021, 01:31, edited 1 time in total.
prime faces 7.0.11
jsf 2.3.9
tomcat 9.0.50

mores
Posts: 64
Joined: 01 Dec 2010, 05:04

19 Oct 2021, 22:36

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.
prime faces 7.0.11
jsf 2.3.9
tomcat 9.0.50

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

20 Oct 2021, 09:26

did you set DeltaSpike mode to DELEGATED?
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

mores
Posts: 64
Joined: 01 Dec 2010, 05:04

20 Oct 2021, 20:08

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)
prime faces 7.0.11
jsf 2.3.9
tomcat 9.0.50

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

21 Oct 2021, 09:13

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
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

mores
Posts: 64
Joined: 01 Dec 2010, 05:04

21 Oct 2021, 14:13

I added: https://github.com/mores/primefaces/blo ... onfig.java

And that seems to have fixed it.
Thanks for your help.
prime faces 7.0.11
jsf 2.3.9
tomcat 9.0.50

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 18 guests