小编use*_*888的帖子

如何在Hibernate中使用数组字段制作标准

我正在使用HibernatePostgres定义了一个character(1)[]列类型.

所以我不知道如何让它criteria在数组中找到一个值.

喜欢这个查询

SELECT * FROM cpfbloqueado WHERE bloqueados @> ARRAY['V']::character[]
Run Code Online (Sandbox Code Playgroud)

sql postgresql hibernate criteria

9
推荐指数
1
解决办法
993
查看次数

使用Itext替换PDF文件中的字符串,但不替换字母X.

我正在尝试替换PDF一个文本中的内容,但字母'X'没有被替换.

public static void main(String[] args) {

    String DEST = "/home/diego/Documentos/teste.pdf";

    try {
        PdfReader reader = new PdfReader("termoAdesaoCartao.pdf");
        PdfDictionary dictionary = reader.getPageN(1);
        PdfObject object = dictionary.getDirectObject(PdfName.CONTENTS);
        if (object instanceof PRStream) {
            PRStream stream = (PRStream)object;
            byte[] data = PdfReader.getStreamBytes(stream);
            stream.setData(new String(data).replace("Nome Completo", "A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z").getBytes());
        }
        PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(DEST));
        stamper.close();
        reader.close();
    } catch (IOException | DocumentException e) {
        e.printStackTrace();
    }

}
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

java pdf string itext

8
推荐指数
2
解决办法
6186
查看次数

Eclipse auto complete shortcurt不显示使用复合组件的新标签的属性

我在Eclipse中使用JSF 2.0开发了复合组件.我一直把我的XHTML标签文件放在resources文件夹中.

当我在键盘上按ctrl+ space时,标签的属性不会显示.

我找到一些提示安装"Jboss工具",但没有工作.

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:cc="http://xmlns.jcp.org/jsf/composite"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <cc:interface>
        <cc:attribute name="value"/>
        <cc:attribute name="label"/>
        <cc:attribute name="masculino" default="true"/>
    </cc:interface>

    <cc:implementation>
        <p:selectOneMenu value="#{cc.attrs.value}" label="#{cc.attrs.label}">
            <f:selectItem itemValue="#{null}"
                          itemLabel="#{cc.attrs.masculino ? lbl['LABEL.TODOS'] : lbl['LABEL.TODAS']}" />
            <f:selectItem itemValue="true" itemLabel="#{lbl['LABEL.SIM']}" />
            <f:selectItem itemValue="false" itemLabel="#{lbl['LABEL.NAO']}" />
        </p:selectOneMenu>                                  
    </cc:implementation>

</html>
Run Code Online (Sandbox Code Playgroud)

以上是创建的一个标签的一个示例.

谢谢

eclipse jsf attributes code-completion composite-component

7
推荐指数
2
解决办法
1844
查看次数