You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Palancher aurélien (JIRA)" <ji...@apache.org> on 2017/11/13 13:39:00 UTC

[jira] [Commented] (WICKET-6495) Required FormComponents in enclosure tag are required if the enclosure is not visible

    [ https://issues.apache.org/jira/browse/WICKET-6495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16249558#comment-16249558 ] 

Palancher aurélien commented on WICKET-6495:
--------------------------------------------

The difference is here : while visiting children on submit,
"add" method : getParent of ze_textfield returns the form -> visible : check validators
"queue" method : getParent of ze_textfield returns the enclosure -> invisible : no validators

> Required FormComponents in enclosure tag are required if the enclosure is not visible
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-6495
>                 URL: https://issues.apache.org/jira/browse/WICKET-6495
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 8.0.0-M8
>            Reporter: Palancher aurélien
>         Attachments: WicketQuickStartJira.war
>
>
> There is two differents behaviors while validating a required (or another validator) FormComponent within an invisible enclosure tag.
> If the FormComponent is added with the 'add' method, the component is required.
> If the FormComponent is added with the 'queue' method, this works fine (component is not required)
> The latter behavior may be the one to have imo.
> Html : (see QuickStart)
> {code:html}
> <form wicket:id="ze_form">
> 	<div wicket:enclosure="ze_enclosured">
> 	Enclosure added: <input type="text" wicket:id="ze_enclosured" />
> 	<br />
> 	Required added: <input type="text" wicket:id="ze_textfield" />
> 	</div>
> 	<span wicket:id="ze_feedback"></span>
> 	<a wicket:id="ze_button">Submit with added Components</a>
> </form>
> {code}
> * ze_enclosured is set to invisible
> * both formComponents are required
> * both formComponents are "added" (not queued)
> => Error on form submit : ze_textfield is required
> If we use "queue" : ok



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)