You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by schapey <Ka...@frontiernet.net> on 2009/03/16 00:47:30 UTC

How NOT TO Cache Markup - Markup Dynamically created

Hi All, 

I don't see this post in the forum.. so I am posting again.

I have a page where the markup is creating dynamically and I do not want the 
markup to be cached. 

I am implementing both         IMarkupResourceStreamProvider, 
                                IMarkupCacheKeyProvider 


I'm not sure what I need to do in order for the markup not to be cached. 

In one of the source files in here 
http://wicketstuff.org/wicket13/customresourceloading, 

it said that if I returned null from getCacheKey that the markup would not 
be cached.

When I do this I get into a loop and it keeps trying to get the markup over 
and over again. 


   @Override 
    public String getCacheKey( MarkupContainer container, Class 
containerClass ) 
    { 
            return null; 
    } 


I tried calling the clearing the cache after the page renders... but when I 
do this the page won't even load. 

Any help would greatly be appreciated. 

I am using wicket1.4rc2.

Thanks 
Karen. 



-- 
View this message in context: http://www.nabble.com/How-NOT-TO-Cache-Markup---Markup-Dynamically-created-tp22529829p22529829.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: How NOT TO Cache Markup - Markup Dynamically created

Posted by Eelco Hillenius <ee...@gmail.com>.
> it said that if I returned null from getCacheKey that the markup would not
> be cached.
>
> When I do this I get into a loop and it keeps trying to get the markup over
> and over again.

Did you check the markup can be loaded at all?

Eelco

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


Re: How NOT TO Cache Markup - Markup Dynamically created

