Re: Rendering order of header contributions

2013-03-20 Thread Martin Grigorov
I meant "There is more than one way to do it" :-)


On Wed, Mar 20, 2013 at 6:44 PM, Thies Edeling  wrote:

> haha, well it's not the cleanest code there is :)
>
> On Wed, Mar 20, 2013 at 5:39 PM, Martin Grigorov 
> wrote:
> > Thanks for sharing!
> >
> > P.S. Someone may compare Wicket with Perl now :-)
> >
> >
> > On Wed, Mar 20, 2013 at 6:32 PM, Thies Edeling 
> wrote:
> >
> >> In the end I went for using the headerItemComparator as it was a bit
> >> easier to implement without having to specify any other filters:
> >>
> >> getResourceSettings().setHeaderItemComparator(new
> >> Comparator() {
> >> @Override
> >> public int
> >> compare(ResourceAggregator.RecordedHeaderItem o1,
> >> ResourceAggregator.RecordedHeaderItem o2) {
> >> if (o1.getItem() instanceof StringHeaderItem) {
> >> StringHeaderItem headerItem =
> >> (StringHeaderItem) o1.getItem();
> >>
> >> if
> >> (headerItem.getString().toString().contains("X-UA-Compatible")) {
> >> return -1;
> >> }
> >> }
> >>
> >> return 0;
> >> }
> >> });
> >>
> >> On Wed, Mar 20, 2013 at 1:01 PM, Thies Edeling 
> wrote:
> >> > Thanks!
> >> >
> >> > On Wed, Mar 20, 2013 at 12:58 PM, Martin Grigorov <
> mgrigo...@apache.org>
> >> wrote:
> >> >> Hi Thies,
> >> >>
> >> >> Check
> >> >>
> >>
> https://github.com/martin-g/blogs/commit/d5a248a3a3d5369c9cdc66604eba384428e9d0a0
> >> >>
> >> >> By using custom IHeaderResponse you can promote any kind of
> HeaderItem.
> >> >>
> >> >>
> >> >> On Wed, Mar 20, 2013 at 1:06 PM, Thies Edeling 
> >> wrote:
> >> >>
> >> >>> Hello,
> >> >>>
> >> >>> Using Wicket 6.5.0, how can I change the order on how Wicket renders
> >> >>> the  section. I have an AbstractBasePage which every page
> >> >>> extends, in this page I have:
> >> >>>
> >> >>> 
> >> >>>  >> >>> />
> >> >>>  >> />
> >> >>> 
> >> >>>
> >> >>> Some panels on the page add stuff to the head using an
> >> >>> IHeaderContributor however they're put before the  >> >>> in the wicket:head.. Result:
> >> >>>
> >> >>> 
> >> >>>  >> >>> media="screen"/>
> >> >>>
> >> >>>  >> >>>
> >> >>>
> >>
> src="../wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery
> >> >>>/jquery-ver-1362480357000.js">
> >> >>>  >> >>>
> >> >>>
> >>
> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1362480357000.js"
> >> >>> 
> >> >>> ... etc...
> >> >>>
> >> >>>   >> >>>
> >> >>>
> >>
> href="../wicket/resource/net.rrm.ehour.ui.timesheet.panel.OverviewPanel/css/overview-ver-1363710395000.css"
> >> >>> />
> >> >>>
> >> >>>  
> >> >>> 
> >> >>>
> >> >>> Unfortunately, IE8 requires the X-UA-Compatible meta tag to be the
> >> >>> first in the head section, otherwise it doesn't respect it. How can
> I
> >> >>> have this  child
> >> >>> in the head section? Thanks!
> >> >>>
> >> >>> gr,
> >> >>> Thies
> >> >>>
> >> >>>
> -
> >> >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> >>> For additional commands, e-mail: users-h...@wicket.apache.org
> >> >>>
> >> >>>
> >> >>
> >> >>
> >> >> --
> >> >> Martin Grigorov
> >> >> jWeekend
> >> >> Training, Consulting, Development
> >> >> http://jWeekend.com 
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> >
> > --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com 
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


Re: Rendering order of header contributions

2013-03-20 Thread Thies Edeling
haha, well it's not the cleanest code there is :)

On Wed, Mar 20, 2013 at 5:39 PM, Martin Grigorov  wrote:
> Thanks for sharing!
>
> P.S. Someone may compare Wicket with Perl now :-)
>
>
> On Wed, Mar 20, 2013 at 6:32 PM, Thies Edeling  wrote:
>
>> In the end I went for using the headerItemComparator as it was a bit
>> easier to implement without having to specify any other filters:
>>
>> getResourceSettings().setHeaderItemComparator(new
>> Comparator() {
>> @Override
>> public int
>> compare(ResourceAggregator.RecordedHeaderItem o1,
>> ResourceAggregator.RecordedHeaderItem o2) {
>> if (o1.getItem() instanceof StringHeaderItem) {
>> StringHeaderItem headerItem =
>> (StringHeaderItem) o1.getItem();
>>
>> if
>> (headerItem.getString().toString().contains("X-UA-Compatible")) {
>> return -1;
>> }
>> }
>>
>> return 0;
>> }
>> });
>>
>> On Wed, Mar 20, 2013 at 1:01 PM, Thies Edeling  wrote:
>> > Thanks!
>> >
>> > On Wed, Mar 20, 2013 at 12:58 PM, Martin Grigorov 
>> wrote:
>> >> Hi Thies,
>> >>
>> >> Check
>> >>
>> https://github.com/martin-g/blogs/commit/d5a248a3a3d5369c9cdc66604eba384428e9d0a0
>> >>
>> >> By using custom IHeaderResponse you can promote any kind of HeaderItem.
>> >>
>> >>
>> >> On Wed, Mar 20, 2013 at 1:06 PM, Thies Edeling 
>> wrote:
>> >>
>> >>> Hello,
>> >>>
>> >>> Using Wicket 6.5.0, how can I change the order on how Wicket renders
>> >>> the  section. I have an AbstractBasePage which every page
>> >>> extends, in this page I have:
>> >>>
>> >>> 
>> >>> > >>> />
>> >>> > />
>> >>> 
>> >>>
>> >>> Some panels on the page add stuff to the head using an
>> >>> IHeaderContributor however they're put before the > >>> in the wicket:head.. Result:
>> >>>
>> >>> 
>> >>> > >>> media="screen"/>
>> >>>
>> >>> > >>>
>> >>>
>> src="../wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery
>> >>>/jquery-ver-1362480357000.js">
>> >>> > >>>
>> >>>
>> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1362480357000.js"
>> >>> 
>> >>> ... etc...
>> >>>
>> >>>  > >>>
>> >>>
>> href="../wicket/resource/net.rrm.ehour.ui.timesheet.panel.OverviewPanel/css/overview-ver-1363710395000.css"
>> >>> />
>> >>>
>> >>>  
>> >>> 
>> >>>
>> >>> Unfortunately, IE8 requires the X-UA-Compatible meta tag to be the
>> >>> first in the head section, otherwise it doesn't respect it. How can I
>> >>> have this > >>> in the head section? Thanks!
>> >>>
>> >>> gr,
>> >>> Thies
>> >>>
>> >>> -
>> >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> >>> For additional commands, e-mail: users-h...@wicket.apache.org
>> >>>
>> >>>
>> >>
>> >>
>> >> --
>> >> Martin Grigorov
>> >> jWeekend
>> >> Training, Consulting, Development
>> >> http://jWeekend.com 
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com 

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



Re: Rendering order of header contributions

2013-03-20 Thread Martin Grigorov
Thanks for sharing!

P.S. Someone may compare Wicket with Perl now :-)


On Wed, Mar 20, 2013 at 6:32 PM, Thies Edeling  wrote:

> In the end I went for using the headerItemComparator as it was a bit
> easier to implement without having to specify any other filters:
>
> getResourceSettings().setHeaderItemComparator(new
> Comparator() {
> @Override
> public int
> compare(ResourceAggregator.RecordedHeaderItem o1,
> ResourceAggregator.RecordedHeaderItem o2) {
> if (o1.getItem() instanceof StringHeaderItem) {
> StringHeaderItem headerItem =
> (StringHeaderItem) o1.getItem();
>
> if
> (headerItem.getString().toString().contains("X-UA-Compatible")) {
> return -1;
> }
> }
>
> return 0;
> }
> });
>
> On Wed, Mar 20, 2013 at 1:01 PM, Thies Edeling  wrote:
> > Thanks!
> >
> > On Wed, Mar 20, 2013 at 12:58 PM, Martin Grigorov 
> wrote:
> >> Hi Thies,
> >>
> >> Check
> >>
> https://github.com/martin-g/blogs/commit/d5a248a3a3d5369c9cdc66604eba384428e9d0a0
> >>
> >> By using custom IHeaderResponse you can promote any kind of HeaderItem.
> >>
> >>
> >> On Wed, Mar 20, 2013 at 1:06 PM, Thies Edeling 
> wrote:
> >>
> >>> Hello,
> >>>
> >>> Using Wicket 6.5.0, how can I change the order on how Wicket renders
> >>> the  section. I have an AbstractBasePage which every page
> >>> extends, in this page I have:
> >>>
> >>> 
> >>>  >>> />
> >>>  />
> >>> 
> >>>
> >>> Some panels on the page add stuff to the head using an
> >>> IHeaderContributor however they're put before the  >>> in the wicket:head.. Result:
> >>>
> >>> 
> >>>  >>> media="screen"/>
> >>>
> >>>  >>>
> >>>
> src="../wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery
> >>>/jquery-ver-1362480357000.js">
> >>>  >>>
> >>>
> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1362480357000.js"
> >>> 
> >>> ... etc...
> >>>
> >>>   >>>
> >>>
> href="../wicket/resource/net.rrm.ehour.ui.timesheet.panel.OverviewPanel/css/overview-ver-1363710395000.css"
> >>> />
> >>>
> >>>  
> >>> 
> >>>
> >>> Unfortunately, IE8 requires the X-UA-Compatible meta tag to be the
> >>> first in the head section, otherwise it doesn't respect it. How can I
> >>> have this  >>> in the head section? Thanks!
> >>>
> >>> gr,
> >>> Thies
> >>>
> >>> -
> >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >>> For additional commands, e-mail: users-h...@wicket.apache.org
> >>>
> >>>
> >>
> >>
> >> --
> >> Martin Grigorov
> >> jWeekend
> >> Training, Consulting, Development
> >> http://jWeekend.com 
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


Re: Rendering order of header contributions

2013-03-20 Thread Thies Edeling
In the end I went for using the headerItemComparator as it was a bit
easier to implement without having to specify any other filters:

getResourceSettings().setHeaderItemComparator(new
Comparator() {
@Override
public int
compare(ResourceAggregator.RecordedHeaderItem o1,
ResourceAggregator.RecordedHeaderItem o2) {
if (o1.getItem() instanceof StringHeaderItem) {
StringHeaderItem headerItem =
(StringHeaderItem) o1.getItem();

if
(headerItem.getString().toString().contains("X-UA-Compatible")) {
return -1;
}
}

return 0;
}
});

