You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by Eugene Borodkin <eu...@yahoo.com.INVALID> on 2014/08/20 17:15:49 UTC

Problem with Tiles:Insert Tag in IE 8

Hi,

We have an issue on our JSP which uses Tiles,only in IE 8(Firefox is fine).

The JSP begins with standard imports (incl. the Tiles library), and the first tag on the page is:

<tiles:insert definition=".application.layout">


This works and renders the page correctly. However, adding anything prior to this tag breaks the layout in IE8 (even a single comment). Some kind of weird issues occur (maybe CSS-related) as soon as we try the below, which should be identical to this first tag. Does anyone have any thoughts?

(1): Should be identical
<c:setvar="layoutDef" value="application"/><tiles:insertdefinition=".${layoutDef}.layout">


(2): Should be identical (comment)

<!-- TEST -->
<tiles:insertdefinition=".application.layout">

The above two break our page layout and render it incorrectly only in IE8. Firefox has no issues.

Thanks for any help,
- Eugene Borodkin

AW: Problem with Tiles:Insert Tag in IE 8

Posted by Mick Semb Wever <mc...@apache.org>.
On Wed, 2014-08-20 at 09:32 -0700, Chris Pratt wrote:
> This should work:
> 
> <!DOCTYPE html>
> <c:set var="layoutDef" value="application"/>
> <c:if test="${!currentComplexApplication.complex}">
>     <c:set var="layoutDef" value="single"/>
> </c:if>
> <tiles:insert definition=".${layoutDef}.layout">


You can also put everything on one line like

<c:set var="layoutDef" value="application"/><c:if test="${!currentComplexApplication.complex}"><c:set var="layoutDef" value="single"/></c:if><tiles:insert definition=".${layoutDef}.layout">


Although that's a messy way to do it.
~mck

-- 
"There are only two ways to live your life. One is as though nothing is
a miracle. The other is as if everything is." Albert Einstein 

| http://github.com/finn-no | http://tech.finn.no |


Re: AW: Problem with Tiles:Insert Tag in IE 8

Posted by Eugene Borodkin <eu...@yahoo.com.INVALID>.
Thanks for the help. We've now resolved our issue.

- Eugene



________________________________
 From: Chris Pratt <th...@gmail.com>
To: Tiles Users List <us...@tiles.apache.org>; Eugene Borodkin <eu...@yahoo.com> 
Sent: Wednesday, August 20, 2014 12:32 PM
Subject: Re: AW: Problem with Tiles:Insert Tag in IE 8
 

This should work:

<!DOCTYPE html>
<c:set var="layoutDef" value="application"/>
<c:if test="${!currentComplexApplication.complex}">
    <c:set var="layoutDef" value="single"/>
</c:if>
<tiles:insert definition=".${layoutDef}.layout">

Just remove the doctype from the layouts and make sure it's on the top of
each page.
  (*Chris*)





On Wed, Aug 20, 2014 at 9:23 AM, Eugene Borodkin <
eugenebalt@yahoo.com.invalid> wrote:

