[jira] [Commented] (WICKET-6616) Stateless pages are not rendered anymore before executing a behavior
[ https://issues.apache.org/jira/browse/WICKET-6616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16703541#comment-16703541 ] Sven Meier commented on WICKET-6616: After some investigation I'm not sure whether that change from WICKET-6608 is so bad afterall: What if a component is in the stateless page from the start (i.e. no queueing or adding from onInitialize() involved)? In that case #onConfigure() will not be called either. So either we don't care for this (and dequeued might not be configured too) or we have to change PageAndComponentProvider to always render stateless pages, before any non-configured component is picked from the page. > Stateless pages are not rendered anymore before executing a behavior > > > Key: WICKET-6616 > URL: https://issues.apache.org/jira/browse/WICKET-6616 > Project: Wicket > Issue Type: Bug > Components: wicket-core >Affects Versions: 8.2.0 >Reporter: Thomas Heigl >Priority: Major > Attachments: myproject.zip > > > I just upgraded from 8.1.0 to 8.2.0 and a bunch of my tests broke. A required > form component on a stateless page that is hidden in "onConfigure" started to > report an error after the upgrade. > The problem was introduced in WICKET-6608 by this commit: > [https://github.com/apache/wicket/commit/147f6d33f839edd9a6eb53ce9c20b4cde07fc938] > Previously, the page was initialized *and* rendered before returning the > component. Now, for some reason, the page is initialized and the component > returned immediately if it exists. This breaks all visibility/enabled > conditions that are evaluated later in the life cycle of stateless components. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (WICKET-6608) Stateless page, mix of queue and add can cause unforseen consequences
[ https://issues.apache.org/jira/browse/WICKET-6608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16703130#comment-16703130 ] Sven Meier edited comment on WICKET-6608 at 11/29/18 4:58 PM: -- All components directly *queued into a page* are *immediately* dequeued, *including* all queued component in the child hierarchy: * when you queue your form to the page, all components are immediately dequeued into the component hierarchy * but when you add your form to the page, all queued components inside of it *stay queued* until rendering In the latter case PageAndComponentProvider does not find the component in the page, thus rendering it once to find the queued (not yet added) component. So the label is already configured before the button is submitted and is able to change the model object. was (Author: svenmeier): All components directly *queued into a page* are *immediately* dequeued, *including* all queued component in the child hierarchy: * when you queue your form to the page, all components are immediately dequeued into the component hierarchy * but when you add your form to the page, all queued components inside of it *stay queued* until rendering In the latter case PageAndComponentProvider does not find the component in the page, thus rendering it once to find the queued (not yet added) component. So the label is already configured before the button is submitted changes the model object. > Stateless page, mix of queue and add can cause unforseen consequences > - > > Key: WICKET-6608 > URL: https://issues.apache.org/jira/browse/WICKET-6608 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 8.1.0 >Reporter: Oddgeir Bell >Assignee: Andrea Del Bene >Priority: Minor > Fix For: 8.2.0, 9.0.0 > > Attachments: statelessQueueAdd.zip > > > We are in the process of upgrading a Wicket 6.x application to Wicket 8.1, > mostly because we needed stateless ajax. > In the process we discovered something quite unexpected (took a few days to > figure out the cause). > This is the issue: > Stateless page. > Hierarchy like so: > Page > ->Container > ->Label > ->AjaxButton > > The label should only be visible when it's model has data, so we override > onConfigure and set visible = (getDefaultModelObject != null). > This works if all components are added with add(Component). > It also works if all components are added with queue(Component). > BUT, if the container is added with add(Component) and the AjaxButton is > added with queue(Component), it doesn't work. > Actually, if just one component is added to the page with queue(Component), > things seem to work (as long as it is queue-ed AFTER the container is add-ed) > I could not find any information on dangers of mixing add/queue with my > google-fu, so it may look like it's a bug? > > Attached quickstart that shows the issue. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (WICKET-6616) Stateless pages are not rendered anymore before executing a behavior
[ https://issues.apache.org/jira/browse/WICKET-6616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16703230#comment-16703230 ] Andrea Del Bene commented on WICKET-6616: - Hi [~thomas.heigl], I totally agree with Sven, we probably need to revert the commit for WICKET-6608. As you correctly noted since 8.2.0 those components not directly added to the page are no more rendered if they are added during initialization phase. > Stateless pages are not rendered anymore before executing a behavior > > > Key: WICKET-6616 > URL: https://issues.apache.org/jira/browse/WICKET-6616 > Project: Wicket > Issue Type: Bug > Components: wicket-core >Affects Versions: 8.2.0 >Reporter: Thomas Heigl >Priority: Major > Attachments: myproject.zip > > > I just upgraded from 8.1.0 to 8.2.0 and a bunch of my tests broke. A required > form component on a stateless page that is hidden in "onConfigure" started to > report an error after the upgrade. > The problem was introduced in WICKET-6608 by this commit: > [https://github.com/apache/wicket/commit/147f6d33f839edd9a6eb53ce9c20b4cde07fc938] > Previously, the page was initialized *and* rendered before returning the > component. Now, for some reason, the page is initialized and the component > returned immediately if it exists. This breaks all visibility/enabled > conditions that are evaluated later in the life cycle of stateless components. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (WICKET-6608) Stateless page, mix of queue and add can cause unforseen consequences
[ https://issues.apache.org/jira/browse/WICKET-6608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16703130#comment-16703130 ] Sven Meier commented on WICKET-6608: All components directly *queued into a page* are *immediately* dequeued, *including* all queued component in the child hierarchy: * when you queue your form to the page, all components are immediately dequeued into the component hierarchy * but when you add your form to the page, all queued components inside of it *stay queued* until rendering In the latter case PageAndComponentProvider does not find the component in the page, thus rendering it once to find the queued (not yet added) component. So the label is already configured before the button is submitted changes the model object. > Stateless page, mix of queue and add can cause unforseen consequences > - > > Key: WICKET-6608 > URL: https://issues.apache.org/jira/browse/WICKET-6608 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 8.1.0 >Reporter: Oddgeir Bell >Assignee: Andrea Del Bene >Priority: Minor > Fix For: 8.2.0, 9.0.0 > > Attachments: statelessQueueAdd.zip > > > We are in the process of upgrading a Wicket 6.x application to Wicket 8.1, > mostly because we needed stateless ajax. > In the process we discovered something quite unexpected (took a few days to > figure out the cause). > This is the issue: > Stateless page. > Hierarchy like so: > Page > ->Container > ->Label > ->AjaxButton > > The label should only be visible when it's model has data, so we override > onConfigure and set visible = (getDefaultModelObject != null). > This works if all components are added with add(Component). > It also works if all components are added with queue(Component). > BUT, if the container is added with add(Component) and the AjaxButton is > added with queue(Component), it doesn't work. > Actually, if just one component is added to the page with queue(Component), > things seem to work (as long as it is queue-ed AFTER the container is add-ed) > I could not find any information on dangers of mixing add/queue with my > google-fu, so it may look like it's a bug? > > Attached quickstart that shows the issue. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (WICKET-6616) Stateless pages are not rendered anymore before executing a behavior
[ https://issues.apache.org/jira/browse/WICKET-6616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16703119#comment-16703119 ] Thomas Heigl edited comment on WICKET-6616 at 11/29/18 1:01 PM: Attached quickstart with test that passes in 8.1.0 and fails in 8.2.0. The test only passes if the target component cannot be resolved immediately. So if I add the form in the constructor, instead of in {{onInitialize}}, the test already fails in 8.1.0. was (Author: thomas.heigl): Attached quickstart with test that passes in 8.1.0 and fails in 8.2.0. The test only passes if the target component cannot be resolved immediately. So if I add the form in the constructor, instead of in {{onInitialize}}, the test fails in 8.1.0 as well. > Stateless pages are not rendered anymore before executing a behavior > > > Key: WICKET-6616 > URL: https://issues.apache.org/jira/browse/WICKET-6616 > Project: Wicket > Issue Type: Bug > Components: wicket-core >Affects Versions: 8.2.0 >Reporter: Thomas Heigl >Priority: Major > Attachments: myproject.zip > > > I just upgraded from 8.1.0 to 8.2.0 and a bunch of my tests broke. A required > form component on a stateless page that is hidden in "onConfigure" started to > report an error after the upgrade. > The problem was introduced in WICKET-6608 by this commit: > [https://github.com/apache/wicket/commit/147f6d33f839edd9a6eb53ce9c20b4cde07fc938] > Previously, the page was initialized *and* rendered before returning the > component. Now, for some reason, the page is initialized and the component > returned immediately if it exists. This breaks all visibility/enabled > conditions that are evaluated later in the life cycle of stateless components. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (WICKET-6616) Stateless pages are not rendered anymore before executing a behavior
[ https://issues.apache.org/jira/browse/WICKET-6616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16703119#comment-16703119 ] Thomas Heigl edited comment on WICKET-6616 at 11/29/18 12:56 PM: - Attached quickstart with test that passes in 8.1.0 and fails in 8.2.0. The test only passes if the target component cannot be resolved immediately. So if I add the form in the constructor, instead of in {{onInitialize}}, the test fails in 8.1.0 as well. was (Author: thomas.heigl): Attached quickstart with test that passes in 8.1.0 and fails in 8.2.0. The test only fails if the target component cannot be resolved immediately. So if I add the form in the constructor, instead of in {{onInitialize}}, the test passes in 8.2.0 as well. > Stateless pages are not rendered anymore before executing a behavior > > > Key: WICKET-6616 > URL: https://issues.apache.org/jira/browse/WICKET-6616 > Project: Wicket > Issue Type: Bug > Components: wicket-core >Affects Versions: 8.2.0 >Reporter: Thomas Heigl >Priority: Major > Attachments: myproject.zip > > > I just upgraded from 8.1.0 to 8.2.0 and a bunch of my tests broke. A required > form component on a stateless page that is hidden in "onConfigure" started to > report an error after the upgrade. > The problem was introduced in WICKET-6608 by this commit: > [https://github.com/apache/wicket/commit/147f6d33f839edd9a6eb53ce9c20b4cde07fc938] > Previously, the page was initialized *and* rendered before returning the > component. Now, for some reason, the page is initialized and the component > returned immediately if it exists. This breaks all visibility/enabled > conditions that are evaluated later in the life cycle of stateless components. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (WICKET-6616) Stateless pages are not rendered anymore before executing a behavior
[ https://issues.apache.org/jira/browse/WICKET-6616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16703121#comment-16703121 ] Thomas Heigl commented on WICKET-6616: -- I wasn't able to write a clean test and had to resort to throwing an {{AssertionError}}. Asserting with {{tester.hasNoErrorMessages()}} does not seem to work with stateless forms in my example. Error messages seem to be lost somehow. > Stateless pages are not rendered anymore before executing a behavior > > > Key: WICKET-6616 > URL: https://issues.apache.org/jira/browse/WICKET-6616 > Project: Wicket > Issue Type: Bug > Components: wicket-core >Affects Versions: 8.2.0 >Reporter: Thomas Heigl >Priority: Major > Attachments: myproject.zip > > > I just upgraded from 8.1.0 to 8.2.0 and a bunch of my tests broke. A required > form component on a stateless page that is hidden in "onConfigure" started to > report an error after the upgrade. > The problem was introduced in WICKET-6608 by this commit: > [https://github.com/apache/wicket/commit/147f6d33f839edd9a6eb53ce9c20b4cde07fc938] > Previously, the page was initialized *and* rendered before returning the > component. Now, for some reason, the page is initialized and the component > returned immediately if it exists. This breaks all visibility/enabled > conditions that are evaluated later in the life cycle of stateless components. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (WICKET-6616) Stateless pages are not rendered anymore before executing a behavior
[ https://issues.apache.org/jira/browse/WICKET-6616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16703119#comment-16703119 ] Thomas Heigl commented on WICKET-6616: -- Attached quickstart with test that passes in 8.1.0 and fails in 8.2.0. The test only fails if the target component cannot be resolved immediately. So if I add the form in the constructor, instead of in {{onInitialize}}, the test passes in 8.2.0 as well. > Stateless pages are not rendered anymore before executing a behavior > > > Key: WICKET-6616 > URL: https://issues.apache.org/jira/browse/WICKET-6616 > Project: Wicket > Issue Type: Bug > Components: wicket-core >Affects Versions: 8.2.0 >Reporter: Thomas Heigl >Priority: Major > Attachments: myproject.zip > > > I just upgraded from 8.1.0 to 8.2.0 and a bunch of my tests broke. A required > form component on a stateless page that is hidden in "onConfigure" started to > report an error after the upgrade. > The problem was introduced in WICKET-6608 by this commit: > [https://github.com/apache/wicket/commit/147f6d33f839edd9a6eb53ce9c20b4cde07fc938] > Previously, the page was initialized *and* rendered before returning the > component. Now, for some reason, the page is initialized and the component > returned immediately if it exists. This breaks all visibility/enabled > conditions that are evaluated later in the life cycle of stateless components. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (WICKET-6616) Stateless pages are not rendered anymore before executing a behavior
[ https://issues.apache.org/jira/browse/WICKET-6616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Heigl updated WICKET-6616: - Attachment: myproject.zip > Stateless pages are not rendered anymore before executing a behavior > > > Key: WICKET-6616 > URL: https://issues.apache.org/jira/browse/WICKET-6616 > Project: Wicket > Issue Type: Bug > Components: wicket-core >Affects Versions: 8.2.0 >Reporter: Thomas Heigl >Priority: Major > Attachments: myproject.zip > > > I just upgraded from 8.1.0 to 8.2.0 and a bunch of my tests broke. A required > form component on a stateless page that is hidden in "onConfigure" started to > report an error after the upgrade. > The problem was introduced in WICKET-6608 by this commit: > [https://github.com/apache/wicket/commit/147f6d33f839edd9a6eb53ce9c20b4cde07fc938] > Previously, the page was initialized *and* rendered before returning the > component. Now, for some reason, the page is initialized and the component > returned immediately if it exists. This breaks all visibility/enabled > conditions that are evaluated later in the life cycle of stateless components. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (WICKET-6616) Stateless pages are not rendered anymore before executing a behavior
[ https://issues.apache.org/jira/browse/WICKET-6616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16703049#comment-16703049 ] Sven Meier commented on WICKET-6616: Hi [~thomas.heigl], we'll probably revert the change done in WICKET-6608, but need some time to investigate this. In the meantime you could strengthen the case for this issue by providing a testcase that we can include in Wicket. It seems stateless component lifecycle is still not properly defined (and validated with tests). Thanks Sven > Stateless pages are not rendered anymore before executing a behavior > > > Key: WICKET-6616 > URL: https://issues.apache.org/jira/browse/WICKET-6616 > Project: Wicket > Issue Type: Bug > Components: wicket-core >Affects Versions: 8.2.0 >Reporter: Thomas Heigl >Priority: Major > > I just upgraded from 8.1.0 to 8.2.0 and a bunch of my tests broke. A required > form component on a stateless page that is hidden in "onConfigure" started to > report an error after the upgrade. > The problem was introduced in WICKET-6608 by this commit: > [https://github.com/apache/wicket/commit/147f6d33f839edd9a6eb53ce9c20b4cde07fc938] > Previously, the page was initialized *and* rendered before returning the > component. Now, for some reason, the page is initialized and the component > returned immediately if it exists. This breaks all visibility/enabled > conditions that are evaluated later in the life cycle of stateless components. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (WICKET-6616) Stateless pages are not rendered anymore before executing a behavior
[ https://issues.apache.org/jira/browse/WICKET-6616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16703030#comment-16703030 ] Thomas Heigl commented on WICKET-6616: -- Hi [~bitstorm]! Could you look into this? I think that the fix for WICKET-6608 has broken the component lifecycle for stateless pages. > Stateless pages are not rendered anymore before executing a behavior > > > Key: WICKET-6616 > URL: https://issues.apache.org/jira/browse/WICKET-6616 > Project: Wicket > Issue Type: Bug > Components: wicket-core >Affects Versions: 8.2.0 >Reporter: Thomas Heigl >Priority: Major > > I just upgraded from 8.1.0 to 8.2.0 and a bunch of my tests broke. A required > form component on a stateless page that is hidden in "onConfigure" started to > report an error after the upgrade. > The problem was introduced in WICKET-6608 by this commit: > [https://github.com/apache/wicket/commit/147f6d33f839edd9a6eb53ce9c20b4cde07fc938] > Previously, the page was initialized *and* rendered before returning the > component. Now, for some reason, the page is initialized and the component > returned immediately if it exists. This breaks all visibility/enabled > conditions that are evaluated later in the life cycle of stateless components. -- This message was sent by Atlassian JIRA (v7.6.3#76005)