You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by mfs <fa...@gmail.com> on 2010/01/22 09:33:42 UTC
Re: Question about transient and serialization
Or if you navigate to yet another page and then click browser back Button and
click the Ajax button that would give the testString "null"..right ?
igor.vaynberg wrote:
>
> last accessed page instance is stored in http session and therefore in
> memory without being serialized. if you ran this on a two-node cluster
> with round robin you would see testString being null.
>
> -igor
>
> On Thu, Jul 24, 2008 at 2:34 PM, HHHHH <hu...@hotmail.com> wrote:
>>
>> Hi!
>>
>> I have this example class:
>>
>> public class TestPage extends WebPage {
>> private transient String testString = "test";
>>
>> public TestPage() {
>> add(new TestForm("form"));
>> }
>>
>> @SuppressWarnings("serial")
>> private class TestForm extends Form {
>> public TestForm(String id) {
>> super(id);
>> add(new AjaxButton("testButton") {
>> @Override
>> protected void onSubmit(AjaxRequestTarget
>> target, Form form) {
>> System.out.println(testString);
>> }
>> });
>> }
>> }
>> }
>>
>> I suppose that when the ajax button was pressed, the page was
>> deserialized
>> and the transient object (testString) be null. But that don't happend.
>>
>> Can anyone tell me why?.
>>
>> Thanks
>> --
>> View this message in context:
>> http://www.nabble.com/Question-about-transient-and-serialization-tp18641031p18641031.html
>> Sent from the Wicket - User 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
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
--
View this message in context: http://old.nabble.com/Question-about-transient-and-serialization-tp18641031p27270041.html
Sent from the Wicket - User 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