Page 1 of 2
PF13 compatible version
Posted: 01 Jun 2023, 17:40
by jepsar
As 13 RC1 has been released, would it be possible to release a 13 compatible version of the theme as well (for testing purposes)?
Re: PF13 compatible version
Posted: 06 Jun 2023, 16:12
by olgubasak
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,
Re: PF13 compatible version
Posted: 16 Jun 2023, 17:12
by jepsar
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.
Re: PF13 compatible version
Posted: 16 Jun 2023, 17:22
by jepsar
Re: PF13 compatible version
Posted: 16 Jun 2023, 17:28
by jepsar
You need to change the renderer to
```java
WidgetBuilder wb = getWidgetBuilder(context);
wb.init("Diamond", menu)
.attr("statefulScroll", menu.isStatefulScroll());
wb.finish();
```
Re: PF13 compatible version
Posted: 22 Jun 2023, 13:19
by olgubasak
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,
Re: PF13 compatible version
Posted: 09 Jul 2023, 14:20
by jepsar
Any news on this yet?
Re: PF13 compatible version
Posted: 18 Jul 2023, 19:56
by jepsar
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.
Re: PF13 compatible version
Posted: 02 Aug 2023, 23:32
by mert.sincan
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");
}
...
Re: PF13 compatible version
Posted: 03 Aug 2023, 10:00
by jepsar
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.