You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ittay Dror <it...@gmail.com> on 2009/01/26 07:53:31 UTC

InlineFrame: IPageLink object looses reference to page after deserialiations

Hi,

I'm trying to use the InlineFrame component. I create an IPageLink 
object to it. The object holds a reference to a page.

By placing breakpoints, I can see that the IPageLink object is created 
once.

InlineFrame#onLinkClicked is called twice. On the first time, the page 
reference is fine. The second time the IPageLink is of a different 
object and the page reference it is null.  My guess is that the second 
time is after deserialization of the page. But why is the reference null?

I'm working in an osgi environment with pax-wicket.

Thank you,
Ittay

-- 
--
Ittay



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


Re: InlineFrame: IPageLink object looses reference to page after deserialiations

Posted by Ittay Dror <it...@gmail.com>.
After some debugging, the reason is that Page#writeReplace replaces the page
with a PageHolder regardless of whether the page is marked as non-stateless
(I call setStatelessHint(false) in the ctor). 

Isn't this a bug?

Ittay

Ittay Dror wrote:
> 
> Hi,
> 
> I'm trying to use the InlineFrame component. I create an IPageLink 
> object to it. The object holds a reference to a page.
> 
> By placing breakpoints, I can see that the IPageLink object is created 
> once.
> 
> InlineFrame#onLinkClicked is called twice. On the first time, the page 
> reference is fine. The second time the IPageLink is of a different 
> object and the page reference it is null.  My guess is that the second 
> time is after deserialization of the page. But why is the reference null?
> 
> I'm working in an osgi environment with pax-wicket.
> 
> Thank you,
> Ittay
> 
> -- 
> --
> Ittay
> 
> 
> 
> ---------------------------------------------------------------------
> 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://www.nabble.com/InlineFrame%3A-IPageLink-object-looses-reference-to-page-after-deserialiations-tp21661515p21662059.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


Re: InlineFrame: IPageLink object looses reference to page after deserialiations

Posted by Ittay Dror <it...@gmail.com>.


Ittay Dror wrote:
> 
> Hi,
> 
> I'm trying to use the InlineFrame component. I create an IPageLink 
> object to it. The object holds a reference to a page.
> 
> By placing breakpoints, I can see that the IPageLink object is created 
> once.
> 
> InlineFrame#onLinkClicked is called twice. On the first time, the page 
> reference is fine. The second time the IPageLink is of a different 
> object and the page reference it is null.  My guess is that the second 
> time is after deserialization of the page. But why is the reference null?
> 
> I'm working in an osgi environment with pax-wicket.
> 
on further investigation, i see the issue is that although the page is saved
to the page map (by touching it), it is not found after, (the pagemap is the
same object in both requests and the session exists)

thanks,
ittay


> 
> Thank you,
> Ittay
> 
> -- 
> --
> Ittay
> 
> 
> 
> ---------------------------------------------------------------------
> 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://www.nabble.com/InlineFrame%3A-IPageLink-object-looses-reference-to-page-after-deserialiations-tp21661515p22777118.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