> Thanks for the reply Marvin. Yes, you were right, the .application.layout
> page does insert a DOCTYPE.
>
>
> We'll try to find a workaround for this -- we need dynamic substitution of
> the right tile definition, based on certain conditions, as below; we need
> to switch between .application.layoutand .single.layout, so we were hoping
> this would work:
>
>
> <c:set var="layoutDef" value="application"/>
> <c:if test="${!currentComplexApplication.complex}">
>     <c:set var="layoutDef" value="single"/>
> </c:if>
> <tiles:insert definition=".${layoutDef}.layout">
>
>
> But because of the DOCTYPE we get the IE8 rendering issue. We'll try to
> find a workaround but I may post here again if we have any further
> issues/questions. Thanks a lot for your help!
>
> - Eugene
>
>
>
>
> ________________________________
>  From: "Marvin.Luchs@t-systems.com" <Ma...@t-systems.com>
> To: users@tiles.apache.org
> Sent: Wednesday, August 20, 2014 11:23 AM
> Subject: AW: Problem with Tiles:Insert Tag in IE 8
>
>
> Hi Eugene,
>
> Sounds like ".application.layout" inserts a DOCTYPE declaration into your
> HTML document. This DOCTYPE controls the browser's rendering mode and it
> has to be the very first content of your HTML code (I think even spaces or
> line breaks prevent the browser from recognizing the DOCTYPE).
>
> " When the user agent encountered a document with a well-formed DOCTYPE
> declaration of a current HTML standard (i.e. HTML 2.0 wouldn't cut it), it
> would assume that the author knew what she was doing and render the page in
> "standards" mode (laying out elements using the W3C's box model). But when
> no DOCTYPE or a malformed DOCTYPE was encountered, the document would be
> rendered in "quirks" mode, i.e., laying out elements using the non-standard
> box model of IE5.x/Windows."
> http://alistapart.com/article/beyonddoctype
>
> In Quirks mode the Internet Explorer may render your document, especially
> CSS, quite differently.
>
> If this is not the cause of your problem, examples of your generated HTML
> in both cases would be helpful.
>
> Best regards,
> Marvin Luchs
>
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Eugene Borodkin [mailto:eugenebalt@yahoo.com.INVALID]
> Gesendet: Mittwoch, 20. August 2014 17:16
> An: users@tiles.apache.org
> Betreff: Problem with Tiles:Insert Tag in IE 8
>
> Hi,
>
> We have an issue on our JSP which uses Tiles,only in IE 8(Firefox is fine).
>
> The JSP begins with standard imports (incl. the Tiles library), and the
> first tag on the page is:
>
> <tiles:insert definition=".application.layout">
>
>
> This works and renders the page correctly. However, adding anything prior
> to this tag breaks the layout in IE8 (even a single comment). Some kind of
> weird issues occur (maybe CSS-related) as soon as we try the below, which
> should be identical to this first tag. Does anyone have any thoughts?
>
> (1): Should be identical
> <c:setvar="layoutDef"
> value="application"/><tiles:insertdefinition=".${layoutDef}.layout">
>
>
> (2): Should be identical (comment)
>
> <!-- TEST -->
> <tiles:insertdefinition=".application.layout">
>
> The above two break our page layout and render it incorrectly only in IE8.
> Firefox has no issues.
>
> Thanks for any help,
> - Eugene Borodkin
>

Re: AW: Problem with Tiles:Insert Tag in IE 8

Posted by Chris Pratt <th...@gmail.com>.
This should work:

<!DOCTYPE html>
<c:set var="layoutDef" value="application"/>
<c:if test="${!currentComplexApplication.complex}">
    <c:set var="layoutDef" value="single"/>
</c:if>
<tiles:insert definition=".${layoutDef}.layout">

Just remove the doctype from the layouts and make sure it's on the top of
each page.
  (*Chris*)


On Wed, Aug 20, 2014 at 9:23 AM, Eugene Borodkin <
eugenebalt@yahoo.com.invalid> wrote:

> Thanks for the reply Marvin. Yes, you were right, the .application.layout
> page does insert a DOCTYPE.
>
>
> We'll try to find a workaround for this -- we need dynamic substitution of
> the right tile definition, based on certain conditions, as below; we need
> to switch between .application.layoutand .single.layout, so we were hoping
> this would work:
>
>
> <c:set var="layoutDef" value="application"/>
> <c:if test="${!currentComplexApplication.complex}">
>     <c:set var="layoutDef" value="single"/>
> </c:if>
> <tiles:insert definition=".${layoutDef}.layout">
>
>
> But because of the DOCTYPE we get the IE8 rendering issue. We'll try to
> find a workaround but I may post here again if we have any further
> issues/questions. Thanks a lot for your help!
>
> - Eugene
>
>
>
>
> ________________________________
>  From: "Marvin.Luchs@t-systems.com" <Ma...@t-systems.com>
> To: users@tiles.apache.org
> Sent: Wednesday, August 20, 2014 11:23 AM
> Subject: AW: Problem with Tiles:Insert Tag in IE 8
>
>
> Hi Eugene,
>
> Sounds like ".application.layout" inserts a DOCTYPE declaration into your
> HTML document. This DOCTYPE controls the browser's rendering mode and it
> has to be the very first content of your HTML code (I think even spaces or
> line breaks prevent the browser from recognizing the DOCTYPE).
>
> " When the user agent encountered a document with a well-formed DOCTYPE
> declaration of a current HTML standard (i.e. HTML 2.0 wouldn't cut it), it
> would assume that the author knew what she was doing and render the page in
> "standards" mode (laying out elements using the W3C's box model). But when
> no DOCTYPE or a malformed DOCTYPE was encountered, the document would be
> rendered in "quirks" mode, i.e., laying out elements using the non-standard
> box model of IE5.x/Windows."
> http://alistapart.com/article/beyonddoctype
>
> In Quirks mode the Internet Explorer may render your document, especially
> CSS, quite differently.
>
> If this is not the cause of your problem, examples of your generated HTML
> in both cases would be helpful.
>
> Best regards,
> Marvin Luchs
>
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Eugene Borodkin [mailto:eugenebalt@yahoo.com.INVALID]
> Gesendet: Mittwoch, 20. August 2014 17:16
> An: users@tiles.apache.org
> Betreff: Problem with Tiles:Insert Tag in IE 8
>
> Hi,
>
> We have an issue on our JSP which uses Tiles,only in IE 8(Firefox is fine).
>
> The JSP begins with standard imports (incl. the Tiles library), and the
> first tag on the page is:
>
> <tiles:insert definition=".application.layout">
>
>
> This works and renders the page correctly. However, adding anything prior
> to this tag breaks the layout in IE8 (even a single comment). Some kind of
> weird issues occur (maybe CSS-related) as soon as we try the below, which
> should be identical to this first tag. Does anyone have any thoughts?
>
> (1): Should be identical
> <c:setvar="layoutDef"
> value="application"/><tiles:insertdefinition=".${layoutDef}.layout">
>
>
> (2): Should be identical (comment)
>
> <!-- TEST -->
> <tiles:insertdefinition=".application.layout">
>
> The above two break our page layout and render it incorrectly only in IE8.
> Firefox has no issues.
>
> Thanks for any help,
> - Eugene Borodkin
>

Re: AW: Problem with Tiles:Insert Tag in IE 8

Posted by Eugene Borodkin <eu...@yahoo.com.INVALID>.
Thanks for the reply Marvin. Yes, you were right, the .application.layout page does insert a DOCTYPE. 


We'll try to find a workaround for this -- we need dynamic substitution of the right tile definition, based on certain conditions, as below; we need to switch between .application.layoutand .single.layout, so we were hoping this would work:


<c:set var="layoutDef" value="application"/>
<c:if test="${!currentComplexApplication.complex}">
    <c:set var="layoutDef" value="single"/>    
</c:if>
<tiles:insert definition=".${layoutDef}.layout">


But because of the DOCTYPE we get the IE8 rendering issue. We'll try to find a workaround but I may post here again if we have any further issues/questions. Thanks a lot for your help!

- Eugene




________________________________
 From: "Marvin.Luchs@t-systems.com" <Ma...@t-systems.com>
To: users@tiles.apache.org 
Sent: Wednesday, August 20, 2014 11:23 AM
Subject: AW: Problem with Tiles:Insert Tag in IE 8
 

Hi Eugene,

Sounds like ".application.layout" inserts a DOCTYPE declaration into your HTML document. This DOCTYPE controls the browser's rendering mode and it has to be the very first content of your HTML code (I think even spaces or line breaks prevent the browser from recognizing the DOCTYPE).

" When the user agent encountered a document with a well-formed DOCTYPE declaration of a current HTML standard (i.e. HTML 2.0 wouldn't cut it), it would assume that the author knew what she was doing and render the page in "standards" mode (laying out elements using the W3C's box model). But when no DOCTYPE or a malformed DOCTYPE was encountered, the document would be rendered in "quirks" mode, i.e., laying out elements using the non-standard box model of IE5.x/Windows."
http://alistapart.com/article/beyonddoctype

In Quirks mode the Internet Explorer may render your document, especially CSS, quite differently.

If this is not the cause of your problem, examples of your generated HTML in both cases would be helpful.

Best regards,
Marvin Luchs




-----Ursprüngliche Nachricht-----
Von: Eugene Borodkin [mailto:eugenebalt@yahoo.com.INVALID] 
Gesendet: Mittwoch, 20. August 2014 17:16
An: users@tiles.apache.org
Betreff: Problem with Tiles:Insert Tag in IE 8

Hi,

We have an issue on our JSP which uses Tiles,only in IE 8(Firefox is fine).

The JSP begins with standard imports (incl. the Tiles library), and the first tag on the page is:

<tiles:insert definition=".application.layout">


This works and renders the page correctly. However, adding anything prior to this tag breaks the layout in IE8 (even a single comment). Some kind of weird issues occur (maybe CSS-related) as soon as we try the below, which should be identical to this first tag. Does anyone have any thoughts?

(1): Should be identical
<c:setvar="layoutDef" value="application"/><tiles:insertdefinition=".${layoutDef}.layout">


(2): Should be identical (comment)

<!-- TEST -->
<tiles:insertdefinition=".application.layout">

The above two break our page layout and render it incorrectly only in IE8. Firefox has no issues.

Thanks for any help,
- Eugene Borodkin

AW: Problem with Tiles:Insert Tag in IE 8

Posted by Ma...@t-systems.com.
Hi Eugene,

Sounds like ".application.layout" inserts a DOCTYPE declaration into your HTML document. This DOCTYPE controls the browser's rendering mode and it has to be the very first content of your HTML code (I think even spaces or line breaks prevent the browser from recognizing the DOCTYPE).

" When the user agent encountered a document with a well-formed DOCTYPE declaration of a current HTML standard (i.e. HTML 2.0 wouldn't cut it), it would assume that the author knew what she was doing and render the page in "standards" mode (laying out elements using the W3C's box model). But when no DOCTYPE or a malformed DOCTYPE was encountered, the document would be rendered in "quirks" mode, i.e., laying out elements using the non-standard box model of IE5.x/Windows."
http://alistapart.com/article/beyonddoctype

In Quirks mode the Internet Explorer may render your document, especially CSS, quite differently.

If this is not the cause of your problem, examples of your generated HTML in both cases would be helpful.

Best regards,
Marvin Luchs



-----Ursprüngliche Nachricht-----
Von: Eugene Borodkin [mailto:eugenebalt@yahoo.com.INVALID] 
Gesendet: Mittwoch, 20. August 2014 17:16
An: users@tiles.apache.org
Betreff: Problem with Tiles:Insert Tag in IE 8

Hi,

We have an issue on our JSP which uses Tiles,only in IE 8(Firefox is fine).

The JSP begins with standard imports (incl. the Tiles library), and the first tag on the page is:

<tiles:insert definition=".application.layout">


This works and renders the page correctly. However, adding anything prior to this tag breaks the layout in IE8 (even a single comment). Some kind of weird issues occur (maybe CSS-related) as soon as we try the below, which should be identical to this first tag. Does anyone have any thoughts?

(1): Should be identical
<c:setvar="layoutDef" value="application"/><tiles:insertdefinition=".${layoutDef}.layout">


(2): Should be identical (comment)

<!-- TEST -->
<tiles:insertdefinition=".application.layout">

The above two break our page layout and render it incorrectly only in IE8. Firefox has no issues.

Thanks for any help,
- Eugene Borodkin