Hi,

Yes.
I believe the problem comes because the entity is deserialized.
The easier way to check is to remove java.io.Serializable from its
interfaces. Wicket will tell you when it tries to serialize it with a
detailed exception message.

Martin Grigorov
Wicket Training and Consulting


On Thu, Mar 27, 2014 at 5:58 PM, arnzel <arne_zela...@gmx.de> wrote:

> Hi
>
> In a Component i create a ModalWindow. To this ModalWindow i add a
> Component/Page. In the Constructor i put an reference to an entity. when i
> use this reference in the callback of the Modal Window i got two diferent
> references. Can this be, bcause the reference in the modal window was
> serialized ? How can i find out why the serialization did not work ?
>
>
>
> AjaxLink<Void> ajaxButton = new AjaxLink<Void>(){
>
>     onClick(AjaxRequestTarget target){
>         MyEntity myEntity = ...;
>         showModal(target,entity);
>     }
>
> }
>
> public void showModal(AjaxRequestTarget target,MyEntity myEntity){
>     WindowClosedCallback windowClosedCallback = new WindowClosedCallback()
> {
>                         private static final long serialVersionUID = 1L;
>
>                         public void onClose(AjaxRequestTarget target) {
>
>                                 // this reference
>                                 myEntity.save();
>
>                                 MyEnclosingPanel.this.refresh(target);
>
> setResponsePage(MyEnclosingPanel.this.getPage());
>
>                         }
>     };
>
>
>     Panel panel = new MyPanel(myEntity)
>
>     ModalWindow modalWindow = new ModalWindow();
>     modalWindow.setWindowClosedCallback(windowClosedCallback);
>     modalWindow.show(panel, target);
> }
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Variables-Assigned-to-ModalWindow-are-not-the-same-as-in-the-Callback-tp4665161.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
>
>

Reply via email to