You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Thies Edeling <th...@rrm.net> on 2008/11/10 13:13:44 UTC

Use provided section

Hello,

At my current project the header and footer of each page is generated by 
a CMS, Fatwire, and provided as plain html. The generated header  
includes the <head> section (with lots of  javascript/css includes) and 
some layout tags.
In a JSP application the header/footer were jsp:included and any 
javascript/css files the application needed would be statically added in 
the CMS itself.
How to do this with Wicket? Contributions to the body of the html page 
is not a problem, I can parse them out of the provided html and add them 
as a Label or such but what's the best way to deal with a provided<head> 
section ?

gr,
Thies

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


Re: Use provided section

Posted by Thies Edeling <te...@gmail.com>.
On Mon, Nov 10, 2008 at 5:09 PM, Charlie Dobbie <cf...@gmail.com> wrote:

> As default, anything in a <wicket:head> section gets included on the page.
> See the following:
>
>
> http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html#Wicket%27sXHTMLtags-Elementwicket:head
>
> Otherwise, I'd say look into IHeaderContributor.
>
> --Charlie.
>
>
>
> 2008/11/10 Thies Edeling <th...@rrm.net>
>
> > Hello,
> >
> > At my current project the header and footer of each page is generated by
> a
> > CMS, Fatwire, and provided as plain html. The generated header  includes
> the
> > <head> section (with lots of  javascript/css includes) and some layout
> tags.
> > In a JSP application the header/footer were jsp:included and any
> > javascript/css files the application needed would be statically added in
> the
> > CMS itself.
> > How to do this with Wicket? Contributions to the body of the html page is
> > not a problem, I can parse them out of the provided html and add them as
> a
> > Label or such but what's the best way to deal with a provided<head>
> section
> > ?
> >
> > gr,
> > Thies
> >
>

Re: Use provided section

Posted by Thies Edeling <te...@gmail.com>.
Yes but the <head> section is in a different file, not managed by Wicket
so I can't use those tags. Anyway, I'm parsing out the head section from
the CMS file and then re-adding them in Wicket using indeed a
iheadercontributor.

(ok, I hope  this mail now does get sent properly - empty mail through gmail
and mail sent using my own smtp is killed by apache's sa.. grrr)

On Mon, Nov 10, 2008 at 5:09 PM, Charlie Dobbie <cf...@gmail.com> wrote:

> As default, anything in a <wicket:head> section gets included on the page.
> See the following:
>
>
> http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html#Wicket%27sXHTMLtags-Elementwicket:head
>
> Otherwise, I'd say look into IHeaderContributor.
>
> --Charlie.
>
>
>
> 2008/11/10 Thies Edeling <th...@rrm.net>
>
> > Hello,
> >
> > At my current project the header and footer of each page is generated by
> a
> > CMS, Fatwire, and provided as plain html. The generated header  includes
> the
> > <head> section (with lots of  javascript/css includes) and some layout
> tags.
> > In a JSP application the header/footer were jsp:included and any
> > javascript/css files the application needed would be statically added in
> the
> > CMS itself.
> > How to do this with Wicket? Contributions to the body of the html page is
> > not a problem, I can parse them out of the provided html and add them as
> a
> > Label or such but what's the best way to deal with a provided<head>
> section
> > ?
> >
> > gr,
> > Thies
> >
>

Re: Use provided section

Posted by Charlie Dobbie <cf...@gmail.com>.
As default, anything in a <wicket:head> section gets included on the page.
See the following:

http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html#Wicket%27sXHTMLtags-Elementwicket:head

Otherwise, I'd say look into IHeaderContributor.

--Charlie.



2008/11/10 Thies Edeling <th...@rrm.net>

> Hello,
>
> At my current project the header and footer of each page is generated by a
> CMS, Fatwire, and provided as plain html. The generated header  includes the
> <head> section (with lots of  javascript/css includes) and some layout tags.
> In a JSP application the header/footer were jsp:included and any
> javascript/css files the application needed would be statically added in the
> CMS itself.
> How to do this with Wicket? Contributions to the body of the html page is
> not a problem, I can parse them out of the provided html and add them as a
> Label or such but what's the best way to deal with a provided<head> section
> ?
>
> gr,
> Thies
>

Re: Use provided section

Posted by Christopher Lyth <ch...@gmail.com>.
There are 2 approaches i can imagine, without having the need to do
this or any knowledge of the api/tool you are using to generate the
headers.

* Write a custom HeaderContributor that, in the renderHead method,
fetches the head as generated from fatwire and write it out to the
header response.
* Get the generated header and write a simple parser that iterates
through the tags and adds a HeaderContributor for each tag type.

But i guess this depends on how those header components are generated.

On Mon, Nov 10, 2008 at 6:13 AM, Thies Edeling <th...@rrm.net> wrote:
>
> Hello,
>
> At my current project the header and footer of each page is generated by a CMS, Fatwire, and provided as plain html. The generated header  includes the <head> section (with lots of  javascript/css includes) and some layout tags.
> In a JSP application the header/footer were jsp:included and any javascript/css files the application needed would be statically added in the CMS itself.
> How to do this with Wicket? Contributions to the body of the html page is not a problem, I can parse them out of the provided html and add them as a Label or such but what's the best way to deal with a provided<head> section ?
>
> gr,
> Thies
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



--
Christopher J Lyth
christopher.lyth@gmail.com

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


Re: Use provided section

Posted by Igor Vaynberg <ig...@gmail.com>.
the most transparent thing to do would be to let your page have the
head tags and parse the head section out of the cms header and include
it via a header contributor. that way you let wicket retain control
over the head element and all other head contributors will work
transparently.

-igor

On Mon, Nov 10, 2008 at 4:13 AM, Thies Edeling <th...@rrm.net> wrote:
> Hello,
>
> At my current project the header and footer of each page is generated by a
> CMS, Fatwire, and provided as plain html. The generated header  includes the
> <head> section (with lots of  javascript/css includes) and some layout tags.
> In a JSP application the header/footer were jsp:included and any
> javascript/css files the application needed would be statically added in the
> CMS itself.
> How to do this with Wicket? Contributions to the body of the html page is
> not a problem, I can parse them out of the provided html and add them as a
> Label or such but what's the best way to deal with a provided<head> section
> ?
>
> gr,
> Thies
>
> ---------------------------------------------------------------------
> 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