isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik de Hair <e.deh...@pocos.nl>
Subject Re: changing order of collection items
Date Thu, 19 Mar 2015 10:51:05 GMT
Hi Martin,
>
> Although I think Dan's solutions would be better for the future I your 
> solution of the custom component would help me out for now.
>
> After looking at the Excel and Gmap3 add ons I managed to get the 
> collection with items (implementing the RankEditable interface with 
> methods moveUp() and moveDown()) rendered. Now I need to add the 
> actions to the datatable but have no idea how to create an action that 
> acts on the underlying entity. I used Wicket's DataView-class to 
> render the table. Could you give me some hints how to do this?
>
> Thanks,
> Erik
I shared some code on github [1]. It's not a complete application and 
it's not quite generic yet. (Also a lot of experimental code)

No action (rankUp) is rendered right now and I get some errors about a 
PojoAdapter not being serializable.

Caused by: java.io.NotSerializableException: 
org.apache.isis.core.runtime.persistence.adapter.PojoAdapter
     at 
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1183)
     at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
     at java.util.ArrayList.writeObject(ArrayList.java:742)
     at sun.reflect.GeneratedMethodAccessor266.invoke(Unknown Source)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:606)
     at 
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:988)
     at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1495)
     at 
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
     at 
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
     at 
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
     at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
     at 
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
     at 
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
     at 
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
     at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
     at 
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
     at 
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
     at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1377)
     at 
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1173)
     at 
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)


How can I create an action that acts upon the related item?

Thx,
Erik

[1] https://github.com/erikdehair/rankeditable-component

Mime
View raw message