[jira] [Commented] (TAP5-2774) Form in form error when forms are not inside one another.

2024-04-23 Thread Maximillian Steinbach (Jira)


[ 
https://issues.apache.org/jira/browse/TAP5-2774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17840080#comment-17840080
 ] 

Maximillian Steinbach commented on TAP5-2774:
-

Hello Ben,

Thank you for getting back to me. Find attached a tapestry page component and 
it's tml that show the issue. This may seem like a somewhat contrived example 
but it obviously makes more sense in the real context. When you fill something 
into the text box and submit, the error is triggered. It fails on line 38 where 
the partial render occurs.

Thanks,

Max

[^Test.java] [^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)


[jira] [Updated] (TAP5-2774) Form in form error when forms are not inside one another.

2024-04-23 Thread Maximillian Steinbach (Jira)


 [ 
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)


[jira] [Updated] (TAP5-2774) Form in form error when forms are not inside one another.

2024-04-23 Thread Maximillian Steinbach (Jira)


 [ 
https://issues.apache.org/jira/browse/TAP5-2774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maximillian Steinbach updated TAP5-2774:

Attachment: Test.java

> 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
>
>
> 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)