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

Christian Oldiges commented on WICKET-2541:
-------------------------------------------

Well, tried that, but it didnt work at all. Below, logoutButton is the only 
child in the enclosure and was added directly to the created Enclosure object.

How about this bit from the JavaDoc of Enclosure: "Do not create it yourself"?


WicketMessage: Could not find child with id: logoutButton in the 
wicket:enclosure

Root cause:

org.apache.wicket.WicketRuntimeException: Could not find child with id: 
logoutButton in the wicket:enclosure
     at 
org.apache.wicket.markup.html.internal.Enclosure.checkChildComponent(Enclosure.java:220)
     at 
org.apache.wicket.markup.html.internal.Enclosure.ensureAllChildrenPresent(Enclosure.java:262)
     at 
org.apache.wicket.markup.html.internal.Enclosure.onComponentTagBody(Enclosure.java:169)
     at org.apache.wicket.Component.renderComponent(Component.java:2617)
     at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
     at org.apache.wicket.Component.render(Component.java:2448)

> FormComponents hidden by wicket:enclosure should not be validated upon form 
> submit
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-2541
>                 URL: https://issues.apache.org/jira/browse/WICKET-2541
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.3
>            Reporter: Christian Oldiges
>            Priority: Minor
>
> FormComponents that are hidden by an enclosing wicket:enclosure tag should 
> not by validated.
> If there is a form with 2 form components A and B and an enclosure is used to 
> hide both A and B and it is controlled by B.isVisible (wicket:enclosure 
> child="B"), the FormComponent A is still validated.
> Simple example: a RequiredTextField is still required even if made invisible 
> by a surrounding enclosure.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to