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