There is a top-level template in my project and it defines several sub-templates nested in a form:
<h:form>
<ui:insert name="header"/>
<ui:insert name="leftbar"/>
<ui:insert name="maincontent"/>
</h:form>
It's not my idea actually to build application in this way. I see both its advantages and disadvantages.
The biggest problem I've met is necessity of 2 forms on 1 page: first with default enctype
and second for uploading files. The second biggest problem is validating unnecessary fields (but it can be relatively easily solved by disabling validation on those fields with jstl c:if
).
I'm using JSF and Facelets currently but the described design is possible with any templating framework.
So, what I wanted to ask: how do you think is it worth to use this wrapper-form? Is is a common practice?