On Tue, Nov 30, 2010 at 4:23 AM, nivs <[email protected]> wrote:
>
> Hi
>
> I have a question related to using a collection (Set) within a
> PageableListView. At runtime I get an exception
>
Hi, you are trying to make an component that depend on the collection
elements sequence work with a not sequenced collection. For instance, how
the list view will know which is the first component to render and make sure
it is the first one on every render for the
same collection?
> java.lang.ClassCastException: org.hibernate.collection.PersistentSet cannot
> be cast to java.util.List
> at org.apache.wicket.markup.html.list.ListView.getList(ListView.java:177)
>
> The entity structure is like this
>
> public class Subject{
>
> String firstName;
> Set<Phone> phones;
> }
>
> I guess it expects only a List type object. I can work around this by
> converting the Set into a List and then provide it but felt somehow this is
> a limitation.
you can also create and use an adapter model to that
How can I work with generic collections?
>
I didn't understood the question, can you be more specific?
> Any thoughts much appreciated
>
> thank you
> Regards
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Set-Object-with-PageableListView-tp3064906p3064906.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
--
Pedro Henrique Oliveira dos Santos