myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Kakuschky <kakusc...@elbe-net.de>
Subject Re: [tobago] Validation in Popups
Date Wed, 29 Sep 2010 06:57:10 GMT
  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

<tc:form>
<tc:panel>
<f:facet name="layout">
<tc:gridLayout  rows="fixed" columns="fixed" />
</f:facet>
<tc:button label="new item">
<tc:attribute name="renderedPartially" value="non_modal_popup1"/>
<f:facet name="popup">
<tc:popup width="500" height="325" id="non_modal_popup1" modal="true" >
<tc:box label="create new item">
<f:facet name="layout">
<tc:gridLayout columns="1*" rows="fixed;fixed" />
</f:facet>
<tc:cell>
<tx:in label="contact name" 
value="#{myController.itemToAdd.contact_name}" required="true" />
</tc:cell>
<tc:cell>
<tc:button width="100" label="add" action="#{myController.newitem}">
<tc:attribute name="popupClose" value="afterSubmit"/>
</tc:button>
</tc:cell>
</tc:box>
</tc:popup>
</f:facet>
</tc:button>
</tc:panel>
</tc:form>

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 &regards Michael
>>

Mime
View raw message