如何在 netbeans 上安装 Adminlte 模板 [英] How to Install Adminlte template on netbeans

查看:45
本文介绍了如何在 netbeans 上安装 Adminlte 模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助我在 netbean Web 应用程序项目上使用 AdminFaces 管理模板.我一直在努力使用它,但我不知道 XML 和其他内容中应该包含什么.谢谢

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

推荐答案

首先在您的项目库中添加 AdminFaces jars:

First add the AdminFaces jars on your project Libraries:

请注意,如果您不使用 PrimeFaces 扩展,只需删除它,以及 commons-lang3(扩展依赖).

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

此外,如果您在 Tomcat 等 servlet 容器中运行该项目,则需要添加 CDI 和 JSF 实现(如 mojarra 和焊接)到您的类路径以及 JPA 和 EJB api(不需要在最后两个上实现).以下是 OpenBeans 上 Tomcat 9.x 项目的库(请参阅下面的项目链接):

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):

之后在你的 web.xml 上启用 admin 主题,font-awesomemime-types:

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>

之后,您的组件的样式将类似于 admin-theme,您就可以在页面上使用管理模板了.查看文档了解使用详情.

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.

以下是配置了 AdminFaces 的示例 NetBeans 项目:https://github.com/rmpestano/admin-starter-netbeans

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

这篇关于如何在 netbeans 上安装 Adminlte 模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