Is it possible to reuse a form in two different views in JSF? I know about the ui:include but how would you do it with the action on the submit button for example? Or do I need to duplicate the forms?
Is it possible to reuse a form in two different views in JSF? I
Share
When using
<ui:include>you can parameterize the bean and/or the method by<ui:param>.with
You can also make it a Facelets tag file instead so that you end up with something like
A composite component is also doable, but IMO not really the right approach for this purpose.
See also: