I did test it now and it doesn't work. The code should have been:

@AfterRender
    private void afterRender(MarkupWriter writer) throws JaxenException {

Element foundIEMode = TapestryXPath.xpath("html/head/meta[@http-equiv='X-UA-Compatible']").selectSingleElement(writer.getDocument());
        Element head = writer.getDocument().find("html/head");
        if(foundIEMode != null) {
            foundIEMode.moveToTop(head);
        }
    }

But that still doesn't work as like you said the css and js are added to the page at a later stage in the rendering phase. Sounds like you need to do the reordering after the css/js is added. I guess you can decorate the service which does this. Unfortunatly I don't know where this is done of the top of my head. Have a look at the source or maybe someone else can comment.

Good luck,
Joost


On 18/01/11 9:50 AM, Joost Schouten (ml) wrote:
 Haven't tested it but something like this will probably do the trick:

@AfterRender
    private void afterRender(MarkupWriter writer) {
Element foundIEMode = writer.getDocument().find("html/head/meta[@http-equiv='X-UA-Compatible']");
        Element head = writer.getDocument().find("html/head");
        if(foundIEMode != null) {
            foundIEMode.moveToTop(head);
        }
    }

Cheers,
Joost

On 18/01/11 9:24 AM, Angelo C. wrote:
Hi,

after upgrading, my app has problem with IE8 all the time, I need to put
this as the first entry in the head section:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

but T5.2.4 always has scripts inserted first:

<  script
src="/tapestry5-hotel-booking/assets/1.2-SNAPSHOT/stack/en/core.js"...

any approach to force that meta tag to be the first? Thanks,

Angelo





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

Reply via email to