[ https://issues.apache.org/jira/browse/TAP5-2774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maximillian Steinbach updated TAP5-2774: ---------------------------------------- Attachment: Test.tml > Form in form error when forms are not inside one another. > --------------------------------------------------------- > > Key: TAP5-2774 > URL: https://issues.apache.org/jira/browse/TAP5-2774 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core > Affects Versions: 5.8.2 > Reporter: Maximillian Steinbach > Assignee: Ben Weidig > Priority: Critical > Attachments: Test.java, Test.tml > > > I have t:form (form A) with an onSubmit action. This form's submit action > triggers an ajax reload. The part of the page that is being reloaded is > different to that of form A. The area being reloaded contains another t:form > (form B) that must be re-rendered. While it is re-rendering form B it hits an > exception at > org.apache.tapestry5.corelib.components.Form.setupRender(Form.java:330) > The error is "Form components may not be placed inside other Form > components." > It seems that there is a check here to see if there is an existing outer > enclosing form in the process of being rendered. However the existing form it > finds is the form A that is not an enclosing form, it is the form that > triggers the submit action. Form A seems to be pushed into the environment on > line 503 in the method onAction. > I have taken a look at the git history here and there doesn't seems to have > been any recent changes to this code so I am confused why this issue has > begun on my end. > As such, the result of this bug seems to be that a form's onSubmit action can > never trigger the reload of another component that itself contains a form. > This seems to be problematic. > I can take a look at addressing this issue myself but I would appreciate > other's more experienced input first before I attempt it. -- This message was sent by Atlassian Jira (v8.20.10#820010)