using primefaces extensions (inputNumber)

假如想象 提交于 2019-12-18 16:52:06

问题


i'm new in primefaces word , and i need to use primefaces extensions (inputNumber)

in the XHTML file I add the taglib :

xmlns:pe="http://primefaces.org/ui/extensions"

when adding the jar :

primefaces-extensions-0.6.3;

I have an error : La ressource demandée n'est pas disponible.

When removing it, the application works but the inputNember doesn't show and I get this error:

Warning: This page calls for XML namespace http://primefaces.org/ui/extensions declared with prefix pe but no taglibrary exists for that namespace.

回答1:


To work with primefaces extensions i should add to the XHTML file the taglib:

xmlns:pe="http://primefaces.org/ui/extensions" 

and to the lib folder two jars:

primefaces-extensions-0.6.3.jar
common-lang3.jar.

that is all.




回答2:


If you are using maven for your dependencies, the required entry is

<dependency>
    <groupId>org.primefaces.extensions</groupId>
    <artifactId>primefaces-extensions</artifactId>
    <version>0.6.3</version>
</dependency>

This will add the required dependencies for primefaces extensions.

If you are not using maven, then you should follow the Getting Started guide for "other users" and add all the necessary jars




回答3:


For me, one maven dependencies is missing !

<dependency>
   <groupId>org.apache.commons</groupId>
   <artifactId>commons-lang3</artifactId>
   <version>3.0</version>
</dependency>

Attention: currently "commons" is with S at end

At 2016.12.24, the version of extension can now be 6.0.0

<dependency>
    <groupId>org.primefaces.extensions</groupId>
    <artifactId>primefaces-extensions</artifactId>
    <version>6.0.0</version>
</dependency>

Thanks to Rong Nguyen and Ghizlane La

Last remark

I have encouter some problems (error message in Chrome indicating that some ressources are missing) because the versions used for Primefaces and PrimefacesExtension end Commons-lang3 are not compatible !

But I have found that the following combination work correclty for me.

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-lang3</artifactId>
    <version>3.5</version>
</dependency>

<dependency>
    <groupId>org.primefaces</groupId>
    <artifactId>primefaces</artifactId>
    <version>6.0</version>
</dependency>

<dependency>
    <groupId>org.primefaces.extensions</groupId>
    <artifactId>primefaces-extensions</artifactId>
    <version>6.0.0</version>
</dependency>

I hope that will be useful for others :-)



来源:https://stackoverflow.com/questions/16015302/using-primefaces-extensions-inputnumber

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!