Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsf PrimeFaces条码样本_Jsf_Primefaces_Barcode - Fatal编程技术网

Jsf PrimeFaces条码样本

Jsf PrimeFaces条码样本,jsf,primefaces,barcode,Jsf,Primefaces,Barcode,我只是想复制PrimeFaces Showcase中关于条形码的粘贴示例。 这是代码,我得到: 我只是想测试一下,得到和样品一样的效果 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:pm="http://primefaces.org/mobile" xmln

我只是想复制PrimeFaces Showcase中关于条形码的粘贴示例。 这是代码,我得到:

我只是想测试一下,得到和样品一样的效果

<html xmlns="http://www.w3.org/1999/xhtml"  
  xmlns:h="http://java.sun.com/jsf/html"  
  xmlns:f="http://java.sun.com/jsf/core" 
  xmlns:pm="http://primefaces.org/mobile"
  xmlns:p="http://primefaces.org/ui">  


<h:head> 
</h:head>  

<h:body>
    <p:panelGrid columns="2">

        <h:outputText value="Postnet" />
        <p:barcode value="0123456789" type="postnet"/>

        <h:outputText value="QR" />
        <p:barcode value="0123456789" type="qr"/>
    </p:panelGrid>
</h:body>  


您是否已将条形码4J和qrgen库添加到您的依赖项中

<dependency>
    <groupId>net.glxn</groupId>
    <artifactId>qrgen</artifactId>
    <version>1.4</version>
</dependency>
<dependency>
    <groupId>net.sf.barcode4j</groupId>
    <artifactId>barcode4j-light</artifactId>
    <version>2.1</version>
</dependency>

net.glxn
qrgen
1.4
net.sf.barcode4j
条形码4J灯
2.1
**maven中央存储库中不存在条形码4J 2.1,因此需要手动安装
maven用户

您需要向存储库添加一个jar文件,以便primefaces更好地理解组件。你可以从这里拿到罐子。这就是“条形码4J light version 2.1”