[ 
https://issues.apache.org/jira/browse/WICKET-808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517329
 ] 

Eelco Hillenius commented on WICKET-808:
----------------------------------------

I changed the header of this bug report, and I'm going ahead with changing 
renderIterator of ListView and Loop to use the number of children they have 
rather than the element count of their models. Like I pointed out above, the 
model can change in between the call to onBeforeRender and renderIterator, but 
onBeforeRender adds the children which have to be rendered.

> renderIterator of ListView and Loop should use the number of children rather 
> than the current size of the model
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-808
>                 URL: https://issues.apache.org/jira/browse/WICKET-808
>             Project: Wicket
>          Issue Type: Improvement
>    Affects Versions: 1.3.0-beta2
>            Reporter: Eelco Hillenius
>            Assignee: Eelco Hillenius
>             Fix For: 1.3.0-beta3
>
>
> Currently, when you provide null elements in the model (renderIterator), 
> you'll get a NPE exception further down the line (in ListView#renderItem for 
> instance). We should either throw an meaningful exception earlier, or we 
> should make repeaters more lenient and just print out a warning message. I 
> opt for the latter. This should be clear enough when developing (you probably 
> would wonder where your data is to start with) and a lot better than 
> unexpectedly getting NPEs in a production systems in case you missed it.

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

Reply via email to