You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Lionel Port <li...@gmail.com> on 2010/01/20 02:32:16 UTC

Objects.cloneModel() on google app engine

Hi,

I'm using wicket on google app engine and am having trouble with the
sort link headers on data tables.

It looks like when a sort link is clicked the method
Objects.cloneModel() is called. This creates a
ReplaceableObjectOutputStream wrapper around the ObjectOutputStream to
do the copy using serialization/deserialization. Unfortunately this
class tries to call enableReplace on the the underlying
ObjectOutputStream so that it can replace component objects with just
their name (to stop component hierachy being serialized).

It seams the google app engine security permissions deny calling
enableReplace on the ObjectOutputStream.

Does any one know of a work around to get the sort links working?

regards,
Lionel

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


Re: Objects.cloneModel() on google app engine

Posted by Pedro Santos <pe...@gmail.com>.
Hi Lionel, I had the same issue, but calling the setDefaultModelObject, that
call methods on IPageVersionManager at some point. In my case, the solution
was simple change that call for comp.getDefaultModel().setObject()

On Tue, Jan 19, 2010 at 11:32 PM, Lionel Port <li...@gmail.com> wrote:

> Hi,
>
> I'm using wicket on google app engine and am having trouble with the
> sort link headers on data tables.
>
> It looks like when a sort link is clicked the method
> Objects.cloneModel() is called. This creates a
> ReplaceableObjectOutputStream wrapper around the ObjectOutputStream to
> do the copy using serialization/deserialization. Unfortunately this
> class tries to call enableReplace on the the underlying
> ObjectOutputStream so that it can replace component objects with just
> their name (to stop component hierachy being serialized).
>
> It seams the google app engine security permissions deny calling
> enableReplace on the ObjectOutputStream.
>
> Does any one know of a work around to get the sort links working?
>
> regards,
> Lionel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos

Re: Objects.cloneModel() on google app engine

Posted by Lionel Port <li...@gmail.com>.
Thanks Pedro,

Hope it helps. From your answer looks like we may have a slightly
different problem with the same cause. Looks like the cloneModel()
method is depended on from a couple of spots but it all related to
versioning of components. Ideally it would be good if we could just
replace the implementation of cloneModel with one that works on GAE.
Anyway I'll stick with this for now till it comes and bites me again.

regards,
Lionel

On Wed, Jan 20, 2010 at 9:26 PM, Pedro Santos <pe...@gmail.com> wrote:
> Thank u! that will work for me too
>
> On Wed, Jan 20, 2010 at 8:21 AM, Lionel Port <li...@gmail.com> wrote:
>
>> The gae security restriction looks pointless because
>> Objects.cloneModel is just using a ByteArrayOutputStream (why should
>> there be restrictions on that?) but because the Objects calls are all
>> static I can't override the method with a working clone method also
>> because the OrderByLink.sort method is final I can't fix there either.
>>
>> As a workaround for any one who is interested, it looks like
>> cloneModel is only used in this case if the component is versioned so
>> I set called setVersion(false) on the orderByLink and it avoids this
>> problem area.
>>
>> On Wed, Jan 20, 2010 at 12:32 PM, Lionel Port <li...@gmail.com>
>> wrote:
>> > Hi,
>> >
>> > I'm using wicket on google app engine and am having trouble with the
>> > sort link headers on data tables.
>> >
>> > It looks like when a sort link is clicked the method
>> > Objects.cloneModel() is called. This creates a
>> > ReplaceableObjectOutputStream wrapper around the ObjectOutputStream to
>> > do the copy using serialization/deserialization. Unfortunately this
>> > class tries to call enableReplace on the the underlying
>> > ObjectOutputStream so that it can replace component objects with just
>> > their name (to stop component hierachy being serialized).
>> >
>> > It seams the google app engine security permissions deny calling
>> > enableReplace on the ObjectOutputStream.
>> >
>> > Does any one know of a work around to get the sort links working?
>> >
>> > regards,
>> > Lionel
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
> --
> Pedro Henrique Oliveira dos Santos
>

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


Re: Objects.cloneModel() on google app engine

Posted by Pedro Santos <pe...@gmail.com>.
Thank u! that will work for me too

On Wed, Jan 20, 2010 at 8:21 AM, Lionel Port <li...@gmail.com> wrote:

> The gae security restriction looks pointless because
> Objects.cloneModel is just using a ByteArrayOutputStream (why should
> there be restrictions on that?) but because the Objects calls are all
> static I can't override the method with a working clone method also
> because the OrderByLink.sort method is final I can't fix there either.
>
> As a workaround for any one who is interested, it looks like
> cloneModel is only used in this case if the component is versioned so
> I set called setVersion(false) on the orderByLink and it avoids this
> problem area.
>
> On Wed, Jan 20, 2010 at 12:32 PM, Lionel Port <li...@gmail.com>
> wrote:
> > Hi,
> >
> > I'm using wicket on google app engine and am having trouble with the
> > sort link headers on data tables.
> >
> > It looks like when a sort link is clicked the method
> > Objects.cloneModel() is called. This creates a
> > ReplaceableObjectOutputStream wrapper around the ObjectOutputStream to
> > do the copy using serialization/deserialization. Unfortunately this
> > class tries to call enableReplace on the the underlying
> > ObjectOutputStream so that it can replace component objects with just
> > their name (to stop component hierachy being serialized).
> >
> > It seams the google app engine security permissions deny calling
> > enableReplace on the ObjectOutputStream.
> >
> > Does any one know of a work around to get the sort links working?
> >
> > regards,
> > Lionel
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos

Re: Objects.cloneModel() on google app engine

Posted by Lionel Port <li...@gmail.com>.
The gae security restriction looks pointless because
Objects.cloneModel is just using a ByteArrayOutputStream (why should
there be restrictions on that?) but because the Objects calls are all
static I can't override the method with a working clone method also
because the OrderByLink.sort method is final I can't fix there either.

As a workaround for any one who is interested, it looks like
cloneModel is only used in this case if the component is versioned so
I set called setVersion(false) on the orderByLink and it avoids this
problem area.

On Wed, Jan 20, 2010 at 12:32 PM, Lionel Port <li...@gmail.com> wrote:
> Hi,
>
> I'm using wicket on google app engine and am having trouble with the
> sort link headers on data tables.
>
> It looks like when a sort link is clicked the method
> Objects.cloneModel() is called. This creates a
> ReplaceableObjectOutputStream wrapper around the ObjectOutputStream to
> do the copy using serialization/deserialization. Unfortunately this
> class tries to call enableReplace on the the underlying
> ObjectOutputStream so that it can replace component objects with just
> their name (to stop component hierachy being serialized).
>
> It seams the google app engine security permissions deny calling
> enableReplace on the ObjectOutputStream.
>
> Does any one know of a work around to get the sort links working?
>
> regards,
> Lionel
>

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