この問題があります。バグだと思います。単純な入力テキストを持つ複合コンポーネントがあります。次に、複合コンポーネントをモーダル ダイアログで使用しようとしました。最初はすべて問題ありません。入力テキスト内に入力できますが、入力テキストはフォーカスを失い、もう一度入力しようとするとできません。以前に入力したものを消去することはできません。
イシュー トラッカーでは、同様の問題が報告されています: 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>
test.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>
p:inputText を h:inputText に置き換えようとしましたが、問題は解決しません。
私が使用している:MyFaces 2.1.8、Primefaces 3.4-SNAPSHOT