You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Nick Pratt <nb...@gmail.com> on 2015/04/09 20:23:57 UTC

Header contribution ordering

Based on the wicket guide, since 1.5 the header contributions of children
should occur before that of the Page they are contained in so that the Page
can override any component contributions.

Is this still valid?  We've got a case where a Panel is contributing a CSS
file that's appearing in the final markup after that of the Page (which
prevents our application level style sheet from overriding the component's
added styles)  - is there a likely reason for this that we've overlooked?

N

Re: Header contribution ordering

Posted by Martin Grigorov <mg...@apache.org>.
Filtering can be used only in the <body>.
The idea is that any non-filtered Js/CSS resource will go in the <head>
anyway.

Martin Grigorov
Freelancer, available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Apr 9, 2015 at 11:24 PM, Nick Pratt <nb...@gmail.com> wrote:

> Thanks Martin, ill check that out.
>
> Is it possible to have a FilteredHeaderContainer in the head section of our
> base page so that we can have all the regular Wicket includes (JS and CSS)
> added, and then a special bucket for our global css?
>
> I keep running in to: "there was an error processing the header response -
> you tried to render a bucket of response from FilteringHeaderResponse, but
> it had not yet run and been closed."
>
> Can header items be manipulated this way, or only within the body contents
> (for late loading JS)
>
>
> On Thu, Apr 9, 2015 at 2:29 PM, Martin Grigorov <mg...@apache.org>
> wrote:
>
> > Hi,
> >
> >
> > On Thu, Apr 9, 2015 at 9:23 PM, Nick Pratt <nb...@gmail.com> wrote:
> >
> > > Based on the wicket guide, since 1.5 the header contributions of
> children
> > > should occur before that of the Page they are contained in so that the
> > Page
> > > can override any component contributions.
> > >
> > > Is this still valid?  We've got a case where a Panel is contributing a
> > CSS
> > >
> >
> > Yes.
> >
> >
> > > file that's appearing in the final markup after that of the Page (which
> > > prevents our application level style sheet from overriding the
> > component's
> > > added styles)  - is there a likely reason for this that we've
> overlooked?
> > >
> >
> > A dependency?
> > See HeaderItem#getDependencies() and ResourceReference#getDependencies()
> >
> >
> > >
> > > N
> > >
> >
>

Re: Header contribution ordering

Posted by Nick Pratt <nb...@gmail.com>.
Thanks Martin, ill check that out.

Is it possible to have a FilteredHeaderContainer in the head section of our
base page so that we can have all the regular Wicket includes (JS and CSS)
added, and then a special bucket for our global css?

I keep running in to: "there was an error processing the header response -
you tried to render a bucket of response from FilteringHeaderResponse, but
it had not yet run and been closed."

Can header items be manipulated this way, or only within the body contents
(for late loading JS)


On Thu, Apr 9, 2015 at 2:29 PM, Martin Grigorov <mg...@apache.org>
wrote:

> Hi,
>
>
> On Thu, Apr 9, 2015 at 9:23 PM, Nick Pratt <nb...@gmail.com> wrote:
>
> > Based on the wicket guide, since 1.5 the header contributions of children
> > should occur before that of the Page they are contained in so that the
> Page
> > can override any component contributions.
> >
> > Is this still valid?  We've got a case where a Panel is contributing a
> CSS
> >
>
> Yes.
>
>
> > file that's appearing in the final markup after that of the Page (which
> > prevents our application level style sheet from overriding the
> component's
> > added styles)  - is there a likely reason for this that we've overlooked?
> >
>
> A dependency?
> See HeaderItem#getDependencies() and ResourceReference#getDependencies()
>
>
> >
> > N
> >
>

Re: Header contribution ordering

Posted by Martin Grigorov <mg...@apache.org>.
Hi,


On Thu, Apr 9, 2015 at 9:23 PM, Nick Pratt <nb...@gmail.com> wrote:

> Based on the wicket guide, since 1.5 the header contributions of children
> should occur before that of the Page they are contained in so that the Page
> can override any component contributions.
>
> Is this still valid?  We've got a case where a Panel is contributing a CSS
>

Yes.


> file that's appearing in the final markup after that of the Page (which
> prevents our application level style sheet from overriding the component's
> added styles)  - is there a likely reason for this that we've overlooked?
>

A dependency?
See HeaderItem#getDependencies() and ResourceReference#getDependencies()


>
> N
>