You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Floris Kruisselbrink (Created) (JIRA)" <ji...@apache.org> on 2012/02/03 12:01:54 UTC

[jira] [Created] (WICKET-4383) getPage() cannot be used in Form.onSubmit() if the page hierarchy changed in a submitting component's onSubmit()

getPage() cannot be used in Form.onSubmit() if the page hierarchy changed in a submitting component's onSubmit()
----------------------------------------------------------------------------------------------------------------

                 Key: WICKET-4383
                 URL: https://issues.apache.org/jira/browse/WICKET-4383
             Project: Wicket
          Issue Type: Bug
    Affects Versions: 1.5.4
            Reporter: Floris Kruisselbrink
            Priority: Minor
         Attachments: formsubmitbutton.zip

I have a form, which wants to get information about it's place in the page-hierarchy in the Form.onSubmit() method (in reality wicket-security does this, but the attached quickstart demonstrates the problem without wicket-security)
The form is submitted using an AjaxSubmitLink, which also has an onSubmit() method, in which the page hierarchy is changed in such a way the form is no longer there.

The form's own onSubmit is called later on, and (as the form is not in the page hierarchy anymore) crashes while trying to call Form.getPage().

This same construction worked fine when our application still used wicket 1.4

I will attach a quickstart demonstrating the problem, see the comments in FormPanel.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4383) getPage() cannot be used in Form.onSubmit() if the page hierarchy changed in a submitting component's onSubmit()

Posted by "Martin Grigorov (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199643#comment-13199643 ] 

Martin Grigorov commented on WICKET-4383:
-----------------------------------------

This looks like a problem in your code:

at org.apache.wicket.Component.getPage(Component.java:1765) 
at nl.vloris.wicketbugs.formsubmitbutton.FormPanel$1.onSubmit(FormPanel.java:28) 

The component is removed from the page in your code. Later you try to get the page of this removed component again in your code ... :-)
                
> getPage() cannot be used in Form.onSubmit() if the page hierarchy changed in a submitting component's onSubmit()
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4383
>                 URL: https://issues.apache.org/jira/browse/WICKET-4383
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Floris Kruisselbrink
>            Priority: Minor
>         Attachments: formsubmitbutton.zip
>
>
> I have a form, which wants to get information about it's place in the page-hierarchy in the Form.onSubmit() method (in reality wicket-security does this, but the attached quickstart demonstrates the problem without wicket-security)
> The form is submitted using an AjaxSubmitLink, which also has an onSubmit() method, in which the page hierarchy is changed in such a way the form is no longer there.
> The form's own onSubmit is called later on, and (as the form is not in the page hierarchy anymore) crashes while trying to call Form.getPage().
> This same construction worked fine when our application still used wicket 1.4
> I will attach a quickstart demonstrating the problem, see the comments in FormPanel.java
> ERROR - DefaultExceptionMapper     - Unexpected error occurred
> org.apache.wicket.WicketRuntimeException: No Page found for component [ [Component id = form]]
> 	at org.apache.wicket.Component.getPage(Component.java:1765)
> 	at nl.vloris.wicketbugs.formsubmitbutton.FormPanel$1.onSubmit(FormPanel.java:28)
> 	at org.apache.wicket.markup.html.form.Form$9.component(Form.java:1169)
> 	at org.apache.wicket.markup.html.form.Form$9.component(Form.java:1164)
> 	at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:273)
> 	at org.apache.wicket.util.visit.Visits.visitPostOrder(Visits.java:244)
> 	at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1162)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WICKET-4383) getPage() cannot be used in Form.onSubmit() if the page hierarchy changed in a submitting component's onSubmit()

Posted by "Floris Kruisselbrink (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Floris Kruisselbrink updated WICKET-4383:
-----------------------------------------

    Attachment: formsubmitbutton.zip

Quickstart project demonstrating the crash: when you click on '[submit]' it crashes.
                
> getPage() cannot be used in Form.onSubmit() if the page hierarchy changed in a submitting component's onSubmit()
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4383
>                 URL: https://issues.apache.org/jira/browse/WICKET-4383
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Floris Kruisselbrink
>            Priority: Minor
>         Attachments: formsubmitbutton.zip
>
>
> I have a form, which wants to get information about it's place in the page-hierarchy in the Form.onSubmit() method (in reality wicket-security does this, but the attached quickstart demonstrates the problem without wicket-security)
> The form is submitted using an AjaxSubmitLink, which also has an onSubmit() method, in which the page hierarchy is changed in such a way the form is no longer there.
> The form's own onSubmit is called later on, and (as the form is not in the page hierarchy anymore) crashes while trying to call Form.getPage().
> This same construction worked fine when our application still used wicket 1.4
> I will attach a quickstart demonstrating the problem, see the comments in FormPanel.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WICKET-4383) getPage() cannot be used in Form.onSubmit() if the page hierarchy changed in a submitting component's onSubmit()

Posted by "Floris Kruisselbrink (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Floris Kruisselbrink updated WICKET-4383:
-----------------------------------------

    Description: 
I have a form, which wants to get information about it's place in the page-hierarchy in the Form.onSubmit() method (in reality wicket-security does this, but the attached quickstart demonstrates the problem without wicket-security)
The form is submitted using an AjaxSubmitLink, which also has an onSubmit() method, in which the page hierarchy is changed in such a way the form is no longer there.

The form's own onSubmit is called later on, and (as the form is not in the page hierarchy anymore) crashes while trying to call Form.getPage().

This same construction worked fine when our application still used wicket 1.4

I will attach a quickstart demonstrating the problem, see the comments in FormPanel.java


ERROR - DefaultExceptionMapper     - Unexpected error occurred
org.apache.wicket.WicketRuntimeException: No Page found for component [ [Component id = form]]
	at org.apache.wicket.Component.getPage(Component.java:1765)
	at nl.vloris.wicketbugs.formsubmitbutton.FormPanel$1.onSubmit(FormPanel.java:28)
	at org.apache.wicket.markup.html.form.Form$9.component(Form.java:1169)
	at org.apache.wicket.markup.html.form.Form$9.component(Form.java:1164)
	at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:273)
	at org.apache.wicket.util.visit.Visits.visitPostOrder(Visits.java:244)
	at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1162)


  was:
I have a form, which wants to get information about it's place in the page-hierarchy in the Form.onSubmit() method (in reality wicket-security does this, but the attached quickstart demonstrates the problem without wicket-security)
The form is submitted using an AjaxSubmitLink, which also has an onSubmit() method, in which the page hierarchy is changed in such a way the form is no longer there.

The form's own onSubmit is called later on, and (as the form is not in the page hierarchy anymore) crashes while trying to call Form.getPage().

This same construction worked fine when our application still used wicket 1.4

I will attach a quickstart demonstrating the problem, see the comments in FormPanel.java

    
> getPage() cannot be used in Form.onSubmit() if the page hierarchy changed in a submitting component's onSubmit()
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4383
>                 URL: https://issues.apache.org/jira/browse/WICKET-4383
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Floris Kruisselbrink
>            Priority: Minor
>         Attachments: formsubmitbutton.zip
>
>
> I have a form, which wants to get information about it's place in the page-hierarchy in the Form.onSubmit() method (in reality wicket-security does this, but the attached quickstart demonstrates the problem without wicket-security)
> The form is submitted using an AjaxSubmitLink, which also has an onSubmit() method, in which the page hierarchy is changed in such a way the form is no longer there.
> The form's own onSubmit is called later on, and (as the form is not in the page hierarchy anymore) crashes while trying to call Form.getPage().
> This same construction worked fine when our application still used wicket 1.4
> I will attach a quickstart demonstrating the problem, see the comments in FormPanel.java
> ERROR - DefaultExceptionMapper     - Unexpected error occurred
> org.apache.wicket.WicketRuntimeException: No Page found for component [ [Component id = form]]
> 	at org.apache.wicket.Component.getPage(Component.java:1765)
> 	at nl.vloris.wicketbugs.formsubmitbutton.FormPanel$1.onSubmit(FormPanel.java:28)
> 	at org.apache.wicket.markup.html.form.Form$9.component(Form.java:1169)
> 	at org.apache.wicket.markup.html.form.Form$9.component(Form.java:1164)
> 	at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:273)
> 	at org.apache.wicket.util.visit.Visits.visitPostOrder(Visits.java:244)
> 	at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1162)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (WICKET-4383) getPage() cannot be used in Form.onSubmit() if the page hierarchy changed in a submitting component's onSubmit()

Posted by "Martin Grigorov (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-4383.
-------------------------------------

    Resolution: Not A Problem
    
> getPage() cannot be used in Form.onSubmit() if the page hierarchy changed in a submitting component's onSubmit()
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4383
>                 URL: https://issues.apache.org/jira/browse/WICKET-4383
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Floris Kruisselbrink
>            Priority: Minor
>         Attachments: formsubmitbutton.zip
>
>
> I have a form, which wants to get information about it's place in the page-hierarchy in the Form.onSubmit() method (in reality wicket-security does this, but the attached quickstart demonstrates the problem without wicket-security)
> The form is submitted using an AjaxSubmitLink, which also has an onSubmit() method, in which the page hierarchy is changed in such a way the form is no longer there.
> The form's own onSubmit is called later on, and (as the form is not in the page hierarchy anymore) crashes while trying to call Form.getPage().
> This same construction worked fine when our application still used wicket 1.4
> I will attach a quickstart demonstrating the problem, see the comments in FormPanel.java
> ERROR - DefaultExceptionMapper     - Unexpected error occurred
> org.apache.wicket.WicketRuntimeException: No Page found for component [ [Component id = form]]
> 	at org.apache.wicket.Component.getPage(Component.java:1765)
> 	at nl.vloris.wicketbugs.formsubmitbutton.FormPanel$1.onSubmit(FormPanel.java:28)
> 	at org.apache.wicket.markup.html.form.Form$9.component(Form.java:1169)
> 	at org.apache.wicket.markup.html.form.Form$9.component(Form.java:1164)
> 	at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:273)
> 	at org.apache.wicket.util.visit.Visits.visitPostOrder(Visits.java:244)
> 	at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1162)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira