PF13 compatible version

Forum rules
Please note that response time for technical support is within 3-5 business days.
jepsar
Posts: 166
Joined: 03 Sep 2014, 11:41
Location: NL / BE
Contact:

01 Jun 2023, 17:40

As 13 RC1 has been released, would it be possible to release a 13 compatible version of the theme as well (for testing purposes)?
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub: https://github.com/jepsar
Spotify: 90s Rave, Acid, Trance, House

olgubasak
Posts: 98
Joined: 05 Jan 2023, 11:05

06 Jun 2023, 16:12

Hi Jepsar ,

I will have a discussion with my colleagues about the issue you mentioned this week. Following that, we can place it for testing purposes as you wish.

Best Regards,

jepsar
Posts: 166
Joined: 03 Sep 2014, 11:41
Location: NL / BE
Contact:

16 Jun 2023, 17:12

Any news here?

I was feeling lucky, and tried with PF 13 RC1 with Diamond 4.1.0, but got this error:

ERROR: class org.primefaces.diamond.component.DiamondMenuRenderer tried to access private method 'org.primefaces.util.WidgetBuilder org.primefaces.util.WidgetBuilder.init(java.lang.String, java.lang.String, java.lang.String)' (org.primefaces.diamond.component.DiamondMenuRenderer and org.primefaces.util.WidgetBuilder are in unnamed module of loader org.glassfish.web.loader.WebappClassLoader @36a98ac8)
java.lang.IllegalAccessError: class org.primefaces.diamond.component.DiamondMenuRenderer tried to access private method 'org.primefaces.util.WidgetBuilder org.primefaces.util.WidgetBuilder.init(java.lang.String, java.lang.String, java.lang.String)' (org.primefaces.diamond.component.DiamondMenuRenderer and org.primefaces.util.WidgetBuilder are in unnamed module of loader org.glassfish.web.loader.WebappClassLoader @36a98ac8)

So, changes are required.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub: https://github.com/jepsar
Spotify: 90s Rave, Acid, Trance, House

jepsar
Posts: 166
Joined: 03 Sep 2014, 11:41
Location: NL / BE
Contact:

16 Jun 2023, 17:22

PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub: https://github.com/jepsar
Spotify: 90s Rave, Acid, Trance, House

jepsar
Posts: 166
Joined: 03 Sep 2014, 11:41
Location: NL / BE
Contact:

16 Jun 2023, 17:28

You need to change the renderer to
```java
WidgetBuilder wb = getWidgetBuilder(context);
wb.init("Diamond", menu)
.attr("statefulScroll", menu.isStatefulScroll());
wb.finish();
```
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub: https://github.com/jepsar
Spotify: 90s Rave, Acid, Trance, House

olgubasak
Posts: 98
Joined: 05 Jan 2023, 11:05

22 Jun 2023, 13:19

Hi ,

I apologize for the late reply, we will have the meeting tomorrow, and I will inform you immediately after the meeting. Thank you for the solutions.

Best Regards,

jepsar
Posts: 166
Joined: 03 Sep 2014, 11:41
Location: NL / BE
Contact:

09 Jul 2023, 14:20

Any news on this yet?
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub: https://github.com/jepsar
Spotify: 90s Rave, Acid, Trance, House

jepsar
Posts: 166
Joined: 03 Sep 2014, 11:41
Location: NL / BE
Contact:

18 Jul 2023, 19:56

As PrimeFaces 13 will be released this week, the question will be to get a compatible version so we can upgrade (I really would have liked to test first). I hope we don't need to wait as long as we had to wait for a version 12 compatible version.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub: https://github.com/jepsar
Spotify: 90s Rave, Acid, Trance, House

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

02 Aug 2023, 23:32

Hi @jasper,

Could you please try;

Code: Select all

// DiamondMenuRenderer.java
...
    @Override
    protected void encodeScript(FacesContext context, AbstractMenu abstractMenu) throws IOException {
        DiamondMenu menu = (DiamondMenu) abstractMenu;
        String clientId = menu.getClientId(context);
        HttpServletRequest req = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
        String pathname = req.getContextPath() + req.getServletPath();
        
        ResponseWriter rw = context.getResponseWriter();
        rw.startElement("script", null);
        rw.writeAttribute("id", clientId + "_s", null);
        rw.writeAttribute("type", "text/javascript", null);
        rw.write("$(function(){");
            rw.write("PrimeFaces.cw(\"Diamond\",\"");
            rw.write(menu.resolveWidgetVar());
            rw.write("\",{id:\"");
            rw.write(clientId);
            rw.write("\",");
            // attrs
            rw.write("statefulScroll:");
            rw.write(String.valueOf(menu.isStatefulScroll()));
            rw.write(",");
            rw.write("pathname:\"");
            rw.write(pathname);
            rw.write("\"");
            
            rw.write("});");
        rw.write("});");
        rw.endElement("script");
    }
...

jepsar
Posts: 166
Joined: 03 Sep 2014, 11:41
Location: NL / BE
Contact:

03 Aug 2023, 10:00

The Java built issue has been resolved. We reverted the change in the 13 code tree and made the method deprecated.

I guess now it's just a matter of getting the CSS updated.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub: https://github.com/jepsar
Spotify: 90s Rave, Acid, Trance, House

Post Reply

Return to “Diamond - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests