You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Daniel Zwink <zw...@oio.de> on 2005/06/01 11:08:50 UTC

Re: org.apache.myfaces.PRETTY_HTML

Hi Randahl,

seems as if it's an editor problem?! As you can see above my mail client
shows pretty html. You better try another editor to look into the generated
html sources.


Randahl Fink Isaksen wrote:
  [...]

  MY RESULT OUTPUT:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
xml:lang="en"><head><title>Test
Page</title></head><body><h2>Test</h2><p>Paragraph</p><form
id="responseForm" name="responseForm" method="post"
action="/puls/rendering/master.jsf"
enctype="application/x-www-form-urlencoded"><input id="responseForm:back"
name="responseForm:back" type="submit" value="Back"
onclick="clear_responseForm();document.forms['responseForm'].elements['autoS
croll'].value=getScrolling();"/><input type="hidden"
name="responseForm_SUBMIT" value="1"/><input type="hidden"
name="autoScroll"/><input type="hidden"
name="responseForm:_link_hidden_"/><script type="text/javascript">
<!--
function clear_responseForm() {
  var f = document.forms['responseForm'];
  f.elements['responseForm:_link_hidden_'].value=null;
  f.target='';
}
clear_responseForm();
//-->
</script></form></body></html>
<script type="text/javascript">
<!--
function getScrolling() {
    var x = 0; var y = 0;
    if (document.body && document.body.scrollLeft &&
!isNaN(document.body.scrollLeft)) {
        x = document.body.scrollLeft;
    } else if (window.pageXOffset && !isNaN(window.pageXOffset)) {
        x = window.pageXOffset;
    }
    if (document.body && document.body.scrollTop &&
!isNaN(document.body.scrollTop)) {
        y = document.body.scrollTop;
    } else if (window.pageYOffset && !isNaN(window.pageYOffset)) {
        y = window.pageYOffset;
    }
    return x + "," + y;
}
window.scrollTo(0,0);
//-->
</script>


  MY ORIGINAL PAGE:

  <?xml version="1.0" encoding="UTF-8"?>
  <jsp:root
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:jsp="http://java.sun.com/JSP/Page"
      version="2.0"
  >
      <jsp:output
          doctype-root-element="html"
          doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
          doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
      />
       <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
          <html xmlns="http://www.w3.org/1999/xhtml"" xml:lang="en"
lang="en">
              <head>
                  <title>Test Page</title>
              </head>
              <body>
                  <h2>Test</h2>
                  <p>Paragraph</p>
                  <h:form id="responseForm">
                      <h:commandButton id="back" value="Back"
action="success"/>
                  </h:form>
              </body>
          </html>
      </f:view>
  </jsp:root>


Greets, Daniel Zwink
--
Orientation in Objects GmbH
Weinheimerstr. 68
D-68309 Mannheim
http://www.oio.de
Tel +49(0)621-71839-0
Fax. +49(0)621-71839-50





Re: org.apache.myfaces.PRETTY_HTML

Posted by b0nyb0y <b0...@gmail.com>.
At least on Gmail, I don't see anything to indicate PRETTY_HTML; I
only see a 'squeezed' HTML with nicely formatted javascript code. 
IMO, if there's a problem with an editor detecting end-of-line
characters, the behavior on both HTML and javascript part should be
the same.

But if you really see both parts being nicely formatted, then I would
like to know which editor you're using right now, because having it
would really help me debugging my webapp.

FYI, I tried PRETTY_HTML when I used 1.0.9 milestone, and found that
it didn't quite work (at least on my XP box with Tomcat 5.5.x), so I
just turned the feature off.  Now I'm using a nightly build, but I
still haven't tried it again yet.


On 6/1/05, Daniel Zwink <zw...@oio.de> wrote:
>  
> Hi Randahl, 
>   
> seems as if it's an editor problem?! As you can see above my mail client
> shows pretty html. You better try another editor to look into the generated
> html sources. 
>  
> 
> Greets, Daniel Zwink
> --
> Orientation in Objects GmbH
> Weinheimerstr. 68
> D-68309 Mannheim
> http://www.oio.de
> Tel +49(0)621-71839-0
> Fax. +49(0)621-71839-50 
>