Hiya,
Nice work on the ultima theme first of all.
I'm having trouble with <pu:menu /> in ultima 1.0.9 in primefaces 6.0 & 6.1.
If I use <pu:menu widgetVar="leftMenu" id="leftMenu" model="#{bean.menuModel}" /> with a menu model that builds something simple like....
DefaultMenuItem item = new DefaultMenuItem();
item.setValue("Home");
item.setUrl("");
item.setAjax(false);
menuModel.addElement(item);
for instance, I get...
12:18:57,090 ERROR [stderr] (default task-1) Caused by: java.lang.ClassCastException: org.primefaces.model.menu.DefaultMenuItem cannot be cast to javax.faces.component.UIComponent
12:18:57,090 ERROR [stderr] (default task-1) at org.primefaces.ultima.component.menu.UltimaMenuRenderer.encodeMenuItem(UltimaMenuRenderer.java:272)
12:18:57,090 ERROR [stderr] (default task-1) at org.primefaces.ultima.component.menu.UltimaMenuRenderer.encodeElement(UltimaMenuRenderer.java:72)
12:18:57,090 ERROR [stderr] (default task-1) at org.primefaces.ultima.component.menu.UltimaMenuRenderer.encodeElements(UltimaMenuRenderer.java:51)
12:18:57,090 ERROR [stderr] (default task-1) at org.primefaces.ultima.component.menu.UltimaMenuRenderer.encodeMarkup(UltimaMenuRenderer.java:41)
12:18:57,091 ERROR [stderr] (default task-1) at org.primefaces.component.menu.BaseMenuRenderer.encodeEnd(BaseMenuRenderer.java:114)
12:18:57,091 ERROR [stderr] (default task-1) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920)
12:18:57,091 ERROR [stderr] (default task-1) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)
12:18:57,091 ERROR [stderr] (default task-1) at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
12:18:57,091 ERROR [stderr] (default task-1) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)
12:18:57,091 ERROR [stderr] (default task-1) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
12:18:57,091 ERROR [stderr] (default task-1) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
12:18:57,091 ERROR [stderr] (default task-1) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
12:18:57,091 ERROR [stderr] (default task-1) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:458)
12:18:57,091 ERROR [stderr] (default task-1) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134)
12:18:57,091 ERROR [stderr] (default task-1) at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
12:18:57,091 ERROR [stderr] (default task-1) at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
12:18:57,091 ERROR [stderr] (default task-1) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
12:18:57,091 ERROR [stderr] (default task-1) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
12:18:57,091 ERROR [stderr] (default task-1) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
12:18:57,091 ERROR [stderr] (default task-1) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
If I use something like...
<pu:menu widgetVar="leftMenu" id="leftMenu" model="#{bean.menuModel}">
<p:menuitem value="Home" url="" ajax="false" />
</pu:menu>
it renders without the error.
<pu:menu> with a model not working under ultima 1.0.9
Forum rules
Please note that response time for technical support is within 3-5 business days.
Please note that response time for technical support is within 3-5 business days.
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Please see; viewtopic.php?f=42&t=49620
Github Profile: https://github.com/mertsincan
I'm having this same issue, and the thread you linked to doesn't appear to help. Has the jar not been updated to included the override function you want added? I have checked the everything has an id. Still at a loss and really need this working.
I'm using PrimeFaces 6.1.4 and Ultima Theme 1.0.9
Code: Select all
java.lang.ClassCastException: org.primefaces.model.menu.DefaultSubMenu cannot be cast to javax.faces.component.UIComponent
at org.primefaces.ultima.component.menu.UltimaMenuRenderer.encodeSubmenu(UltimaMenuRenderer.java:133)
at org.primefaces.ultima.component.menu.UltimaMenuRenderer.encodeElement(UltimaMenuRenderer.java:92)
at org.primefaces.ultima.component.menu.UltimaMenuRenderer.encodeElements(UltimaMenuRenderer.java:51)
at org.primefaces.ultima.component.menu.UltimaMenuRenderer.encodeMarkup(UltimaMenuRenderer.java:41)
at org.primefaces.ultima.component.menu.UltimaMenuRenderer.encodeEnd(UltimaMenuRenderer.java:323)
I have more information about this error. This error does not appear in 1.0.7 but does appear is 1.0.8 and 1.0.9 of the ultima-theme.jar file. Something with the menu badges caused the issues. Also where is the documentation for menu badges for PrimeFaces?
Thanks
Thanks
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Fixed for next Ultima version.
Github Profile: https://github.com/mertsincan
-
- Posts: 14
- Joined: 10 Nov 2010, 17:48
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Next week.
Regards.
Regards.
Github Profile: https://github.com/mertsincan
Hello Aragorn,
Excuseme, I Ask, when is possible have the fix to the menu model in the next release?
Thanks for your cooperation.
Juan Fernando
Excuseme, I Ask, when is possible have the fix to the menu model in the next release?
Thanks for your cooperation.
Juan Fernando
Juan Fernando Gomez M.
jfgomez@conasinf.com
jfgomez@conasinf.com
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Premium Templates Update
https://www.primefaces.org/premium-templates-update
https://www.primefaces.org/premium-templates-update
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 12 guests