0

I have this issue, i think is a bug, i have a composite component with a simple inputtext, then i try to use my composite component in a modal dialog, at first look all it's ok, you can type inside the inputtext, but when the inputtext lost the focus and try to type again you cant, even you can't erase what you typed before.

In the issue tracker, there are a similiar problem reported: LINK!!!!!

But this is with autocomplete not with input (maybe can be the same), but is marked as fixed, and i tried with PrimeFaces 3.3.1 and 3.4-SNAPSHOT but the problem persist.

Im using 3.4-SNAPSHOT

Here is a "reproducible test cases", i add an other input to my composite component for lost the focus more easily from first input.

Composite component:

<!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>

I tried to replace p:inputText with h:inputText and the problem persist.

Im using: MyFaces 2.1.8, Primefaces 3.4-SNAPSHOT

maxtorzito
  • 308
  • 7
  • 14

0 Answers0