You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Martin Grigorov <mg...@apache.org> on 2014/04/01 09:20:46 UTC

Re: Variables Assigned to ModalWindow are not the same as in the Callback

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 <ar...@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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Variables Assigned to ModalWindow are not the same as in the Callback

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
http://stackoverflow.com/questions/18741445/hibernate-entity-serializable


On Tue, Apr 8, 2014 at 3:35 PM, arnzel <ar...@gmx.de> wrote:

> The problem is, that this classes are hibernate entities. so they have to
> be
> serializable
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Variables-Assigned-to-ModalWindow-are-not-the-same-as-in-the-Callback-tp4665161p4665290.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
>
>


-- 
Regards - Ernesto Reinaldo Barreiro

Re: Variables Assigned to ModalWindow are not the same as in the Callback

Posted by arnzel <ar...@gmx.de>.
The problem is, that this classes are hibernate entities. so they have to be
serializable



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Variables-Assigned-to-ModalWindow-are-not-the-same-as-in-the-Callback-tp4665161p4665290.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