Nick Busey wrote:
> 
> Hey, I'm trying to use a RefreshingView, but can't figure it out. On top
> of that, the examples are broken: 
> http://wicketstuff.org/wicket13/repeater/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.repeater.RefreshingPage
> http://wicketstuff.org/wicket13/repeater/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.repeater.RefreshingPage
> .
> 
> Can someone either fix that example or point me to another example? 
> 

A quick example:

public Home() {
                RefreshingView view = new RefreshingView("view") {
                        protected Iterator getItemModels() {
                                List<IModel> models = new
ArrayList<IModel>();
                                int n = new Random().nextInt(10);
                                for (int i = 0; i < n; i++) {
                                        models.add(new Model(i));
                                }
                                return models.iterator();
                        }
                        protected void populateItem(Item item) {
                                item.add(new Label("label",
item.getModel()));
                        }
                };
                add(view);
        }

-- 
View this message in context: 
http://www.nabble.com/RefreshingView-example-broken-tf4536092.html#a12951981
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to