0

我有这个问题,我认为是一个错误,我有一个带有简单输入文本的复合组件,然后我尝试在模态对话框中使用我的复合组件,起初看起来一切都很好,你可以在输入文本中输入,但是当inputtext 失去了焦点并尝试再次输入您无法输入的内容,即使您无法删除之前输入的内容。

在问题跟踪器中,报告了一个类似的问题: LINK!!!!!!

但这是自动完成而不是输入(可能是相同的),但被标记为固定,我尝试使用 PrimeFaces 3.3.1 和 3.4-SNAPSHOT 但问题仍然存在。

我正在使用 3.4-SNAPSHOT

这是一个“可重现的测试用例”,我在我的复合组件中添加了另一个输入,以便更容易地从第一个输入中失去焦点。

复合组件:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:cc="http://java.sun.com/jsf/composite"
          xmlns:p="http://primefaces.org/ui">
        <body>
            <cc:implementation>
                <p:commandButton value="Open dialog composite component" onclick="dialog.show()"/>

                <p:dialog widgetVar="dialog">
                    <p:inputText/>
                    <p:inputText value="Click here for lost focus of the first input"/>
                </p:dialog>

            </cc:implementation>
        </body>
    </ui:composition>

测试.xhtml

<?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
    <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:mycomp="http://java.sun.com/jsf/composite/components"
          xmlns:p="http://primefaces.org/ui"       
          xml:lang="es">

        <f:view contentType="text/html">
            <h:head>
            </h:head>

            <h:body>
                <h:form id="myform">
                    <p:commandButton value="Open first dialog" onclick="firstDialog.show()"/>
                </h:form>

                <h:form id="myform2">
                    <p:dialog widgetVar="firstDialog" modal="true">
                        <mycomp:test />
                    </p:dialog>
                </h:form>
            </h:body>
        </f:view>    
    </html>

我试图用 h:inputText 替换 p:inputText 并且问题仍然存在。

我正在使用:MyFaces 2.1.8、Primefaces 3.4-SNAPSHOT

4

0 回答 0