Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: Release 1.5
-
Component/s: Tag Library
-
Labels:None
Description
There are a variety of circumstances that lead to wanting to reuse parts of forms in a web application (the using of fragments of JSP to render form fragment for inclusion using AJAX is the most common example). Stripes tags currently require that they be nested inside a stripes:form tag, but this is problematic when trying to render fragments.
Since putting an input tag outside of a form is also a common form of error (and the form tag /does/ provide services to the input tags) it is suggested that we have an option on the form tag along the lines of:
<s:form [partial|fragment]="true"/>
that would disable any output from the form tag. This would thereby allow the use of such a tag to wrap these fragments and provide any necessary services, without rendering the HTML form itself.
An addendum to this is that it is probably necessary for form tags to check and see if they are nested inside another form tag, and if they are (and the action matches or is missing altogether from the nested form) then to simply delegate to the parent form tag - or throw an exception in the case of a mismatch.
Thought I would throw a quick patch up here as this doesn't really need to be all that complicated. Let me know if I need to add anything else, but this seems to do the trick for me. Variable name might be renamed to just 'partial' but thats minor.