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/25 13:43:36 UTC

ModalWindow and page serialization in 1.4RC1

I have a ModalWindow with a page inside it (constructed via
modalWindow.setPageCreator). The page contains a lot of AjaxButtons etc.

If the content page is constructed as a stateless page (new MyPage()
without parameters) the page (content of modal window) gets Serialized
on every klick onto any AjaxButton. OK.

If the content page is NOT constructed as a stateless page (new
MyPage("someString") WITH parameters) the page (content of modal window)
AND the content of all underlying pages gets Serialized on every klick
onto any AjaxButton.

Is this the intended behavior? Is there a trick to avoid serializing all
the content of pages "below" the modal window? If it is not the intended
behavior, I will create a simple testcase.

This is a problem for us because the underlying pages contain much data
und the ModalWindow slows down in speed.

Stefan



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


AW: ModalWindow and page serialization in 1.4RC1

Posted by Stefan Lindner <li...@visionet.de>.
Ok, thank you! So I need to rethink the design of our ModalWindows use.

Stefan

-----Ursprüngliche Nachricht-----
Von: Igor Vaynberg [mailto:igor.vaynberg@gmail.com] 
Gesendet: Dienstag, 25. November 2008 18:52
An: users@wicket.apache.org
Betreff: Re: ModalWindow and page serialization in 1.4RC1

instead of anonymous make it a private static inner class

-igor

