You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Mike Mander <wi...@gmx.de> on 2011/07/14 17:17:47 UTC
Can i "include" an external html fragment?
Hi,
i would like to provide a way for our designer to change the homepage
layout outside of the web-app.
But i'm not sure how to do it.
Usecase:
Wicket homepage contains a "div-placeholder" for the main-content.
Designer uploads a html fragment with <div>bla</div> to a file-server.
In the HomePage class i add a component loading the file content from
the server by a constant url.
Is this possible?
Thanks
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Can i "include" an external html fragment?
Posted by Martin Grigorov <mg...@apache.org>.
Also see org.apache.wicket.markup.html.include.Include
On Thu, Jul 14, 2011 at 6:51 PM, Andrea Del Bene <ad...@ciseonweb.it> wrote:
> Hi Mike,
>
> take a look at interfaces IMarkupResourceStreamProvider and
> IMarkupCacheKeyProvider. Using the first one you can implement method
> getMarkupResourceStream which returns an IResourceStream with your custom
> HTML. The second interface has a method called getCacheKey. You must
> override it returning a simple null value. You have to do this in order to
> avoid HTML caching for your component and to be sure that it always loads
> updated content from server.
>
>> Hi,
>>
>> i would like to provide a way for our designer to change the homepage
>> layout outside of the web-app.
>> But i'm not sure how to do it.
>>
>> Usecase:
>> Wicket homepage contains a "div-placeholder" for the main-content.
>> Designer uploads a html fragment with <div>bla</div> to a file-server.
>> In the HomePage class i add a component loading the file content from
>> the server by a constant url.
>>
>> Is this possible?
>>
>> Thanks
>> Mike
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Can i "include" an external html fragment?
Posted by Andrea Del Bene <ad...@ciseonweb.it>.
Hi Mike,
take a look at interfaces IMarkupResourceStreamProvider and
IMarkupCacheKeyProvider. Using the first one you can implement method
getMarkupResourceStream which returns an IResourceStream with your
custom HTML. The second interface has a method called getCacheKey. You
must override it returning a simple null value. You have to do this in
order to avoid HTML caching for your component and to be sure that it
always loads updated content from server.
> Hi,
>
> i would like to provide a way for our designer to change the homepage
> layout outside of the web-app.
> But i'm not sure how to do it.
>
> Usecase:
> Wicket homepage contains a "div-placeholder" for the main-content.
> Designer uploads a html fragment with <div>bla</div> to a file-server.
> In the HomePage class i add a component loading the file content from
> the server by a constant url.
>
> Is this possible?
>
> Thanks
> Mike
>
>
> ---------------------------------------------------------------------
> 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