Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 22463 invoked from network); 12 Oct 2010 08:41:32 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Oct 2010 08:41:32 -0000 Received: (qmail 20790 invoked by uid 500); 12 Oct 2010 08:41:31 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 20586 invoked by uid 500); 12 Oct 2010 08:41:28 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 20494 invoked by uid 99); 12 Oct 2010 08:41:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Oct 2010 08:41:27 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [78.46.64.122] (HELO zimbra.elbe-net.de) (78.46.64.122) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Oct 2010 08:41:21 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.elbe-net.de (Postfix) with ESMTP id 3EA25EC134 for ; Tue, 12 Oct 2010 10:41:43 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.elbe-net.de Received: from zimbra.elbe-net.de ([127.0.0.1]) by localhost (zimbra.elbe-net.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o7A7W6LtCJzf for ; Tue, 12 Oct 2010 10:41:42 +0200 (CEST) Received: from [192.168.1.36] (f054142154.adsl.alicedsl.de [78.54.142.154]) by zimbra.elbe-net.de (Postfix) with ESMTPSA id 20B12EC133 for ; Tue, 12 Oct 2010 10:41:42 +0200 (CEST) Message-ID: <4CB41F0C.7000707@elbe-net.de> Date: Tue, 12 Oct 2010 10:40:44 +0200 From: Michael Kakuschky User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 MIME-Version: 1.0 To: MyFaces Discussion Subject: Re: [tobago] Validation in Popups References: <4C9BB8C4.2000805@elbe-net.de> <4CA1E9C9.4090402@schnurpfeil.de> <4CA2E346.3040906@elbe-net.de> <4CA977D2.2070703@elbe-net.de> <4CAF4712.3040308@schnurpfeil.de> <4CB0119B.3000008@schnurpfeil.de> In-Reply-To: <4CB0119B.3000008@schnurpfeil.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello Udo, with the way you described it works well. My problem is now that I use apache tomcat instead eclipse and I'm not using maven. So I have to find out which is the responsible difference. Best regards Michael Am 09.10.2010 08:54, schrieb Udo Schnurpfeil: > Addition (but I don't think the problem rely on that): > Server: > Mac OS 10.6.4, Maven 2.2.1, Java 1.6.0_20 > Clients: > Firefox 3.6.10, Mac OS 10.6.4 > Safari 5.0.2, Mac OS 10.6.4 > Internet Explorer 6.0, Windows XP SP 3 > Internet Explorer 8.0, Windows 7 > Firefox 3.6.8, Ubuntu 10.4 > > Am 08.10.10 18:30, schrieb Udo Schnurpfeil: >> Hi Michael, >> >> I've just rechecked you sample, but I can't reproduce the problem. >> So, it may depends on some odd diffence of my and you environment. >> >> Let be describe what I did: >> >> 1. svn co >> https://svn.apache.org/repos/asf/myfaces/tobago/tags/tobago-1.0.30/example/demo/ >> demo >> 2. cd demo >> 3. edit src/main/webapp/popup-test.jsp (this is a modified version of >> you sniplet, the EL to the Java code was removed) >> <%@ taglib uri="http://myfaces.apache.org/tobago/component" >> prefix="tc" %> >> <%@ taglib uri="http://myfaces.apache.org/tobago/extension" >> prefix="tx" %> >> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> >> <%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> 4. mvn jetty:run-exploded >> 5. browse: >> http://localhost:8080/tobago-example-demo/faces/popup-test.jsp >> 6. click "new item" -> popup opens >> 7. click "add" -> popup closes >> 8. click "new item" -> popup opens >> 9. remove the value of "contact name" >> 10. click "add" -> popup keeps open and the input will be colored red >> >> Can you check, if this works the same way on your box. >> >> Regards, >> >> Udo >> >> >> Am 04.10.10 10:59, schrieb Volker Weber: >>> Hi Michael, >>> >>> yes we have validation in Popups, but this is a bit hack like, nothing >>> to show as example. >>> >>> The problem is the partial rendering and the popup handling in >>> tobago 1.0.x: >>> >>> If you need validation inside a popup, you should not close the popup >>> via popupClose attribute, but rerender the popup content partial and, >>> on success, close the popup via hidden button and javascript. >>> >>> something like this should work, if you set the >>> #{myController.closePopup} value in your newItem action. >>> >>> >>> >>> >>> >>> >>> >>> >>> >> rendered="#{myController.closePopup}" >>> value="" /> >>> >>> >>> >>> >>> >>> >>> >>> In tobago 1.5 this would be easier. >>> >>> Regards, >>> Volker >>> >>> 2010/10/4 Michael Kakuschky: >>>> Does nobody has an working example for validation in popus? >>>> >>>> Regards Michael >>>> >>>> Am 29.09.2010 08:57, schrieb Michael Kakuschky: >>>>> Hello Udo, thanks for the answer but my form is already around the >>>>> tc:button which I used to open the popup. Here is a snippset of my >>>>> original >>>>> version. The popup works and the form data will processed. Only >>>>> validations >>>>> and required checks doesn't work. In case of missing or wrong data >>>>> the pop >>>>> is just closing without calling the action method of the popups >>>>> submit >>>>> button. Can you show on this example what's todo or maybe wrong ? >>>>> >>>>> Thanks& best regards Michael >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> modal="true"> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> value="#{myController.itemToAdd.contact_name}" >>>>> required="true" /> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> Am 28.09.2010 15:12, schrieb Udo Schnurpfeil: >>>>>> Hello Michael, >>>>>> >>>>>> please try to put the form outside of the command tag, which >>>>>> opens the >>>>>> popup. This should solve your problems. >>>>>> >>>>>> The background is: The popup must be inside the form to consider >>>>>> it was >>>>>> already active. >>>>>> >>>>>> Regards, >>>>>> >>>>>> Udo >>>>>> >>>>>> Am 23.09.10 22:29, schrieb Michael Kakuschky: >>>>>>> Hello, I have a form in a popup. Now it works fine and I add some >>>>>>> validators to it. I checked that they are executed and throws the >>>>>>> ValidatorException if the input does not match the requirements. >>>>>>> >>>>>>> In case of exceptions the action behind the popup form is not >>>>>>> executed >>>>>>> but unfortunately the popup is closed without any notification >>>>>>> about the >>>>>>> wrong input. Is there a way to keep the popup open so that the >>>>>>> user is >>>>>>> informed about the wrong input? >>>>>>> >>>>>>> thanks®ards Michael >>>>>>> >>> >>> >>