简体   繁体   中英

How to Install Adminlte template on netbeans

Please I need help in using AdminFaces Admin template on netbean web application project. I have been battling on using it and I don't know what should be in the XML and other things. thanks

First add the AdminFaces jars on your project Libraries:

在此处输入图片说明

Note that if you don't use PrimeFaces extensions just remove it, as well as commons-lang3 (extensions dependency).

Also if you run the project in a servlet container like Tomcat you'll need to add CDI and JSF implementations like mojarra and weld to your classpath as well as JPA and EJB api (no need for implementations on these last two). Following are the libs for a Tomcat 9.x project on OpenBeans (see project link below):

在此处输入图片说明

After that on your web.xml enable the admin theme, font-awesome and mime-types :

<context-param>
    <param-name>primefaces.THEME</param-name>
    <param-value>admin</param-value>
</context-param>
<context-param>
    <param-name>primefaces.FONT_AWESOME</param-name>
    <param-value>true</param-value>
</context-param>

<mime-mapping>
    <extension>ico</extension>
    <mime-type>image/x-icon</mime-type>
</mime-mapping>
<mime-mapping>
    <extension>woff</extension>
    <mime-type>application/font-woff</mime-type>
</mime-mapping>
<mime-mapping>
    <extension>woff2</extension>
    <mime-type>application/font-woff2</mime-type>
</mime-mapping>
<mime-mapping>
    <extension>ttf</extension>
    <mime-type>application/font-sfnt</mime-type>
</mime-mapping>
<mime-mapping>
    <extension>eot</extension>
    <mime-type>application/vnd.ms-fontobject</mime-type>
</mime-mapping>
<mime-mapping>
    <extension>otf</extension>
    <mime-type>font/opentype</mime-type>
</mime-mapping>

<mime-mapping>
    <extension>svg</extension>
    <mime-type>image/svg+xml</mime-type>
</mime-mapping>

After that your components will be styled like admin-theme and you'll be able to use the admin template on your page. See documentation for usage details.

Following is a sample NetBeans project with AdminFaces configured: https://github.com/rmpestano/admin-starter-netbeans

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM