You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Matt Brictson (JIRA)" <ji...@apache.org> on 2011/03/28 01:39:05 UTC

[jira] [Created] (WICKET-3562) onInitialize() is not called before StatelessForm.onSubmit()

onInitialize() is not called before StatelessForm.onSubmit()
------------------------------------------------------------

                 Key: WICKET-3562
                 URL: https://issues.apache.org/jira/browse/WICKET-3562
             Project: Wicket
          Issue Type: Bug
          Components: wicket-core
    Affects Versions: 1.5-RC3
            Reporter: Matt Brictson


I have a StatelessForm that has initialization code in onInitialize(). When my form is submitted, the onSubmit() method is invoked before onInitialize() is called. This results in a NullPointerException since the form has not yet had a chance to initialize its instance variables.

I expect that onInitialize() will be called before any listener method is invoked.

I believe this bug is due to the change in Page.onInitialize() introduced in r1085649.

Quickstart attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Reopened] (WICKET-3562) onInitialize() is not called before StatelessForm.onSubmit()

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

Martijn Dashorst reopened WICKET-3562:
--------------------------------------


Reopened, papegaaij will attach a quickstart

> onInitialize() is not called before StatelessForm.onSubmit()
> ------------------------------------------------------------
>
>                 Key: WICKET-3562
>                 URL: https://issues.apache.org/jira/browse/WICKET-3562
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Matt Brictson
>            Assignee: Peter Ertl
>             Fix For: 1.5-RC4
>
>         Attachments: WICKET-3562-quickstart.tgz, WICKET-3562.patch
>
>
> I have a StatelessForm that has initialization code in onInitialize(). When my form is submitted, the onSubmit() method is invoked before onInitialize() is called. This results in a NullPointerException since the form has not yet had a chance to initialize its instance variables.
> I expect that onInitialize() will be called before any listener method is invoked.
> I believe this bug is due to the change in Page.onInitialize() introduced in r1085649.
> Quickstart attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-3562) onInitialize() is not called before StatelessForm.onSubmit()

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

Martin Grigorov updated WICKET-3562:
------------------------------------

    Attachment: WICKET-3562.patch

A patch that fixes the problem

> onInitialize() is not called before StatelessForm.onSubmit()
> ------------------------------------------------------------
>
>                 Key: WICKET-3562
>                 URL: https://issues.apache.org/jira/browse/WICKET-3562
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Matt Brictson
>         Attachments: WICKET-3562-quickstart.tgz, WICKET-3562.patch
>
>
> I have a StatelessForm that has initialization code in onInitialize(). When my form is submitted, the onSubmit() method is invoked before onInitialize() is called. This results in a NullPointerException since the form has not yet had a chance to initialize its instance variables.
> I expect that onInitialize() will be called before any listener method is invoked.
> I believe this bug is due to the change in Page.onInitialize() introduced in r1085649.
> Quickstart attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-3562) onInitialize() is not called before StatelessForm.onSubmit()

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

Martin Grigorov commented on WICKET-3562:
-----------------------------------------

The unit test added for this ticket passes even without the fix in RequestListenerInterface#internalInvoke()

> onInitialize() is not called before StatelessForm.onSubmit()
> ------------------------------------------------------------
>
>                 Key: WICKET-3562
>                 URL: https://issues.apache.org/jira/browse/WICKET-3562
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Matt Brictson
>            Assignee: Peter Ertl
>             Fix For: 1.5-RC4
>
>         Attachments: WICKET-3562-quickstart.tgz, WICKET-3562.patch, quickstart.tar.bz2
>
>
> I have a StatelessForm that has initialization code in onInitialize(). When my form is submitted, the onSubmit() method is invoked before onInitialize() is called. This results in a NullPointerException since the form has not yet had a chance to initialize its instance variables.
> I expect that onInitialize() will be called before any listener method is invoked.
> I believe this bug is due to the change in Page.onInitialize() introduced in r1085649.
> Quickstart attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-3562) onInitialize() is not called before StatelessForm.onSubmit()

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

Emond Papegaaij updated WICKET-3562:
------------------------------------

    Attachment: quickstart.tar.bz2

> onInitialize() is not called before StatelessForm.onSubmit()
> ------------------------------------------------------------
>
>                 Key: WICKET-3562
>                 URL: https://issues.apache.org/jira/browse/WICKET-3562
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Matt Brictson
>            Assignee: Peter Ertl
>             Fix For: 1.5-RC4
>
>         Attachments: WICKET-3562-quickstart.tgz, WICKET-3562.patch, quickstart.tar.bz2
>
>
> I have a StatelessForm that has initialization code in onInitialize(). When my form is submitted, the onSubmit() method is invoked before onInitialize() is called. This results in a NullPointerException since the form has not yet had a chance to initialize its instance variables.
> I expect that onInitialize() will be called before any listener method is invoked.
> I believe this bug is due to the change in Page.onInitialize() introduced in r1085649.
> Quickstart attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (WICKET-3562) onInitialize() is not called before StatelessForm.onSubmit()

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

Peter Ertl resolved WICKET-3562.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-RC4
         Assignee: Peter Ertl

> onInitialize() is not called before StatelessForm.onSubmit()
> ------------------------------------------------------------
>
>                 Key: WICKET-3562
>                 URL: https://issues.apache.org/jira/browse/WICKET-3562
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Matt Brictson
>            Assignee: Peter Ertl
>             Fix For: 1.5-RC4
>
>         Attachments: WICKET-3562-quickstart.tgz, WICKET-3562.patch
>
>
> I have a StatelessForm that has initialization code in onInitialize(). When my form is submitted, the onSubmit() method is invoked before onInitialize() is called. This results in a NullPointerException since the form has not yet had a chance to initialize its instance variables.
> I expect that onInitialize() will be called before any listener method is invoked.
> I believe this bug is due to the change in Page.onInitialize() introduced in r1085649.
> Quickstart attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Issue Comment Edited] (WICKET-3562) onInitialize() is not called before StatelessForm.onSubmit()

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

Peter Ertl edited comment on WICKET-3562 at 4/13/11 7:56 PM:
-------------------------------------------------------------

@Martin: I think just initializing the component might not be enough since the referred component might rely on an parent component or the page ifself that needs proper initialization, too. I added initialisation for stateless pages in the request listener interface. place take a look at #1091898.

      was (Author: pete):
    @Martin: I think just initializing the component might not be enough since the referred component might rely on an parent component or page that needs proper initialization. I added initialisation for stateless pages in the request listener interface. place take a look at #1091898.
  
> onInitialize() is not called before StatelessForm.onSubmit()
> ------------------------------------------------------------
>
>                 Key: WICKET-3562
>                 URL: https://issues.apache.org/jira/browse/WICKET-3562
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Matt Brictson
>             Fix For: 1.5-RC4
>
>         Attachments: WICKET-3562-quickstart.tgz, WICKET-3562.patch
>
>
> I have a StatelessForm that has initialization code in onInitialize(). When my form is submitted, the onSubmit() method is invoked before onInitialize() is called. This results in a NullPointerException since the form has not yet had a chance to initialize its instance variables.
> I expect that onInitialize() will be called before any listener method is invoked.
> I believe this bug is due to the change in Page.onInitialize() introduced in r1085649.
> Quickstart attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (WICKET-3562) onInitialize() is not called before StatelessForm.onSubmit()

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

Martin Grigorov reassigned WICKET-3562:
---------------------------------------

    Assignee: Martin Grigorov  (was: Peter Ertl)

> onInitialize() is not called before StatelessForm.onSubmit()
> ------------------------------------------------------------
>
>                 Key: WICKET-3562
>                 URL: https://issues.apache.org/jira/browse/WICKET-3562
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Matt Brictson
>            Assignee: Martin Grigorov
>             Fix For: 1.5-RC4
>
>         Attachments: WICKET-3562-quickstart.tgz, WICKET-3562.patch, quickstart.tar.bz2
>
>
> I have a StatelessForm that has initialization code in onInitialize(). When my form is submitted, the onSubmit() method is invoked before onInitialize() is called. This results in a NullPointerException since the form has not yet had a chance to initialize its instance variables.
> I expect that onInitialize() will be called before any listener method is invoked.
> I believe this bug is due to the change in Page.onInitialize() introduced in r1085649.
> Quickstart attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-3562) onInitialize() is not called before StatelessForm.onSubmit()

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

Emond Papegaaij commented on WICKET-3562:
-----------------------------------------

The attached quickstart produces a stacktrace when the 'Click here!' link is clicked. The HomePage is instantiated, the TestPanel is added, but onInitialize is never called on this panel.

> onInitialize() is not called before StatelessForm.onSubmit()
> ------------------------------------------------------------
>
>                 Key: WICKET-3562
>                 URL: https://issues.apache.org/jira/browse/WICKET-3562
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Matt Brictson
>            Assignee: Peter Ertl
>             Fix For: 1.5-RC4
>
>         Attachments: WICKET-3562-quickstart.tgz, WICKET-3562.patch, quickstart.tar.bz2
>
>
> I have a StatelessForm that has initialization code in onInitialize(). When my form is submitted, the onSubmit() method is invoked before onInitialize() is called. This results in a NullPointerException since the form has not yet had a chance to initialize its instance variables.
> I expect that onInitialize() will be called before any listener method is invoked.
> I believe this bug is due to the change in Page.onInitialize() introduced in r1085649.
> Quickstart attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-3562) onInitialize() is not called before StatelessForm.onSubmit()

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

Martin Grigorov updated WICKET-3562:
------------------------------------

    Fix Version/s:     (was: 1.5-RC4)

> onInitialize() is not called before StatelessForm.onSubmit()
> ------------------------------------------------------------
>
>                 Key: WICKET-3562
>                 URL: https://issues.apache.org/jira/browse/WICKET-3562
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Matt Brictson
>            Assignee: Martin Grigorov
>         Attachments: WICKET-3562-quickstart.tgz, WICKET-3562.patch, quickstart.tar.bz2
>
>
> I have a StatelessForm that has initialization code in onInitialize(). When my form is submitted, the onSubmit() method is invoked before onInitialize() is called. This results in a NullPointerException since the form has not yet had a chance to initialize its instance variables.
> I expect that onInitialize() will be called before any listener method is invoked.
> I believe this bug is due to the change in Page.onInitialize() introduced in r1085649.
> Quickstart attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (WICKET-3562) onInitialize() is not called before StatelessForm.onSubmit()

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

Martin Grigorov resolved WICKET-3562.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-RC4

Closing as fixed in RC4.2.
WicketTester doesn't support testing stateless pages.

> onInitialize() is not called before StatelessForm.onSubmit()
> ------------------------------------------------------------
>
>                 Key: WICKET-3562
>                 URL: https://issues.apache.org/jira/browse/WICKET-3562
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Matt Brictson
>            Assignee: Martin Grigorov
>             Fix For: 1.5-RC4
>
>         Attachments: WICKET-3562-quickstart.tgz, WICKET-3562.patch, quickstart.tar.bz2
>
>
> I have a StatelessForm that has initialization code in onInitialize(). When my form is submitted, the onSubmit() method is invoked before onInitialize() is called. This results in a NullPointerException since the form has not yet had a chance to initialize its instance variables.
> I expect that onInitialize() will be called before any listener method is invoked.
> I believe this bug is due to the change in Page.onInitialize() introduced in r1085649.
> Quickstart attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-3562) onInitialize() is not called before StatelessForm.onSubmit()

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

Matt Brictson updated WICKET-3562:
----------------------------------

    Attachment: WICKET-3562-quickstart.tgz

> onInitialize() is not called before StatelessForm.onSubmit()
> ------------------------------------------------------------
>
>                 Key: WICKET-3562
>                 URL: https://issues.apache.org/jira/browse/WICKET-3562
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Matt Brictson
>         Attachments: WICKET-3562-quickstart.tgz
>
>
> I have a StatelessForm that has initialization code in onInitialize(). When my form is submitted, the onSubmit() method is invoked before onInitialize() is called. This results in a NullPointerException since the form has not yet had a chance to initialize its instance variables.
> I expect that onInitialize() will be called before any listener method is invoked.
> I believe this bug is due to the change in Page.onInitialize() introduced in r1085649.
> Quickstart attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-3562) onInitialize() is not called before StatelessForm.onSubmit()

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

Martin Grigorov commented on WICKET-3562:
-----------------------------------------

The second problem is also fixed.
I'm leaving the ticket open to fix the previous test and add a new one for the second case (Emond's quickstart).

> onInitialize() is not called before StatelessForm.onSubmit()
> ------------------------------------------------------------
>
>                 Key: WICKET-3562
>                 URL: https://issues.apache.org/jira/browse/WICKET-3562
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Matt Brictson
>            Assignee: Peter Ertl
>             Fix For: 1.5-RC4
>
>         Attachments: WICKET-3562-quickstart.tgz, WICKET-3562.patch, quickstart.tar.bz2
>
>
> I have a StatelessForm that has initialization code in onInitialize(). When my form is submitted, the onSubmit() method is invoked before onInitialize() is called. This results in a NullPointerException since the form has not yet had a chance to initialize its instance variables.
> I expect that onInitialize() will be called before any listener method is invoked.
> I believe this bug is due to the change in Page.onInitialize() introduced in r1085649.
> Quickstart attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-3562) onInitialize() is not called before StatelessForm.onSubmit()

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

Martin Grigorov commented on WICKET-3562:
-----------------------------------------

Apparently WicketTester doesn't support stateless pages. The lastRenderedPage is cached after creation and is never reconstructed for the execution of component listeners.
At this point this ticket cannot be tested with WicketTester.

> onInitialize() is not called before StatelessForm.onSubmit()
> ------------------------------------------------------------
>
>                 Key: WICKET-3562
>                 URL: https://issues.apache.org/jira/browse/WICKET-3562
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Matt Brictson
>            Assignee: Martin Grigorov
>         Attachments: WICKET-3562-quickstart.tgz, WICKET-3562.patch, quickstart.tar.bz2
>
>
> I have a StatelessForm that has initialization code in onInitialize(). When my form is submitted, the onSubmit() method is invoked before onInitialize() is called. This results in a NullPointerException since the form has not yet had a chance to initialize its instance variables.
> I expect that onInitialize() will be called before any listener method is invoked.
> I believe this bug is due to the change in Page.onInitialize() introduced in r1085649.
> Quickstart attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-3562) onInitialize() is not called before StatelessForm.onSubmit()

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

Peter Ertl commented on WICKET-3562:
------------------------------------

@Martin: I think just initializing the component might not be enough since the referred component might rely on an parent component or page that needs proper initialization. I added initialisation for stateless pages in the request listener interface. place take a look at #1091898.

> onInitialize() is not called before StatelessForm.onSubmit()
> ------------------------------------------------------------
>
>                 Key: WICKET-3562
>                 URL: https://issues.apache.org/jira/browse/WICKET-3562
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Matt Brictson
>         Attachments: WICKET-3562-quickstart.tgz, WICKET-3562.patch
>
>
> I have a StatelessForm that has initialization code in onInitialize(). When my form is submitted, the onSubmit() method is invoked before onInitialize() is called. This results in a NullPointerException since the form has not yet had a chance to initialize its instance variables.
> I expect that onInitialize() will be called before any listener method is invoked.
> I believe this bug is due to the change in Page.onInitialize() introduced in r1085649.
> Quickstart attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira