menu does not render

Locked
joao_arthur
Posts: 36
Joined: 09 Mar 2015, 15:40

08 Feb 2016, 01:12

my rio theme does not render the menu, follow the documentation to install the theme but the menu does not appear, what should I do?

User avatar
aragorn
Posts: 3556
Joined: 29 Jun 2013, 12:38

08 Feb 2016, 09:55

What do you have Rio Layout+theme or Only Theme? If Rio Layout+theme, please check the following files;
- RioMenu.java (org/primefaces/rio/component/menu/)
- RioMenuRenderer.java (org/primefaces/rio/component/menu/)
- layoutmenu.xhtml (webapp/WEB-INF)
- in faces-config.xml

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
    
    <name>primefaces-rio</name>
    
    <component>
        <component-type>org.primefaces.component.RioMenu</component-type>
        <component-class>org.primefaces.rio.component.menu.RioMenu</component-class>
    </component>
    
    <render-kit>
        <renderer>
            <component-family>org.primefaces.component</component-family>
            <renderer-type>org.primefaces.component.RioMenuRenderer</renderer-type>
            <renderer-class>org.primefaces.rio.component.menu.RioMenuRenderer</renderer-class>
        </renderer>
    </render-kit>
    
</faces-config>

joao_arthur
Posts: 36
Joined: 09 Mar 2015, 15:40

08 Feb 2016, 12:50

layout and theme

when I put this information in faces-config him the error in this line: <name>primefaces-rio</name>

User avatar
aragorn
Posts: 3556
Joined: 29 Jun 2013, 12:38

08 Feb 2016, 13:55

I think you can remove <name>primefaces-rio</name>.

bmlikota
Posts: 2
Joined: 28 Dec 2018, 12:05

05 Jan 2019, 09:52

Hello, please help.

I have problems with template for omega theme. I followed steps from here https://www.primefaces.org/omega/docs.x ... 4091.node0.
After I set everything, sidebar menu is not rendered.

I tried to add

Code: Select all

<component>
        <component-type>org.primefaces.component.OmegaMenu</component-type>
        <component-class>org.primefaces.omega.component.menu.OmegaMenu</component-class>
    </component>

    <render-kit>
        <renderer>
            <component-family>org.primefaces.component</component-family>
            <renderer-type>org.primefaces.component.OmegaMenuRenderer</renderer-type>
            <renderer-class>org.primefaces.omega.component.menu.OmegaMenuRenderer</renderer-class>
        </renderer>
    </render-kit>
to faces-config.xml and I got errors:

Code: Select all

SEVERE: Critical error during deployment: 
com.sun.faces.config.ConfigurationException: 
  Source Document: file:/home/bmlikota/Workspaces/workspace-sts-3.9.2.RELEASE/.metadata/.plugins/org.eclipse.wst.server.core/tmp2/wtpwebapps/power/WEB-INF/faces-config.xml
  Cause: Unable to create a new instance of 'org.primefaces.omega.component.menu.OmegaMenuRenderer': javax.faces.FacesException: org.primefaces.omega.component.menu.OmegaMenuRenderer
	at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:382)
	at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:291)
	at com.sun.faces.config.processor.RenderKitConfigProcessor.addRenderers(RenderKitConfigProcessor.java:323)
	at com.sun.faces.config.processor.RenderKitConfigProcessor.process(RenderKitConfigProcessor.java:180)
	at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:155)
	at com.sun.faces.config.processor.ManagedBeanConfigProcessor.process(ManagedBeanConfigProcessor.java:271)
	at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:155)
	at com.sun.faces.config.processor.ValidatorConfigProcessor.process(ValidatorConfigProcessor.java:121)
	at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:155)
	at com.sun.faces.config.processor.ConverterConfigProcessor.process(ConverterConfigProcessor.java:127)
	at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:155)
	at com.sun.faces.config.processor.ComponentConfigProcessor.process(ComponentConfigProcessor.java:118)
	at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:155)
	at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:403)
	at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:155)
	at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:138)
	at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:155)
	at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:246)
	at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:443)
	at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:237)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4641)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5109)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1432)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1422)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:831)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1432)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1422)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:801)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:695)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
Caused by: javax.faces.FacesException: org.primefaces.omega.component.menu.OmegaMenuRenderer
	at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:431)
	at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:304)
	... 49 more
Caused by: java.lang.ClassNotFoundException: org.primefaces.omega.component.menu.OmegaMenuRenderer
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1328)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at com.sun.faces.util.Util.loadClass(Util.java:333)
	at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:423)
	... 50 more

Jan 05, 2019 8:42:32 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class [com.sun.faces.config.ConfigureListener]
java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: 
  Source Document: file:/home/bmlikota/Workspaces/workspace-sts-3.9.2.RELEASE/.metadata/.plugins/org.eclipse.wst.server.core/tmp2/wtpwebapps/power/WEB-INF/faces-config.xml
  Cause: Unable to create a new instance of 'org.primefaces.omega.component.menu.OmegaMenuRenderer': javax.faces.FacesException: org.primefaces.omega.component.menu.OmegaMenuRenderer
	at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:315)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4641)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5109)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1432)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1422)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:831)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1432)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1422)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:801)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:695)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
Caused by: com.sun.faces.config.ConfigurationException: 
  Source Document: file:/home/bmlikota/Workspaces/workspace-sts-3.9.2.RELEASE/.metadata/.plugins/org.eclipse.wst.server.core/tmp2/wtpwebapps/power/WEB-INF/faces-config.xml
  Cause: Unable to create a new instance of 'org.primefaces.omega.component.menu.OmegaMenuRenderer': javax.faces.FacesException: org.primefaces.omega.component.menu.OmegaMenuRenderer
	at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:382)
	at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:291)
	at com.sun.faces.config.processor.RenderKitConfigProcessor.addRenderers(RenderKitConfigProcessor.java:323)
	at com.sun.faces.config.processor.RenderKitConfigProcessor.process(RenderKitConfigProcessor.java:180)
	at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:155)
	at com.sun.faces.config.processor.ManagedBeanConfigProcessor.process(ManagedBeanConfigProcessor.java:271)
	at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:155)
	at com.sun.faces.config.processor.ValidatorConfigProcessor.process(ValidatorConfigProcessor.java:121)
	at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:155)
	at com.sun.faces.config.processor.ConverterConfigProcessor.process(ConverterConfigProcessor.java:127)
	at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:155)
	at com.sun.faces.config.processor.ComponentConfigProcessor.process(ComponentConfigProcessor.java:118)
	at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:155)
	at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:403)
	at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:155)
	at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:138)
	at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:155)
	at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:246)
	at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:443)
	at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:237)
	... 30 more
Caused by: javax.faces.FacesException: org.primefaces.omega.component.menu.OmegaMenuRenderer
	at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:431)
	at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:304)
	... 49 more
Caused by: java.lang.ClassNotFoundException: org.primefaces.omega.component.menu.OmegaMenuRenderer
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1328)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at com.sun.faces.util.Util.loadClass(Util.java:333)
	at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:423)
	... 50 more

Jan 05, 2019 8:42:32 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
Jan 05, 2019 8:42:32 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/power] startup failed due to previous errors
Jan 05, 2019 8:42:32 AM javax.faces.FactoryFinderInstance getFactory
SEVERE: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory. Attempting to find backup.
Jan 05, 2019 8:42:32 AM com.sun.faces.config.ConfigureListener contextDestroyed
SEVERE: Unexpected exception when attempting to tear down the Mojarra runtime
java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory. 
	at javax.faces.FactoryFinderInstance.getFactory(FactoryFinderInstance.java:541)
	at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:292)
	at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:152)
	at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:367)
	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4688)
	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5331)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:187)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1432)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1422)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:831)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1432)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1422)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:801)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:695)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)

Jan 05, 2019 8:42:32 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8280"]
Jan 05, 2019 8:42:32 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8209"]
Jan 05, 2019 8:42:32 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 7286 ms
P.S. The demo project works fine.

User avatar
aragorn
Posts: 3556
Joined: 29 Jun 2013, 12:38

08 Jan 2019, 10:38

Hi,

This link can help to you to integrate the theme and layout into your project;
https://www.dropbox.com/s/s9cle2xqbwbu8 ... t.mp4?dl=0

Also; viewtopic.php?f=40&t=56476&p=172018&hil ... ox#p172018

Best Regards,

bmlikota
Posts: 2
Joined: 28 Dec 2018, 12:05

08 Jan 2019, 21:06

Many thanks!!

I removed a jar from "Java Build Path -> Libraires" in the Eclipse and added a dependency:

Code: Select all

mvn install:install-file -Dfile=<path-to-file(your jar file)> -DgroupId=org.primefaces.omegamenu -DartifactId=omega-menu -Dversion=1.4 -Dpackaging=jar

Code: Select all

<dependency>
            <groupId>org.primefaces.omegamenu</groupId>
            <artifactId>omega-menu</artifactId>
            <version>1.4</version>
</dependency>
This is unnecessary now (removed from faces-config.xml):

Code: Select all

<component>
        <component-type>org.primefaces.component.OmegaMenu</component-type>
        <component-class>org.primefaces.omega.component.menu.OmegaMenu</component-class>
    </component>

    <render-kit>
        <renderer>
            <component-family>org.primefaces.component</component-family>
            <renderer-type>org.primefaces.component.OmegaMenuRenderer</renderer-type>
            <renderer-class>org.primefaces.omega.component.menu.OmegaMenuRenderer</renderer-class>
        </renderer>
    </render-kit>

User avatar
aragorn
Posts: 3556
Joined: 29 Jun 2013, 12:38

10 Jan 2019, 09:26

You're welcome! Thanks a lot for the update!

Best Regards,

Locked

Return to “Rio”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 0 guests