You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Ricardo Mayerhofer (JIRA)" <ji...@apache.org> on 2009/09/21 18:11:15 UTC

[jira] Created: (WICKET-2482) Checkgroup doens't work with stateless pages and listview

Checkgroup doens't work with stateless pages and listview
---------------------------------------------------------

                 Key: WICKET-2482
                 URL: https://issues.apache.org/jira/browse/WICKET-2482
             Project: Wicket
          Issue Type: Bug
            Reporter: Ricardo Mayerhofer


I think this is related to:
https://issues.apache.org/jira/browse/WICKET-1545

When using checkgroup with listviews and stateless pages, checkgroup is not able to convertValues. The cause seems that listview onbeforeRender is never called on form submission. Thus children are never populated and check is not added to the hierarchy. 

The following error appears:
submitted http post value [12345] for CheckGroup component [0:form:checkGroup] contains an illegal relative path element [12345] which does not point to a Check component. Due to this the CheckGroup component cannot resolve the selected Check component pointed to by the illegal value. A possible reason is that componment hierarchy changed between rendering and form submission

I'm using a stateless check component, that overides getValue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2482) Checkgroup doens't work with stateless pages and listview

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

Ricardo Mayerhofer commented on WICKET-2482:
--------------------------------------------

Hi Igor,
The underlying problem is that the form post hierarchy never matches render hierarchy because populateItem is never called on the former. So even if I use my PK to identify the check, it will never match any check because no check is added at all.

Also on stateless pages listView.getItems() on form submit always returns empty, for the same reason above.

The code bellow represents what I'm trying to say:

DataView myDataView = new DataView( "myDataView", new MyProvider()) {
public void populateItem( Item item ) {
                               // Never called when rebuild page on form submit.
				item.add( new Check() );
}
}

Right now, it not possible to use stateless check unless you overide checkgroup and do your own retrieve strategy (e.g. retrieving the model from the database based on the passed values). If it won't get fixed perhaps we should update the javadocs of check, including this additional step or remove the instructions at all.

> Checkgroup doens't work with stateless pages and listview
> ---------------------------------------------------------
>
>                 Key: WICKET-2482
>                 URL: https://issues.apache.org/jira/browse/WICKET-2482
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Ricardo Mayerhofer
>            Assignee: Igor Vaynberg
>
> I think this is related to:
> https://issues.apache.org/jira/browse/WICKET-1545
> When using checkgroup with listviews and stateless pages, checkgroup is not able to convertValues. The cause seems that listview onbeforeRender is never called on form submission. Thus children are never populated and check is not added to the hierarchy. 
> The following error appears:
> submitted http post value [12345] for CheckGroup component [0:form:checkGroup] contains an illegal relative path element [12345] which does not point to a Check component. Due to this the CheckGroup component cannot resolve the selected Check component pointed to by the illegal value. A possible reason is that componment hierarchy changed between rendering and form submission
> I'm using a stateless check component, that overides getValue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2482) Checkgroup doens't work with stateless pages and listview

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

Igor Vaynberg commented on WICKET-2482:
---------------------------------------

yes, repeaters and forms do not play well together on stateless pages. even if we attempted to repopulate the dataview there is no guarantee the same data would be shown - so you may end up with the same error or worse, having a different object put into your model then the one the user originally selected. you are better off using a stateful page.

> Checkgroup doens't work with stateless pages and listview
> ---------------------------------------------------------
>
>                 Key: WICKET-2482
>                 URL: https://issues.apache.org/jira/browse/WICKET-2482
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Ricardo Mayerhofer
>            Assignee: Igor Vaynberg
>
> I think this is related to:
> https://issues.apache.org/jira/browse/WICKET-1545
> When using checkgroup with listviews and stateless pages, checkgroup is not able to convertValues. The cause seems that listview onbeforeRender is never called on form submission. Thus children are never populated and check is not added to the hierarchy. 
> The following error appears:
> submitted http post value [12345] for CheckGroup component [0:form:checkGroup] contains an illegal relative path element [12345] which does not point to a Check component. Due to this the CheckGroup component cannot resolve the selected Check component pointed to by the illegal value. A possible reason is that componment hierarchy changed between rendering and form submission
> I'm using a stateless check component, that overides getValue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-2482) Checkgroup doens't work with stateless pages and listview

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

Igor Vaynberg resolved WICKET-2482.
-----------------------------------

    Resolution: Won't Fix
      Assignee: Igor Vaynberg

once you override getvalue() you are on your own. you are using a listview so the component path is not stable, maybe if you call listview.setreuseitems(true) you will have more luck. otherwise you can use your entities' pk to identifiy each check.

> Checkgroup doens't work with stateless pages and listview
> ---------------------------------------------------------
>
>                 Key: WICKET-2482
>                 URL: https://issues.apache.org/jira/browse/WICKET-2482
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Ricardo Mayerhofer
>            Assignee: Igor Vaynberg
>
> I think this is related to:
> https://issues.apache.org/jira/browse/WICKET-1545
> When using checkgroup with listviews and stateless pages, checkgroup is not able to convertValues. The cause seems that listview onbeforeRender is never called on form submission. Thus children are never populated and check is not added to the hierarchy. 
> The following error appears:
> submitted http post value [12345] for CheckGroup component [0:form:checkGroup] contains an illegal relative path element [12345] which does not point to a Check component. Due to this the CheckGroup component cannot resolve the selected Check component pointed to by the illegal value. A possible reason is that componment hierarchy changed between rendering and form submission
> I'm using a stateless check component, that overides getValue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.