Wicket:encluse in form leads to require of hidden fields
--------------------------------------------------------
Key: WICKET-4137
URL: https://issues.apache.org/jira/browse/WICKET-4137
Project: Wicket
Issue Type: Bug
Components: wicket
Environment: wicket 1.5-SNAPSHOT
Reporter: Ilia Naryzhny
We have following code:
<wicket:enclosure child="client.displayName">
<tr>
<td><label wicket:for="client.displayName"><wicket:label
key="order.make.name">Display name</wicket:label></label></td>
</tr>
<tr>
<td><input type="text" wicket:id="client.displayName"></td>
</tr>
<tr>
<td><label wicket:for="client.email"><wicket:label
key="user.email">EMail</wicket:label></label></td>
</tr>
<tr>
<td><input type="text" wicket:id="client.email"></td>
</tr>
</wicket:enclosure>
Both fields in code marked as required:
form.add(new
TextField<String>("client.displayName").setVisible(!MyWebSession.get().isSignedIn().setRequired(true));
form.add(new TextField<String>("client.email").setRequired(true));
As a result: if whole block is not visible we still recieve error message that
fields are required.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira