You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Benjamin Halbrock (JIRA)" <ji...@apache.org> on 2014/08/04 16:17:14 UTC
[jira] [Commented] (WICKET-195) Improve Javadoc for IDataProvider
[ https://issues.apache.org/jira/browse/WICKET-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14084690#comment-14084690 ]
Benjamin Halbrock commented on WICKET-195:
------------------------------------------
The issue is valid again since Wicket 6.x is using long instead of int.
The example has to be something like:
I'm sorry for not submitting a proper patch, but git is not installed on this computer
class UsersProvider implements IDataProvider
{
public Iterator iterator(long first, long count)
{
//check for bounds
if(first > Integer.MAX_VALUE || first < Integer.MIN_VALUE || count > Integer.MAX_VALUE || count < Integer.MIN_VALUE){
throw new IndexOutOfBoundsException("A index within the range of long was requested, but only int is possible by javax.persistence.Query");
}
((MyApplication)Application.get()).getUserDao().iterator(first, count);
}
public long size()
{
((MyApplication)Application.get()).getUserDao().getCount();
}
public IModel model(Object object)
{
return new DetachableUserModel((User)object);
}
}
> Improve Javadoc for IDataProvider
> ---------------------------------
>
> Key: WICKET-195
> URL: https://issues.apache.org/jira/browse/WICKET-195
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Reporter: Jean-Baptiste Quenot
> Priority: Trivial
> Fix For: 2.0 branch (discontinued), 1.3.0-beta1
>
> Attachments: 20070103-wicket-1.x-IDataProvider
>
>
> Example given in IDataProvider does not compile. Please find a patch attached.
--
This message was sent by Atlassian JIRA
(v6.2#6252)