Posted by James Carman <jc...@carmanconsulting.com>.
You must not be doing something correctly.  I implemented a
ClientSideImageMap recently
(https://issues.apache.org/jira/browse/WICKET-1936) and I generate my
own markup with that.  You can see my code in the attached patch for
inspiration.  Hope that helps.

On Sun, Mar 15, 2009 at 7:47 PM, schapey <Ka...@frontiernet.net> wrote:
>
> Hi All,
>
> I don't see this post in the forum.. so I am posting again.
>
> I have a page where the markup is creating dynamically and I do not want the
> markup to be cached.
>
> I am implementing both         IMarkupResourceStreamProvider,
>                                IMarkupCacheKeyProvider
>
>
> I'm not sure what I need to do in order for the markup not to be cached.
>
> In one of the source files in here
> http://wicketstuff.org/wicket13/customresourceloading,
>
> it said that if I returned null from getCacheKey that the markup would not
> be cached.
>
> When I do this I get into a loop and it keeps trying to get the markup over
> and over again.
>
>
>   @Override
>    public String getCacheKey( MarkupContainer container, Class
> containerClass )
>    {
>            return null;
>    }
>
>
> I tried calling the clearing the cache after the page renders... but when I
> do this the page won't even load.
>
> Any help would greatly be appreciated.
>
> I am using wicket1.4rc2.
>
> Thanks
> Karen.
>
>
>
> --
> View this message in context: http://www.nabble.com/How-NOT-TO-Cache-Markup---Markup-Dynamically-created-tp22529829p22529829.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


Re: How NOT TO Cache Markup - Markup Dynamically created

Posted by Igor Vaynberg <ig...@gmail.com>.
what do you mean by "child"

a subclass?

or did you try to page.add(new otherpage()) ?

-igor

On Wed, Mar 18, 2009 at 11:30 AM, Karen Schaper <ka...@gmail.com> wrote:
> It appears that the looping problem I was having with trying to get the
> markup to NOT cache
>
> was because my page was a child of another page.
>
> In the implementation of the method getMarkupResourceStream, I was returning
> <wicket:extend> blah blah blan </wicket:extend>
>
> Is this a limitation?
>
>
> Thomas R. Corbin wrote:
>>
>> On Sunday 15 March 2009, schapey said:
>>
>>>
>>> Hi All,
>>>
>>> I don't see this post in the forum.. so I am posting again.
>>>
>>
>> sometimes I just wish we were using grails.
>> but I am sure that would come with it's own problems.
>>
>>
>>>
>>> I have a page where the markup is creating dynamically and I do not want
>>> the markup to be cached.
>>>
>>> I am implementing both         IMarkupResourceStreamProvider,
>>>                                IMarkupCacheKeyProvider
>>>
>>>
>>> I'm not sure what I need to do in order for the markup not to be cached.
>>>
>>> In one of the source files in here
>>> http://wicketstuff.org/wicket13/customresourceloading,
>>>
>>> it said that if I returned null from getCacheKey that the markup would
>>> not
>>> be cached.
>>>
>>> When I do this I get into a loop and it keeps trying to get the markup
>>> over
>>> and over again.
>>>
>>>
>>>   @Override
>>>    public String getCacheKey( MarkupContainer container, Class
>>> containerClass )
>>>    {
>>>            return null;
>>>    }
>>>
>>>
>>> I tried calling the clearing the cache after the page renders... but when
>>> I
>>> do this the page won't even load.
>>>
>>> Any help would greatly be appreciated.
>>>
>>> I am using wicket1.4rc2.
>>>
>>> Thanks
>>> Karen.
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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: How NOT TO Cache Markup - Markup Dynamically created

Posted by Karen Schaper <ka...@gmail.com>.
It appears that the looping problem I was having with trying to get the 
markup to NOT cache

was because my page was a child of another page.

In the implementation of the method getMarkupResourceStream, I was 
returning <wicket:extend> blah blah blan </wicket:extend>

Is this a limitation?


Thomas R. Corbin wrote:
> On Sunday 15 March 2009, schapey said:
>   
>> Hi All,
>>
>> I don't see this post in the forum.. so I am posting again.
>>     
>
> sometimes I just wish we were using grails.
> but I am sure that would come with it's own problems.
>
>   
>> I have a page where the markup is creating dynamically and I do not want
>> the markup to be cached.
>>
>> I am implementing both         IMarkupResourceStreamProvider,
>>                                 IMarkupCacheKeyProvider
>>
>>
>> I'm not sure what I need to do in order for the markup not to be cached.
>>
>> In one of the source files in here
>> http://wicketstuff.org/wicket13/customresourceloading,
>>
>> it said that if I returned null from getCacheKey that the markup would not
>> be cached.
>>
>> When I do this I get into a loop and it keeps trying to get the markup over
>> and over again.
>>
>>
>>    @Override
>>     public String getCacheKey( MarkupContainer container, Class
>> containerClass )
>>     {
>>             return null;
>>     }
>>
>>
>> I tried calling the clearing the cache after the page renders... but when I
>> do this the page won't even load.
>>
>> Any help would greatly be appreciated.
>>
>> I am using wicket1.4rc2.
>>
>> Thanks
>> Karen.
>>     
>
>
>
> ---------------------------------------------------------------------
> 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: How NOT TO Cache Markup - Markup Dynamically created

Posted by "Thomas R. Corbin" <th...@gmail.com>.
On Sunday 15 March 2009, schapey said:
> Hi All,
>
> I don't see this post in the forum.. so I am posting again.

sometimes I just wish we were using grails.
but I am sure that would come with it's own problems.

>
> I have a page where the markup is creating dynamically and I do not want
> the markup to be cached.
>
> I am implementing both         IMarkupResourceStreamProvider,
>                                 IMarkupCacheKeyProvider
>
>
> I'm not sure what I need to do in order for the markup not to be cached.
>
> In one of the source files in here
> http://wicketstuff.org/wicket13/customresourceloading,
>
> it said that if I returned null from getCacheKey that the markup would not
> be cached.
>
> When I do this I get into a loop and it keeps trying to get the markup over
> and over again.
>
>
>    @Override
>     public String getCacheKey( MarkupContainer container, Class
> containerClass )
>     {
>             return null;
>     }
>
>
> I tried calling the clearing the cache after the page renders... but when I
> do this the page won't even load.
>
> Any help would greatly be appreciated.
>
> I am using wicket1.4rc2.
>
> Thanks
> Karen.



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