You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Michael Sparer <mi...@gmx.at> on 2009/11/09 14:53:40 UTC

Unnecessary method calls in IDataProvider?

Hey,

I could have sworn that if a IDataProvider used in a DataView returns 0 
as size, the iterator(int,int) method won't be called. But that 
assumption proved me wrong some minutes ago. Is there any specific 
reason why iterator gets called when the only possible result is an 
empty Iterator? Wouldn't it be more sensible to assume an empty iterator 
if size() returns 0 and leave out the method call?

regards,

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Unnecessary method calls in IDataProvider?

Posted by Michael Sparer <mi...@gmx.at>.
done: https://issues.apache.org/jira/browse/WICKET-2568

regards,


igor.vaynberg wrote:
> 
> jira issue please
> 
> -igor
> 
> On Mon, Nov 9, 2009 at 5:53 AM, Michael Sparer <mi...@gmx.at>
> wrote:
>> Hey,
>>
>> I could have sworn that if a IDataProvider used in a DataView returns 0
>> as
>> size, the iterator(int,int) method won't be called. But that assumption
>> proved me wrong some minutes ago. Is there any specific reason why
>> iterator
>> gets called when the only possible result is an empty Iterator? Wouldn't
>> it
>> be more sensible to assume an empty iterator if size() returns 0 and
>> leave
>> out the method call?
>>
>> regards,
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 


-----
Michael Sparer
http://techblog.molindo.at
-- 
View this message in context: http://old.nabble.com/Unnecessary-method-calls-in-IDataProvider--tp26266771p26282885.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Unnecessary method calls in IDataProvider?

Posted by Igor Vaynberg <ig...@gmail.com>.
jira issue please

-igor

On Mon, Nov 9, 2009 at 5:53 AM, Michael Sparer <mi...@gmx.at> wrote:
> Hey,
>
> I could have sworn that if a IDataProvider used in a DataView returns 0 as
> size, the iterator(int,int) method won't be called. But that assumption
> proved me wrong some minutes ago. Is there any specific reason why iterator
> gets called when the only possible result is an empty Iterator? Wouldn't it
> be more sensible to assume an empty iterator if size() returns 0 and leave
> out the method call?
>
> regards,
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org