You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by avchavan <av...@yahoo.co.in> on 2015/04/10 07:18:28 UTC

Skipping Listview iterations

Hi, 
I is there a way to skip the remaining listView iterations over the provided
list in case we encounter an exception while populating data for the first
item?

What i have is:

@Override
protected void populateItem(final ListItem<SomeList> item) {
final SomeModel someModel = item.getModelObject();
//make call for fetching some additional data based on condition.
//if an exception is thrown by that call then catch it and set appropriate
error message
//and skip the remaining iterations over the list

//populate the remaining items

}

Thanks

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Skipping-Listview-iterations-tp4670235.html
Sent from the Users forum 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: Skipping Listview iterations

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
You can set them visible false, but in general would be not so good design
pattern. Rather filter the SomeList items in the model that provides them
or something along those lines.

**
Martin

2015-04-10 8:18 GMT+03:00 avchavan <av...@yahoo.co.in>:

> Hi,
> I is there a way to skip the remaining listView iterations over the
> provided
> list in case we encounter an exception while populating data for the first
> item?
>
> What i have is:
>
> @Override
> protected void populateItem(final ListItem<SomeList> item) {
> final SomeModel someModel = item.getModelObject();
> //make call for fetching some additional data based on condition.
> //if an exception is thrown by that call then catch it and set appropriate
> error message
> //and skip the remaining iterations over the list
>
> //populate the remaining items
>
> }
>
> Thanks
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Skipping-Listview-iterations-tp4670235.html
> Sent from the Users forum 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
>
>