Jsf PrimeFaces条码样本
我只是想复制PrimeFaces Showcase中关于条形码的粘贴示例。 这是代码,我得到: 我只是想测试一下,得到和样品一样的效果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
<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”