haha, well it's not the cleanest code there is :)

On Wed, Mar 20, 2013 at 5:39 PM, Martin Grigorov <mgrigo...@apache.org> wrote:
> Thanks for sharing!
>
> P.S. Someone may compare Wicket with Perl now :-)
>
>
> On Wed, Mar 20, 2013 at 6:32 PM, Thies Edeling <tedel...@gmail.com> 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<ResourceAggregator.RecordedHeaderItem>() {
>>                 @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 <tedel...@gmail.com> 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 <tedel...@gmail.com>
>> wrote:
>> >>
>> >>> Hello,
>> >>>
>> >>> Using Wicket 6.5.0, how can I change the order on how Wicket renders
>> >>> the <head> section. I have an AbstractBasePage which every page
>> >>> extends, in this page I have:
>> >>>
>> >>> <wicket:head>
>> >>>     <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7;
>> IE=EDGE"
>> >>> />
>> >>>     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
>> />
>> >>> </wicket:head>
>> >>>
>> >>> Some panels on the page add stuff to the head using an
>> >>> IHeaderContributor however they're put before the <meta tags defined
>> >>> in the wicket:head.. Result:
>> >>>
>> >>> <head>
>> >>>     <link rel="stylesheet" href="../../css/menu.css" type="text/css"
>> >>> media="screen"/>
>> >>>
>> >>>     <script type="text/javascript"
>> >>>
>> >>>
>> src="../wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery
>> >>>    /jquery-ver-1362480357000.js"></script>
>> >>>     <script type="text/javascript"
>> >>>
>> >>>
>> src="../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1362480357000.js"
>> >>> </script>
>> >>>     ... etc...
>> >>>
>> >>>      <link rel="stylesheet" type="text/css"
>> >>>
>> >>>
>> href="../wicket/resource/net.rrm.ehour.ui.timesheet.panel.OverviewPanel/css/overview-ver-1363710395000.css"
>> >>> />
>> >>>
>> >>>      <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7;
>> >>> IE=EDGE" />
>> >>> </head>
>> >>>
>> >>> 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 <meta tag defined in wicket:head rendered as the first 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 <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 <http://jweekend.com/>

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

Reply via email to