You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Markus Strickler <ma...@braindump.ms> on 2008/10/08 09:46:18 UTC
Using static HTML in wicket
Hi-
we have a CMS generating a bunch of static html pages. Now I have to
add some dynamic content to each of these pages using wicket. The
pages have the basic HTML structure, navigation and some text blob,
wicket has to add the page title, whatever JavaScript it requires for
form processing, and a form + result view.
Now I'm wondering what would be the best way to mix the static HTML
and wicket's output.
Thanks for any suggestions,
-markus
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Using static HTML in wicket
Posted by Sven Meier <sv...@meiers.net>.
Hi Markus,
mount a single page:
mount(new MixedParamUrlCodingStrategy("content", ContentPage.class, new String[] {"contentId"}));
In the constructor you can get hold of the requested content's id:
public ContentPage(PageParameters params){
this.contentId = params.get("contentId");
}
Implement IMarkupResourceStreamProvider loading the markup depending on
contentId.
(take a look on *IMarkupCacheKeyProvider* too).
Use wicket ids in you CMS' pages as an 'API' to resolve components (see
IComponentResolver
<http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/markup/resolver/IComponentResolver.html>),
e.g. "shoppingCart" -> ShoppingCartPanel.java.
Your content "foo" with all dynamic parts is then accessible via:
http://yourserver/yourContext/content/foo
Sven
Markus Strickler schrieb:
> Hi Sven,
>
> thanks for the reply.
>
> What I don't quite get is how I would be able to use the markup from
> seerat static pages as template for a single wicket page.
>
> Thanks again,
>
> -markus
>
> Zitat von "Sven Meier" <sv...@meiers.net>:
>
>> You can use a single Wicket page using the static html of your CMS as
>> its markup.
>> Sprinkle your templates or content (depending who's in charge) with
>> wicket ids:
>> <div wicket:id="shoppingCart"></div>
>>
>> With custom component resolving you can then inject the dynamic
>> parts, i.e. Wicket panels mainly.
>>
>> We successfully used this technique to integrate Wicket with a CMS in
>> a major 'portal' project.
>>
>> Hope this helps
>>
>> Sven
>>
>> Markus Strickler schrieb:
>>>
>>> Hi-
>>>
>>> we have a CMS generating a bunch of static html pages. Now I have to
>>> add some dynamic content to each of these pages using wicket. The
>>> pages have the basic HTML structure, navigation and some text blob,
>>> wicket has to add the page title, whatever JavaScript it requires
>>> for form processing, and a form + result view.
>>> Now I'm wondering what would be the best way to mix the static HTML
>>> and wicket's output.
>>>
>>> Thanks for any suggestions,
>>>
>>> -markus
>>>
>>>
>>> ----------------------------------------------------------------
>>> This message was sent using IMP, the Internet Messaging Program.
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>>
>>
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Using static HTML in wicket
Posted by Markus Strickler <ma...@braindump.ms>.
Hi Sven,
thanks for the reply.
What I don't quite get is how I would be able to use the markup from
seerat static pages as template for a single wicket page.
Thanks again,
-markus
Zitat von "Sven Meier" <sv...@meiers.net>:
> You can use a single Wicket page using the static html of your CMS
> as its markup.
> Sprinkle your templates or content (depending who's in charge) with
> wicket ids:
> <div wicket:id="shoppingCart"></div>
>
> With custom component resolving you can then inject the dynamic
> parts, i.e. Wicket panels mainly.
>
> We successfully used this technique to integrate Wicket with a CMS
> in a major 'portal' project.
>
> Hope this helps
>
> Sven
>
> Markus Strickler schrieb:
>>
>> Hi-
>>
>> we have a CMS generating a bunch of static html pages. Now I have
>> to add some dynamic content to each of these pages using wicket.
>> The pages have the basic HTML structure, navigation and some text
>> blob, wicket has to add the page title, whatever JavaScript it
>> requires for form processing, and a form + result view.
>> Now I'm wondering what would be the best way to mix the static HTML
>> and wicket's output.
>>
>> Thanks for any suggestions,
>>
>> -markus
>>
>>
>> ----------------------------------------------------------------
>> This message was sent using IMP, the Internet Messaging Program.
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Using static HTML in wicket
Posted by Sven Meier <sv...@meiers.net>.
You can use a single Wicket page using the static html of your CMS as
its markup.
Sprinkle your templates or content (depending who's in charge) with
wicket ids:
<div wicket:id="shoppingCart"></div>
With custom component resolving you can then inject the dynamic parts,
i.e. Wicket panels mainly.
We successfully used this technique to integrate Wicket with a CMS in a
major 'portal' project.
Hope this helps
Sven
Markus Strickler schrieb:
>
> Hi-
>
> we have a CMS generating a bunch of static html pages. Now I have to
> add some dynamic content to each of these pages using wicket. The
> pages have the basic HTML structure, navigation and some text blob,
> wicket has to add the page title, whatever JavaScript it requires for
> form processing, and a form + result view.
> Now I'm wondering what would be the best way to mix the static HTML
> and wicket's output.
>
> Thanks for any suggestions,
>
> -markus
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org