You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Stefan Lindner <li...@visionet.de> on 2008/11/12 14:07:51 UTC

ModalWindow and Component.writeObject

I have a ModalWindow with a page as content, not a panel. Wn Ajax button on this modal window starts another modal window inside the first modal window (Page as content not a panel). This second modal window holds a Button. The Button has an AjaxEventBehavior

	Button mybutton = new button(...);
	mbyButton.add(new AjaxEventBehavior("onclick") {
		private static final long serialVersionUID = 1L;
		@Override
		public void onEvent(AjaxRequestTarget target) {

each time the button is clicked an onEvent is called, ab bunch of Component.writeObject is fired. But not only the components of the current, sedonc, top level ModalWindow are serialized and stored. All components of all underlying pages call writeObject().
In Wicket 2.0 this was not the case, in 1.4 trunk it is.
Is this a bug or a feature? Does the button try something like a get/post even if there is no form surrounding it?

Stefan

RE: ModalWindow and Component.writeObject

Posted by Stefan Lindner <li...@visionet.de>.
Blush! I had an instance of Session in my Component, so the complete Session object was serialized on each klick onto the button! Excuse my question and thanks for the quick answer!

Stefan

-----Ursprüngliche Nachricht-----
Von: Johan Compagner [mailto:jcompagner@gmail.com] 
Gesendet: Mittwoch, 12. November 2008 15:39
An: users@wicket.apache.org
Betreff: Re: ModalWindow and Component.writeObject

I guess somehow the pages hold references to each other so if you
press the button on the inner page, and do your stuff, after that
wicket serializes that page it also encounters the other pages and
those are also serialized.

On 11/12/08, Stefan Lindner <li...@visionet.de> wrote:
> I have a ModalWindow with a page as content, not a panel. Wn Ajax button on
> this modal window starts another modal window inside the first modal window
> (Page as content not a panel). This second modal window holds a Button. The
> Button has an AjaxEventBehavior
>
> 	Button mybutton = new button(...);
> 	mbyButton.add(new AjaxEventBehavior("onclick") {
> 		private static final long serialVersionUID = 1L;
> 		@Override
> 		public void onEvent(AjaxRequestTarget target) {
>
> each time the button is clicked an onEvent is called, ab bunch of
> Component.writeObject is fired. But not only the components of the current,
> sedonc, top level ModalWindow are serialized and stored. All components of
> all underlying pages call writeObject().
> In Wicket 2.0 this was not the case, in 1.4 trunk it is.
> Is this a bug or a feature? Does the button try something like a get/post
> even if there is no form surrounding it?
>
> Stefan
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: ModalWindow and Component.writeObject

Posted by Johan Compagner <jc...@gmail.com>.
I guess somehow the pages hold references to each other so if you
press the button on the inner page, and do your stuff, after that
wicket serializes that page it also encounters the other pages and
those are also serialized.

On 11/12/08, Stefan Lindner <li...@visionet.de> wrote:
> I have a ModalWindow with a page as content, not a panel. Wn Ajax button on
> this modal window starts another modal window inside the first modal window
> (Page as content not a panel). This second modal window holds a Button. The
> Button has an AjaxEventBehavior
>
> 	Button mybutton = new button(...);
> 	mbyButton.add(new AjaxEventBehavior("onclick") {
> 		private static final long serialVersionUID = 1L;
> 		@Override
> 		public void onEvent(AjaxRequestTarget target) {
>
> each time the button is clicked an onEvent is called, ab bunch of
> Component.writeObject is fired. But not only the components of the current,
> sedonc, top level ModalWindow are serialized and stored. All components of
> all underlying pages call writeObject().
> In Wicket 2.0 this was not the case, in 1.4 trunk it is.
> Is this a bug or a feature? Does the button try something like a get/post
> even if there is no form surrounding it?
>
> Stefan
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org