Re: ReLoad HTML only

2015-04-16 Thread Adam Hammer
Websockets
On Apr 16, 2015 9:35 AM, Arjun Dhar dhar...@yahoo.com wrote:

 Hi,
 for production mode its not sensible to use
 setResourcePollFrequency(Duration.ONE_SECOND);

 Is there a way that one can only allow the HTML's to be reloaded that too
 on
 an Event rather than a polling mechanism?


 -
 Software documentation is like sex: when it is good, it is very, very
 good; and when it is bad, it is still better than nothing!
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/ReLoad-HTML-only-tp4670330.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




Re: Ace Editor Wicket integration?

2015-03-16 Thread Adam Hammer
No warranties implied, however this is the code I use to integrate ACE.
It's a single page application, and I think ace.js is included in the HTML
of the main page application.

/**
 * The AcePanel is the Ace Editor and it's Affiliate Sidebar, Saving and
Integration with the System.
 *
 * It's a bit different then the other
 * Created by Adam on 4/5/14.
 */
public class Ace extends Panel {
private static final Gson gson = new
GsonBuilder().disableHtmlEscaping().create();

public Ace(String id, ModelFile model) {
super(id, model);
setOutputMarkupId(true);
TemplateFile tf = new TemplateFile(model.getObject());
add(new AceForm(aceForm,model));

}

@Override
public MarkupContainer setDefaultModel(IModel? model) {
super.setDefaultModel(model);
return this;
}

public class AceForm extends Form {
private final WebMarkupContainer editor;
private final HiddenField hiddenValue;

String value;
public void setValue(String value) {
this.value = value;
}
public String getValue() {
return value;
}


@Override
public void renderHead(IHeaderResponse response) {
File file = (File)
com.metalrain.simple.core.editor.panels.Ace.this.getDefaultModelObject();
String content = null;
String mode = ace/mode/text;
try {

content = gson.toJson(FileUtils.readFileToString(file,
UTF8));
Media.Format format = Media.Format.fromFile(file);
switch (format) {
case HTML:
mode = ace/mode/html;
break;
case JS:
mode = ace/mode/javascript;
break;
case CSS:
mode = ace/mode/css;
break;
default:
mode = ace/mode/text;
break;
}
} catch (IOException e) {
content = error;
e.printStackTrace();
}

//3 Javascripts.
//1 - Load Editor and Load File
//2 - Listen for Events from Websocket (Request Save) (When
this - Do the next thing Websocket in-Ajax out)
//3 - Wicket Ajax Postback for saving

//To re-iterate, we need to load contents into the editor, we
need to be able to receieve websocket request to save
//We also need to be able to post the results.
final String initAce = var editor=ace.edit(\ +
editor.getMarkupId() + \);editor.setValue( + content +
);editor.getSession().setMode(\ + mode +
\);editor.getSelection().clearSelection();\n\n;
response.render(OnDomReadyHeaderItem.forScript(initAce));

}

public AceForm(String id, final IModelFile model) {
super(id, model);
add(new FileBrowser(new Model((new TemplateFile((File)
com.metalrain.simple.core.editor.panels.Ace.this.getDefaultModelObject())).getWebsite()))
{
@Override
protected void clickFile(AjaxRequestTarget target, File
file) {
MessageHelpers.editEventMessage(target, new Model(new
File(file.getAbsolutePath(;

}
});
add(editor = new WebMarkupContainer(editor));
add(hiddenValue = new HiddenField(value, new
PropertyModel(this, value)));

TemplateFile file = new TemplateFile(model.getObject());
add(new Label(production, file.getWebsite().getProduction()));
add(new Label(environment,
SessionService.get().getAdminSession(Session.get()).getEnv()));
//Cancel and Return



add(new FileDetails(fileDetails, new
CompoundPropertyModel(model.getObject()),new Model(file.getWebsite(;

add(new MyAjaxSubmitLink(submit) {
@Override
protected void onSubmit(AjaxRequestTarget target, Form?
form) {
super.onSubmit(target, form);
saveFile();
}


});
}


/**
 * Get the path to the currently edited file, and save what is
posted
 * If it's a .scss file, let's compile as well.
 */
private void saveFile() {
String path =
com.metalrain.simple.core.editor.panels.Ace.this.getDefaultModelObjectAsString();
try {
FileUtils.write(new File(path), value);
} catch (IOException e) {
e.printStackTrace();
}
if (path.endsWith(.scss)) {
TemplateFile file = new TemplateFile(path);
file.invokeCompass();
}
}



private class MyAjaxSubmitLink extends AjaxSubmitLink {
public MyAjaxSubmitLink(String id) {

Wicket 7 Websocket Gradle or Maven file with Jetty 9.3?

2014-12-10 Thread Adam Hammer
Hi Wicket Group Members.

Anyone have this, I can't seem to get websocket to connect Wicket7.0.0m4, I
suspect my problem is something with dependencies with jetty 9.3+?

The behavior is injected properly, however in the Javascript console in the
client I have the following.

Firefox can't establish a connection to the server at
ws://localhost:8080/wicket/websocket?pageId=0wicket-ajax-baseurl=%3F0wicket-app-name=simple.

My build.gradle dependencies

--- Begin Build.gradle dependencies
dependencies {
compile 'org.apache.wicket:wicket-core:7.+'
compile 'org.apache.wicket:wicket-extensions:7.+'
compile 'org.apache.wicket:wicket-native-websocket-core:7.+'
compile 'org.eclipse.jetty.aggregate:jetty-all:9.+'
compile 'org.apache.wicket:wicket-native-websocket-javax:7.+'
compile 'javax.websocket:javax.websocket-api:1.1'
compile  'org.reflections:reflections-maven:0.9.9-RC1'
compile 'org.apache.httpcomponents:httpclient:4.+'
compile 'org.apache.commons:commons-exec:1.3'
compile  'org.apache.commons:commons-io:1.+'
compile  'org.apache.velocity:velocity:1.+'
compile  'com.google.inject:guice:3.+'
compile  'com.google.guava:guava:+'
compile  'com.google.code.gson:gson:+'
compile  'org.hibernate:hibernate-core:3.+'
compile  'org.hibernate:hibernate-entitymanager:3.+'
compile  'com.h2database:h2:1.+'
compile  'com.googlecode.juniversalchardet:juniversalchardet:1.+'
compile  'org.mockito:mockito-core:1.+'
compile  'org.slf4j:slf4j-log4j12:1.+'
compile 'log4j:log4j:1.+'
compile 'net.lingala.zip4j:zip4j:1.+'
compile 'net.glxn:qrgen:+'
compile 'org.bitcoinj:bitcoinj-core:+'
compile 'commons-io:commons-io:2.4'
compile 'commons-daemon:commons-daemon:1.0.15'
compile 'javax.mail:mail:1.4.1'

testCompile 'junit:junit:4.10'
}
--- Web.xml filter
   filter
filter-namesimple/filter-name

filter-classorg.apache.wicket.protocol.ws.javax.JavaxWebSocketFilter/filter-class
init-param
param-nameapplicationClassName/param-name
param-valuecom.metalrain.simple.SimpleImpl/param-value
/init-param
/filter

filter-mapping
filter-namesimple/filter-name
url-pattern/*/url-pattern
/filter-mapping

 Java Code (Just a websocket behavior, with breakpoints all around,
they don't trigger)
 add(new WebSocketBehavior() {
@Override
public void onEvent(Component component, IEvent? event) {
super.onEvent(component, event);
}

@Override
protected void onConnect(ConnectedMessage message) {
super.onConnect(message);
}

@Override
protected void onPush(WebSocketRequestHandler handler,
IWebSocketPushMessage message) {
super.onPush(handler, message);
}

@Override
protected void onClose(ClosedMessage message) {
super.onClose(message);
}

@Override
protected void onMessage(WebSocketRequestHandler handler,
TextMessage message) {
super.onMessage(handler, message);
}

@Override
protected void onMessage(WebSocketRequestHandler handler,
BinaryMessage binaryMessage) {
super.onMessage(handler, binaryMessage);
}
});
 End Java


Thanks in advance,
   Adam Hammer


Re: Wicket 7 Websocket Gradle or Maven file with Jetty 9.3?

2014-12-10 Thread Adam Hammer
Neither of those break, at the WebSocket parts.

It's embedded jetty 9.3

  server = new Server(Simple.getPort());
WebAppContext bb = new WebAppContext();
bb.setServer(server);
bb.setContextPath(/);
bb.setWar(src/main/webapp);


// START JMX SERVER
// MBeanServer mBeanServer =
ManagementFactory.getPlatformMBeanServer();
// MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer);
// server.getContainer().addEventListener(mBeanContainer);
// mBeanContainer.start();

server.setHandler(bb);

try {
ServerContainer wscontainer =
WebSocketServerContainerInitializer.configureContext(bb);
wscontainer.addEndpoint(EventSocket.class);
server.start();
} catch (Exception e) {
System.out.println(Simple.getPort());
e.printStackTrace();
System.exit(1);
}

I put the EventSocket.class in my code to listen to callbacks on Jetty's
side, nothing is triggered in it either.

Thanks for any help,
   Adam

On Wed, Dec 10, 2014 at 1:17 AM, Martin Grigorov mgrigo...@apache.org
wrote:

 Hi,

 The dependencies look good.
 The ws:/ url also looks good.
 It seems the Endpoint is not registered though.
 How do you start the application ? Do you deploy in standalone Jetty or do
 you use embedded Jetty ?
 Put a breakpoint
 at org.apache.wicket.protocol.ws.javax.WicketEndpoint#onOpen() and
 at
 org.apache.wicket.protocol.ws.javax.WicketServerApplicationConfig#getEndpointConfigs().
 Is any of them called ?

 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov

 On Wed, Dec 10, 2014 at 11:01 AM, Adam Hammer adamhamm...@gmail.com
 wrote:

  Hi Wicket Group Members.
 
  Anyone have this, I can't seem to get websocket to connect
 Wicket7.0.0m4, I
  suspect my problem is something with dependencies with jetty 9.3+?
 
  The behavior is injected properly, however in the Javascript console in
 the
  client I have the following.
 
  Firefox can't establish a connection to the server at
 
 
 ws://localhost:8080/wicket/websocket?pageId=0wicket-ajax-baseurl=%3F0wicket-app-name=simple.
 
  My build.gradle dependencies
 
  --- Begin Build.gradle dependencies
  dependencies {
  compile 'org.apache.wicket:wicket-core:7.+'
  compile 'org.apache.wicket:wicket-extensions:7.+'
  compile 'org.apache.wicket:wicket-native-websocket-core:7.+'
  compile 'org.eclipse.jetty.aggregate:jetty-all:9.+'
  compile 'org.apache.wicket:wicket-native-websocket-javax:7.+'
  compile 'javax.websocket:javax.websocket-api:1.1'
  compile  'org.reflections:reflections-maven:0.9.9-RC1'
  compile 'org.apache.httpcomponents:httpclient:4.+'
  compile 'org.apache.commons:commons-exec:1.3'
  compile  'org.apache.commons:commons-io:1.+'
  compile  'org.apache.velocity:velocity:1.+'
  compile  'com.google.inject:guice:3.+'
  compile  'com.google.guava:guava:+'
  compile  'com.google.code.gson:gson:+'
  compile  'org.hibernate:hibernate-core:3.+'
  compile  'org.hibernate:hibernate-entitymanager:3.+'
  compile  'com.h2database:h2:1.+'
  compile  'com.googlecode.juniversalchardet:juniversalchardet:1.+'
  compile  'org.mockito:mockito-core:1.+'
  compile  'org.slf4j:slf4j-log4j12:1.+'
  compile 'log4j:log4j:1.+'
  compile 'net.lingala.zip4j:zip4j:1.+'
  compile 'net.glxn:qrgen:+'
  compile 'org.bitcoinj:bitcoinj-core:+'
  compile 'commons-io:commons-io:2.4'
  compile 'commons-daemon:commons-daemon:1.0.15'
  compile 'javax.mail:mail:1.4.1'
 
  testCompile 'junit:junit:4.10'
  }
  --- Web.xml filter
 filter
  filter-namesimple/filter-name
 
 
 
 filter-classorg.apache.wicket.protocol.ws.javax.JavaxWebSocketFilter/filter-class
  init-param
  param-nameapplicationClassName/param-name
  param-valuecom.metalrain.simple.SimpleImpl/param-value
  /init-param
  /filter
 
  filter-mapping
  filter-namesimple/filter-name
  url-pattern/*/url-pattern
  /filter-mapping
 
   Java Code (Just a websocket behavior, with breakpoints all around,
  they don't trigger)
   add(new WebSocketBehavior() {
  @Override
  public void onEvent(Component component, IEvent? event) {
  super.onEvent(component, event);
  }
 
  @Override
  protected void onConnect(ConnectedMessage message) {
  super.onConnect(message);
  }
 
  @Override
  protected void onPush(WebSocketRequestHandler handler,
  IWebSocketPushMessage message) {
  super.onPush(handler, message);
  }
 
  @Override
  protected void onClose(ClosedMessage message) {
  super.onClose(message);
  }
 
  @Override
  protected void

Re: Wicket 7 Websocket Gradle or Maven file with Jetty 9.3?

2014-12-10 Thread Adam Hammer
Thank you for that, Looks like everything is working in regards to
Websockets.

Speaking of constructors, RedirectPage() might need a public no-args
constructor. Since wicket 7 it doesn't work with IFrame properly. I
switched to WebMarkupContainer with a Attribute Modifier to get around, but
not serializable.

Thanks again for your help in this matter. I hope to share my Wicket based
project with the group soon! I've been building a CMS/Platform on top of it
since Wicket 5.

Sincerely,
   Adam Hammer


On Wed, Dec 10, 2014 at 5:30 AM, Martin Grigorov mgrigo...@apache.org
wrote:

 On Wed, Dec 10, 2014 at 3:23 PM, Martin Grigorov mgrigo...@apache.org
 wrote:

  The problem is that with your code Jetty won't scan
  for javax.websocket.server.ServerApplicationConfig's in the classpath.
  So org.apache.wicket.protocol.ws.javax.WicketServerApplicationConfig is
  not used at all.
 
  Here is a trick that I've just did to make my websocket demo work in
  embedded Jetty:
 
  Create a class :
 
  package org.apache.wicket.protocol.ws.javax;
 
  public class MyEndpointConfig extends WicketServerEndpointConfig
  {
  }
 
  You need to do that because WicketServerEndpointConfig has package
 private
  visibility. (I'll make it public for the next release)
 

 https://issues.apache.org/jira/browse/WICKET-5789


 
  Then do:
  wscontainer.addEndpoint(new MyEndpointConfig());
 
  Voila!
 
  If you find a way to tell Jetty to do a proper scan in embedded mode then
  please share it with me!
 
  Martin Grigorov
  Wicket Training and Consulting
  https://twitter.com/mtgrigorov
 
  On Wed, Dec 10, 2014 at 1:19 PM, Adam Hammer adamhamm...@gmail.com
  wrote:
 
  Neither of those break, at the WebSocket parts.
 
  It's embedded jetty 9.3
 
server = new Server(Simple.getPort());
  WebAppContext bb = new WebAppContext();
  bb.setServer(server);
  bb.setContextPath(/);
  bb.setWar(src/main/webapp);
 
 
  // START JMX SERVER
  // MBeanServer mBeanServer =
  ManagementFactory.getPlatformMBeanServer();
  // MBeanContainer mBeanContainer = new
  MBeanContainer(mBeanServer);
  // server.getContainer().addEventListener(mBeanContainer);
  // mBeanContainer.start();
 
  server.setHandler(bb);
 
  try {
  ServerContainer wscontainer =
  WebSocketServerContainerInitializer.configureContext(bb);
  wscontainer.addEndpoint(EventSocket.class);
  server.start();
  } catch (Exception e) {
  System.out.println(Simple.getPort());
  e.printStackTrace();
  System.exit(1);
  }
 
  I put the EventSocket.class in my code to listen to callbacks on Jetty's
  side, nothing is triggered in it either.
 
  Thanks for any help,
 Adam
 
  On Wed, Dec 10, 2014 at 1:17 AM, Martin Grigorov mgrigo...@apache.org
  wrote:
 
   Hi,
  
   The dependencies look good.
   The ws:/ url also looks good.
   It seems the Endpoint is not registered though.
   How do you start the application ? Do you deploy in standalone Jetty
 or
  do
   you use embedded Jetty ?
   Put a breakpoint
   at org.apache.wicket.protocol.ws.javax.WicketEndpoint#onOpen() and
   at
  
 
 org.apache.wicket.protocol.ws.javax.WicketServerApplicationConfig#getEndpointConfigs().
   Is any of them called ?
  
   Martin Grigorov
   Wicket Training and Consulting
   https://twitter.com/mtgrigorov
  
   On Wed, Dec 10, 2014 at 11:01 AM, Adam Hammer adamhamm...@gmail.com
   wrote:
  
Hi Wicket Group Members.
   
Anyone have this, I can't seem to get websocket to connect
   Wicket7.0.0m4, I
suspect my problem is something with dependencies with jetty 9.3+?
   
The behavior is injected properly, however in the Javascript console
  in
   the
client I have the following.
   
Firefox can't establish a connection to the server at
   
   
  
 
 ws://localhost:8080/wicket/websocket?pageId=0wicket-ajax-baseurl=%3F0wicket-app-name=simple.
   
My build.gradle dependencies
   
--- Begin Build.gradle dependencies
dependencies {
compile 'org.apache.wicket:wicket-core:7.+'
compile 'org.apache.wicket:wicket-extensions:7.+'
compile 'org.apache.wicket:wicket-native-websocket-core:7.+'
compile 'org.eclipse.jetty.aggregate:jetty-all:9.+'
compile 'org.apache.wicket:wicket-native-websocket-javax:7.+'
compile 'javax.websocket:javax.websocket-api:1.1'
compile  'org.reflections:reflections-maven:0.9.9-RC1'
compile 'org.apache.httpcomponents:httpclient:4.+'
compile 'org.apache.commons:commons-exec:1.3'
compile  'org.apache.commons:commons-io:1.+'
compile  'org.apache.velocity:velocity:1.+'
compile  'com.google.inject:guice:3.+'
compile  'com.google.guava:guava:+'
compile  'com.google.code.gson:gson:+'
compile  'org.hibernate:hibernate-core:3.+'
compile  'org.hibernate:hibernate-entitymanager:3

Re: Web sockets - version confusion

2014-11-10 Thread Adam Hammer
I also found it confusing, I use wicket-native-websocket-jetty9 with wicket
6.18 and jetty 9.0.+

I was not able to get running on jetty 9.2 yet.

Adam
On Nov 10, 2014 5:04 PM, Niranjan Rao nhr...@gmail.com wrote:

 Greetings,

 Document at https://wicket.apache.org/guide/guide/nativewebsockets.html
 shows maven example. I am assuming that the version in the example is
 wicket version.

 However maven repository search does not show jar files for version 6.18.0
 or any versions in 6.* series. Wicket-native-websocket does show all the
 versions at http://search.maven.org/#search|gav|1|g%3A%22org.
 apache.wicket%22%20AND%20a%3A%22wicket-native-websocket%22
 http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.apache.wicket%22%20AND%20a%3A%22wicket-native-websocket%22

 Is this documentation problem? Should I be using wicket-native-websocket
 and not wicket-native-websocket-javax for jsr 356.

 Regards,

 Niranjan

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




Re: hiding a bit of markup

2014-11-07 Thread Adam Hammer
Hi garret

In onconfigure of your panel, Setvisibility of foo based on flag there.
Every time page loads or Ajax includes panel it'll handle the visibility.

Adam
On Nov 7, 2014 8:33 AM, Garret Wilson gar...@globalmentor.com wrote:

 All,

 I have a little list in HTML:

ul
   lifoo/li
   libar/li
/ul


 There are some wicket:message tags, but no components on the page. I
 want only to show the foo list item if the flag variable is set to true.
 What's the easiest way to do this in Wicket?

 I've read the documentation on controlling HTML http://wicket.apache.org/
 guide/guide/keepControl.html. It seems I can use a WebMarkupContainer,
 but only if I add some extra HTML. Obviously I don't want this:

ul
   div wicket:id=foolifoo/li/div
   libar/li
/ul


 It seems I can also use a Fragment (which presumably wouldn't require the
 extra HTML because it would use wicket:fragment, but the constructor for
 that component requires that I specify the Wicket ID of the container,
 which doesn't exist.

 How can I simply reference some piece of HTML so that I can show or hide
 it based on some flag?

 Garret



Re: problem with AbstractEntityModel from Igor Vaynberg

2014-05-15 Thread Adam Hammer
On May 1, 2014 6:01 AM, mscoon msc...@gmail.com wrote:

 Heiner,

 You didn't tell us which dependency injection framework you  you using.

 If you're using Spring then simply use the @SpringBean annotation to get a
 reference to an EntityManager or a Dao.

 @SpringBean automatically works only for components so you'll also need to
 add a call to injector to your model's constructor.

 public class MyModel implements IModel {

   @SpringBean
   EntityManager entityManager;

   public MyModel() {
 Injector.get().inject(this);
   }

 ...
 }

 This will take care of instantiating all @SpringBean annotated fields as
 well are handle their serialization/deserialization.

 Marios



 On Thu, May 1, 2014 at 3:42 PM, Yahoo hansheinrichbr...@yahoo.de wrote:

  I tried the AbstractEntityModel http://http://wicketinaction.
  com/2008/09/building-a-smart-entitymodel/ from Igor Vaynberg but I
  didn't get
  solved the @Dependency annotation from Vaynbergs salve.
  Is there another solution for the Hibernate integration for models.
 
  Best regards
  Heiner
 
 


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

Re: searching for a Rich text editor

2013-11-18 Thread Adam Hammer
For the most part you just integrate any rich text editor at the HTML/JS
layer with a TextArea in wicket.

There might need to be JS hooks in there in order to ensure that the Editor
content is in the TextArea when the user submits the form.

Overall though you don't need special integration for your average rte.

Sincerely,
  Adam


On Mon, Nov 18, 2013 at 1:13 PM, Dirk Wichmann dir...@team-wichmann.dewrote:

 Hi,

 I'm searching for Rich text editor to integrate in my page, but at the
 moment nothing seems to work.
 Found
 Tynimce
 Wicket-jQuery (Kendo)
 Visural Wicket
 and examples, but they dont work with wicket 6.12 maybe.
 Have you maybe any hint for me??

 Thanks in advance
 Cheers
 Dirk


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




Re: Efficient pagination with MongoDB and Wicket

2013-11-09 Thread Adam Hammer
It sounds like you are trying to force a paradigm that doesn't fit with the
api's you've chosen.

It's not very hard to implement a custom pager using a RepeatingView or
RefreshingView. In your model object you'd have something like static
ListYourPojo getResults(int start, int count) where you'd put your mongo
query with the inputs you want.

getResults would be used in the panel in order to refresh it's contents.
When you want to page, you don't even need to recreate the views, just
assign the newly fetched YourPojo models to the old panels, and the data
should update.

Architecturally it would be something like this
PagingPanel
   Next Button  Back Button
 Container  //Needed for Ajax updating of repeating views
   RepeatingView

When you click either button, it would call something like
updateList(getResults(start, count)), it would then removeAll() on the
children and recreate them (or update their models).

I do everything over ajax, so I'd clear the repeater, reload it's contents,
add it's container to the ajax target and broadcast a message about the
action so other components could react.

Just start with the basics and then iterate on additional supported
features, at it's core you only need a panel, some buttons and a repeating
view, you can adapt the core to any query model/requirements.

Hope that helps a bit.
  Adam


On Sat, Nov 9, 2013 at 6:21 AM, Till Klocke till.klo...@gmail.com wrote:

 Hi!

 I'm trying to get an efficient pagination with MongoDB and Wicket working.
 The problem with MongoDB is, that the skip operation can become really
 expensive on large datasets (basically every time you really need
 pagination). So the best practice for pagination in MongoDB is to make
 range queries. So you build your query and limit it to i.e. 50 documents,
 if you need the next 50 you make the same query, but specify that you are
 only interested in objects where the objectId is higher than in the last
 item of the last query and so on.
 The Wicket IDataProvider unfortunately only gives you the primitive long to
 work with, which is insufficient for this case.
 Another problem with MongoDB is, that even count can become quite
 expensive. So I would like to avoid to give the total amount of available
 items from the beginning.
 Currently I  have a google like pagination in mind where the
 PagingNavigator only shows 10 or so page links and as the user goes through
 the pages it dynamically adds more page links to the end and removes the
 first links at the beginning.
 But unfortunately I'm kinda stuck. I tried to create some kind of
 IRangeDataProviderI where I is a datatype for the range based query and
 replaces the long for skipping. But now I have to carry this through
 everything like DataView, DataBaseView and all the interfaces. Thats not
 nice, since it could also be needed to dynamically alter the type of the
 range item for example if you change the sorting. Apart from that I tink
 I ran into many more problems so that I am as far away from a working
 protype as I can be.
 So I am asking here for help. Probably some of the more experienced Wicket
 developers (more experienced than me) already build something like that or
 even published a small library project for this use case.

 Thanks in advance

 Regards,

 Till