On Tue, Nov 25, 2008 at 9:48 AM, Stefan Lindner <li...@visionet.de> wrote:
> Arghhh! Ok, so the Page object itself holds a reference to the parent class. But is there any way to suppress the serialization of this parent object?
>
> Stefan
>
> -----Ursprüngliche Nachricht-----
> Von: Matej Knopp [mailto:matej.knopp@gmail.com]
> Gesendet: Dienstag, 25. November 2008 18:43
> An: users@wicket.apache.org
> Betreff: Re: ModalWindow and page serialization in 1.4RC1
>
> On Tue, Nov 25, 2008 at 6:37 PM, Stefan Lindner <li...@visionet.de> wrote:
>> No, it does not contain any references to the outer page. I had a similar case last week, so that this was the first ascpect to investigate.
>>
>> The page looks like
>>
>>        MyPage extends WebPage {
>>                String property;
>>
>>                public void setProperty(final String value) { this.property = value }
>>
>>                public MyPage(final String property) {
>>                        this.property = property;
>>                }
>>
>>                Public MyPage() {
>>                        This("default");
>>                }
>>        }
>>
>> If I create the page with
>>
>>        setPageCreator(new ModalWindow.PageCreator() {
>>                public Page createPage() {
>>                        Page p = new MyPage("parameter");
>>                        Return p;
>>                }
>>        }
>>
>> Everything works as expected, only the components of MyPage are serialized on klicking around the page.
>>
>> If I create the page as anonymous class with
>>
>>        setPageCreator(new ModalWindow.PageCreator() {
>>                public Page createPage() {
>>                        Page p = new MyPage("parameter") {
>>                                // need nothing else to force behavior
>>                        };
>>                        Return p;
>>                }
>>        }
>>
>> All underlying pages are serialized.
>
> Of course they are. Anonymous classes create implicit reference to
> outerclass. This is normal behavior.
>
> -Matej
>
>>
>> Stefan
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Matej Knopp [mailto:matej.knopp@gmail.com]
>> Gesendet: Dienstag, 25. November 2008 15:01
>> An: users@wicket.apache.org
>> Betreff: Re: ModalWindow and page serialization in 1.4RC1
>>
>> Does your page inside modal window contain reference to outer page?
>>
>> -Matej
>>
>> On Tue, Nov 25, 2008 at 1:43 PM, Stefan Lindner <li...@visionet.de> wrote:
>>> I have a ModalWindow with a page inside it (constructed via
>>> modalWindow.setPageCreator). The page contains a lot of AjaxButtons etc.
>>>
>>> If the content page is constructed as a stateless page (new MyPage()
>>> without parameters) the page (content of modal window) gets Serialized
>>> on every klick onto any AjaxButton. OK.
>>>
>>> If the content page is NOT constructed as a stateless page (new
>>> MyPage("someString") WITH parameters) the page (content of modal window)
>>> AND the content of all underlying pages gets Serialized on every klick
>>> onto any AjaxButton.
>>>
>>> Is this the intended behavior? Is there a trick to avoid serializing all
>>> the content of pages "below" the modal window? If it is not the intended
>>> behavior, I will create a simple testcase.
>>>
>>> This is a problem for us because the underlying pages contain much data
>>> und the ModalWindow slows down in speed.
>>>
>>> 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
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
> ---------------------------------------------------------------------
> 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


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


Re: ModalWindow and page serialization in 1.4RC1

Posted by Igor Vaynberg <ig...@gmail.com>.
instead of anonymous make it a private static inner class

-igor

On Tue, Nov 25, 2008 at 9:48 AM, Stefan Lindner <li...@visionet.de> wrote:
> Arghhh! Ok, so the Page object itself holds a reference to the parent class. But is there any way to suppress the serialization of this parent object?
>
> Stefan
>
> -----Ursprüngliche Nachricht-----
> Von: Matej Knopp [mailto:matej.knopp@gmail.com]
> Gesendet: Dienstag, 25. November 2008 18:43
> An: users@wicket.apache.org
> Betreff: Re: ModalWindow and page serialization in 1.4RC1
>
> On Tue, Nov 25, 2008 at 6:37 PM, Stefan Lindner <li...@visionet.de> wrote:
>> No, it does not contain any references to the outer page. I had a similar case last week, so that this was the first ascpect to investigate.
>>
>> The page looks like
>>
>>        MyPage extends WebPage {
>>                String property;
>>
>>                public void setProperty(final String value) { this.property = value }
>>
>>                public MyPage(final String property) {
>>                        this.property = property;
>>                }
>>
>>                Public MyPage() {
>>                        This("default");
>>                }
>>        }
>>
>> If I create the page with
>>
>>        setPageCreator(new ModalWindow.PageCreator() {
>>                public Page createPage() {
>>                        Page p = new MyPage("parameter");
>>                        Return p;
>>                }
>>        }
>>
>> Everything works as expected, only the components of MyPage are serialized on klicking around the page.
>>
>> If I create the page as anonymous class with
>>
>>        setPageCreator(new ModalWindow.PageCreator() {
>>                public Page createPage() {
>>                        Page p = new MyPage("parameter") {
>>                                // need nothing else to force behavior
>>                        };
>>                        Return p;
>>                }
>>        }
>>
>> All underlying pages are serialized.
>
> Of course they are. Anonymous classes create implicit reference to
> outerclass. This is normal behavior.
>
> -Matej
>
>>
>> Stefan
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Matej Knopp [mailto:matej.knopp@gmail.com]
>> Gesendet: Dienstag, 25. November 2008 15:01
>> An: users@wicket.apache.org
>> Betreff: Re: ModalWindow and page serialization in 1.4RC1
>>
>> Does your page inside modal window contain reference to outer page?
>>
>> -Matej
>>
>> On Tue, Nov 25, 2008 at 1:43 PM, Stefan Lindner <li...@visionet.de> wrote:
>>> I have a ModalWindow with a page inside it (constructed via
>>> modalWindow.setPageCreator). The page contains a lot of AjaxButtons etc.
>>>
>>> If the content page is constructed as a stateless page (new MyPage()
>>> without parameters) the page (content of modal window) gets Serialized
>>> on every klick onto any AjaxButton. OK.
>>>
>>> If the content page is NOT constructed as a stateless page (new
>>> MyPage("someString") WITH parameters) the page (content of modal window)
>>> AND the content of all underlying pages gets Serialized on every klick
>>> onto any AjaxButton.
>>>
>>> Is this the intended behavior? Is there a trick to avoid serializing all
>>> the content of pages "below" the modal window? If it is not the intended
>>> behavior, I will create a simple testcase.
>>>
>>> This is a problem for us because the underlying pages contain much data
>>> und the ModalWindow slows down in speed.
>>>
>>> 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
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
> ---------------------------------------------------------------------
> 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 page serialization in 1.4RC1

Posted by Stefan Lindner <li...@visionet.de>.
Arghhh! Ok, so the Page object itself holds a reference to the parent class. But is there any way to suppress the serialization of this parent object?

Stefan

-----Ursprüngliche Nachricht-----
Von: Matej Knopp [mailto:matej.knopp@gmail.com] 
Gesendet: Dienstag, 25. November 2008 18:43
An: users@wicket.apache.org
Betreff: Re: ModalWindow and page serialization in 1.4RC1

On Tue, Nov 25, 2008 at 6:37 PM, Stefan Lindner <li...@visionet.de> wrote:
> No, it does not contain any references to the outer page. I had a similar case last week, so that this was the first ascpect to investigate.
>
> The page looks like
>
>        MyPage extends WebPage {
>                String property;
>
>                public void setProperty(final String value) { this.property = value }
>
>                public MyPage(final String property) {
>                        this.property = property;
>                }
>
>                Public MyPage() {
>                        This("default");
>                }
>        }
>
> If I create the page with
>
>        setPageCreator(new ModalWindow.PageCreator() {
>                public Page createPage() {
>                        Page p = new MyPage("parameter");
>                        Return p;
>                }
>        }
>
> Everything works as expected, only the components of MyPage are serialized on klicking around the page.
>
> If I create the page as anonymous class with
>
>        setPageCreator(new ModalWindow.PageCreator() {
>                public Page createPage() {
>                        Page p = new MyPage("parameter") {
>                                // need nothing else to force behavior
>                        };
>                        Return p;
>                }
>        }
>
> All underlying pages are serialized.

Of course they are. Anonymous classes create implicit reference to
outerclass. This is normal behavior.

-Matej

>
> Stefan
>
>
> -----Ursprüngliche Nachricht-----
> Von: Matej Knopp [mailto:matej.knopp@gmail.com]
> Gesendet: Dienstag, 25. November 2008 15:01
> An: users@wicket.apache.org
> Betreff: Re: ModalWindow and page serialization in 1.4RC1
>
> Does your page inside modal window contain reference to outer page?
>
> -Matej
>
> On Tue, Nov 25, 2008 at 1:43 PM, Stefan Lindner <li...@visionet.de> wrote:
>> I have a ModalWindow with a page inside it (constructed via
>> modalWindow.setPageCreator). The page contains a lot of AjaxButtons etc.
>>
>> If the content page is constructed as a stateless page (new MyPage()
>> without parameters) the page (content of modal window) gets Serialized
>> on every klick onto any AjaxButton. OK.
>>
>> If the content page is NOT constructed as a stateless page (new
>> MyPage("someString") WITH parameters) the page (content of modal window)
>> AND the content of all underlying pages gets Serialized on every klick
>> onto any AjaxButton.
>>
>> Is this the intended behavior? Is there a trick to avoid serializing all
>> the content of pages "below" the modal window? If it is not the intended
>> behavior, I will create a simple testcase.
>>
>> This is a problem for us because the underlying pages contain much data
>> und the ModalWindow slows down in speed.
>>
>> 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
>
>
> ---------------------------------------------------------------------
> 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


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


Re: ModalWindow and page serialization in 1.4RC1

Posted by Matej Knopp <ma...@gmail.com>.
On Tue, Nov 25, 2008 at 6:37 PM, Stefan Lindner <li...@visionet.de> wrote:
> No, it does not contain any references to the outer page. I had a similar case last week, so that this was the first ascpect to investigate.
>
> The page looks like
>
>        MyPage extends WebPage {
>                String property;
>
>                public void setProperty(final String value) { this.property = value }
>
>                public MyPage(final String property) {
>                        this.property = property;
>                }
>
>                Public MyPage() {
>                        This("default");
>                }
>        }
>
> If I create the page with
>
>        setPageCreator(new ModalWindow.PageCreator() {
>                public Page createPage() {
>                        Page p = new MyPage("parameter");
>                        Return p;
>                }
>        }
>
> Everything works as expected, only the components of MyPage are serialized on klicking around the page.
>
> If I create the page as anonymous class with
>
>        setPageCreator(new ModalWindow.PageCreator() {
>                public Page createPage() {
>                        Page p = new MyPage("parameter") {
>                                // need nothing else to force behavior
>                        };
>                        Return p;
>                }
>        }
>
> All underlying pages are serialized.

Of course they are. Anonymous classes create implicit reference to
outerclass. This is normal behavior.

-Matej

>
> Stefan
>
>
> -----Ursprüngliche Nachricht-----
> Von: Matej Knopp [mailto:matej.knopp@gmail.com]
> Gesendet: Dienstag, 25. November 2008 15:01
> An: users@wicket.apache.org
> Betreff: Re: ModalWindow and page serialization in 1.4RC1
>
> Does your page inside modal window contain reference to outer page?
>
> -Matej
>
> On Tue, Nov 25, 2008 at 1:43 PM, Stefan Lindner <li...@visionet.de> wrote:
>> I have a ModalWindow with a page inside it (constructed via
>> modalWindow.setPageCreator). The page contains a lot of AjaxButtons etc.
>>
>> If the content page is constructed as a stateless page (new MyPage()
>> without parameters) the page (content of modal window) gets Serialized
>> on every klick onto any AjaxButton. OK.
>>
>> If the content page is NOT constructed as a stateless page (new
>> MyPage("someString") WITH parameters) the page (content of modal window)
>> AND the content of all underlying pages gets Serialized on every klick
>> onto any AjaxButton.
>>
>> Is this the intended behavior? Is there a trick to avoid serializing all
>> the content of pages "below" the modal window? If it is not the intended
>> behavior, I will create a simple testcase.
>>
>> This is a problem for us because the underlying pages contain much data
>> und the ModalWindow slows down in speed.
>>
>> 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
>
>
> ---------------------------------------------------------------------
> 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 page serialization in 1.4RC1

Posted by Stefan Lindner <li...@visionet.de>.
No, it does not contain any references to the outer page. I had a similar case last week, so that this was the first ascpect to investigate.

The page looks like

	MyPage extends WebPage {
		String property;

		public void setProperty(final String value) { this.property = value }

		public MyPage(final String property) {
			this.property = property;
		}

		Public MyPage() {
			This("default");
		}
	}

If I create the page with

	setPageCreator(new ModalWindow.PageCreator() {
		public Page createPage() {
			Page p = new MyPage("parameter");
			Return p;
		}
	}

Everything works as expected, only the components of MyPage are serialized on klicking around the page.

If I create the page as anonymous class with

	setPageCreator(new ModalWindow.PageCreator() {
		public Page createPage() {
			Page p = new MyPage("parameter") {
				// need nothing else to force behavior
			};
			Return p;
		}
	}

All underlying pages are serialized.

Stefan


-----Ursprüngliche Nachricht-----
Von: Matej Knopp [mailto:matej.knopp@gmail.com] 
Gesendet: Dienstag, 25. November 2008 15:01
An: users@wicket.apache.org
Betreff: Re: ModalWindow and page serialization in 1.4RC1

Does your page inside modal window contain reference to outer page?

-Matej

On Tue, Nov 25, 2008 at 1:43 PM, Stefan Lindner <li...@visionet.de> wrote:
> I have a ModalWindow with a page inside it (constructed via
> modalWindow.setPageCreator). The page contains a lot of AjaxButtons etc.
>
> If the content page is constructed as a stateless page (new MyPage()
> without parameters) the page (content of modal window) gets Serialized
> on every klick onto any AjaxButton. OK.
>
> If the content page is NOT constructed as a stateless page (new
> MyPage("someString") WITH parameters) the page (content of modal window)
> AND the content of all underlying pages gets Serialized on every klick
> onto any AjaxButton.
>
> Is this the intended behavior? Is there a trick to avoid serializing all
> the content of pages "below" the modal window? If it is not the intended
> behavior, I will create a simple testcase.
>
> This is a problem for us because the underlying pages contain much data
> und the ModalWindow slows down in speed.
>
> 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


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


Re: ModalWindow and page serialization in 1.4RC1

Posted by Matej Knopp <ma...@gmail.com>.
Does your page inside modal window contain reference to outer page?

-Matej

On Tue, Nov 25, 2008 at 1:43 PM, Stefan Lindner <li...@visionet.de> wrote:
> I have a ModalWindow with a page inside it (constructed via
> modalWindow.setPageCreator). The page contains a lot of AjaxButtons etc.
>
> If the content page is constructed as a stateless page (new MyPage()
> without parameters) the page (content of modal window) gets Serialized
> on every klick onto any AjaxButton. OK.
>
> If the content page is NOT constructed as a stateless page (new
> MyPage("someString") WITH parameters) the page (content of modal window)
> AND the content of all underlying pages gets Serialized on every klick
> onto any AjaxButton.
>
> Is this the intended behavior? Is there a trick to avoid serializing all
> the content of pages "below" the modal window? If it is not the intended
> behavior, I will create a simple testcase.
>
> This is a problem for us because the underlying pages contain much data
> und the ModalWindow slows down in speed.
>
> 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