On Wed, Mar 20, 2013 at 1:01 PM, Thies Edeling  wrote:
> Thanks!
>
> On Wed, Mar 20, 2013 at 12:58 PM, Martin Grigorov  
> wrote:
>> Hi Thies,
>>
>> Check
>> https://github.com/martin-g/blogs/commit/d5a248a3a3d5369c9cdc66604eba384428e9d0a0
>>
>> By using custom IHeaderResponse you can promote any kind of HeaderItem.
>>
>>
>> On Wed, Mar 20, 2013 at 1:06 PM, Thies Edeling  wrote:
>>
>>> Hello,
>>>
>>> Using Wicket 6.5.0, how can I change the order on how Wicket renders
>>> the  section. I have an AbstractBasePage which every page
>>> extends, in this page I have:
>>>
>>> 
>>> >> />
>>> 
>>> 
>>>
>>> Some panels on the page add stuff to the head using an
>>> IHeaderContributor however they're put before the >> in the wicket:head.. Result:
>>>
>>> 
>>> >> media="screen"/>
>>>
>>> >>
>>> src="../wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery
>>>/jquery-ver-1362480357000.js">
>>> >>
>>> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1362480357000.js"
>>> 
>>> ... etc...
>>>
>>>  >>
>>> href="../wicket/resource/net.rrm.ehour.ui.timesheet.panel.OverviewPanel/css/overview-ver-1363710395000.css"
>>> />
>>>
>>>  
>>> 
>>>
>>> Unfortunately, IE8 requires the X-UA-Compatible meta tag to be the
>>> first in the head section, otherwise it doesn't respect it. How can I
>>> have this >> in the head section? Thanks!
>>>
>>> gr,
>>> Thies
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com 

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



Re: Rendering order of header contributions

2013-03-20 Thread Thies Edeling
Thanks!

On Wed, Mar 20, 2013 at 12:58 PM, Martin Grigorov  wrote:
> Hi Thies,
>
> Check
> https://github.com/martin-g/blogs/commit/d5a248a3a3d5369c9cdc66604eba384428e9d0a0
>
> By using custom IHeaderResponse you can promote any kind of HeaderItem.
>
>
> On Wed, Mar 20, 2013 at 1:06 PM, Thies Edeling  wrote:
>
>> Hello,
>>
>> Using Wicket 6.5.0, how can I change the order on how Wicket renders
>> the  section. I have an AbstractBasePage which every page
>> extends, in this page I have:
>>
>> 
>> > />
>> 
>> 
>>
>> Some panels on the page add stuff to the head using an
>> IHeaderContributor however they're put before the > in the wicket:head.. Result:
>>
>> 
>> > media="screen"/>
>>
>> >
>> src="../wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery
>>/jquery-ver-1362480357000.js">
>> >
>> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1362480357000.js"
>> 
>> ... etc...
>>
>>  >
>> href="../wicket/resource/net.rrm.ehour.ui.timesheet.panel.OverviewPanel/css/overview-ver-1363710395000.css"
>> />
>>
>>  
>> 
>>
>> Unfortunately, IE8 requires the X-UA-Compatible meta tag to be the
>> first in the head section, otherwise it doesn't respect it. How can I
>> have this > in the head section? Thanks!
>>
>> gr,
>> Thies
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com 

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



Re: Rendering order of header contributions

2013-03-20 Thread Martin Grigorov
Hi Thies,

Check
https://github.com/martin-g/blogs/commit/d5a248a3a3d5369c9cdc66604eba384428e9d0a0

By using custom IHeaderResponse you can promote any kind of HeaderItem.


On Wed, Mar 20, 2013 at 1:06 PM, Thies Edeling  wrote:

> Hello,
>
> Using Wicket 6.5.0, how can I change the order on how Wicket renders
> the  section. I have an AbstractBasePage which every page
> extends, in this page I have:
>
> 
>  />
> 
> 
>
> Some panels on the page add stuff to the head using an
> IHeaderContributor however they're put before the  in the wicket:head.. Result:
>
> 
>  media="screen"/>
>
> 
> src="../wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery
>/jquery-ver-1362480357000.js">
> 
> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1362480357000.js"
> 
> ... etc...
>
>  
> href="../wicket/resource/net.rrm.ehour.ui.timesheet.panel.OverviewPanel/css/overview-ver-1363710395000.css"
> />
>
>  
> 
>
> Unfortunately, IE8 requires the X-UA-Compatible meta tag to be the
> first in the head section, otherwise it doesn't respect it. How can I
> have this  in the head section? Thanks!
>
> gr,
> Thies
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com