geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Zynevich (JIRA)" <j...@apache.org>
Subject [jira] Created: (GERONIMO-3167) When JSF renders, fields are shifted
Date Thu, 17 May 2007 12:16:16 GMT
When JSF renders, fields are shifted
------------------------------------

                 Key: GERONIMO-3167
                 URL: https://issues.apache.org/jira/browse/GERONIMO-3167
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: web
    Affects Versions: 2.0-M5
         Environment: winxp, rev 536774
            Reporter: Alexander Zynevich
         Attachments: guessnumber.war, guessnumber.zip

I built "Guess Number" application from RI (from Glassfish project).
However I noticed that when rendering JSP:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head> <title>Hello</title> </head>
    <%@ page contentType="text/xml" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <body bgcolor="white">
    <f:view>
    <h:form id="helloForm" >
      <h2>Hi. My name is Duke.  I'm thinking of a number from
      <h:outputText value="#{UserNumberBean.minimum}"/> to
      <h:outputText value="#{UserNumberBean.maximum}"/>.  Can you guess
      it?</h2>

        <h:graphicImage id="waveImg" url="/wave.med.gif" />
  	<h:inputText id="userNo" label="User Number" value="#{UserNumberBean.userNumber}"
                      validator="#{UserNumberBean.validate}"/>          
	 <h:commandButton id="submit" action="success" value="Submit" />
         <p />
	 <h:message showSummary="true" showDetail="false" style="color: red; font-family: 'New
Century Schoolbook', serif; font-style: oblique; text-decoration: overline" id="errors1" for="userNo"/>

    </h:form>
    </f:view>

    <p>
      <a href="http://validator.w3.org/check?uri=referer"><img
          src="http://www.w3.org/Icons/valid-xhtml10"
          alt="Valid XHTML 1.0!" height="31" width="88" /></a>
    </p>
    </body>
</html>  

it produces HTML output:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head> <title>Hello</title> </head>
    
    
    
    <body bgcolor="white">
    <form id="helloForm" name="helloForm" method="post" action="/guessnumber/guess/greeting.jsp;jsessionid=8127572BCEF374530312AB95A19F6A3C"
enctype="application/x-www-form-urlencoded">1
      <h2>Hi. My name is Duke.  I'm thinking of a number from
      10 to
      <img id="helloForm:waveImg" src="/guessnumber/wave.med.gif;jsessionid=8127572BCEF374530312AB95A19F6A3C"
/>.  Can you guess
      it?</h2>

        <input id="helloForm:userNo" name="helloForm:userNo" type="text" value="" /><input
id="helloForm:submit" name="helloForm:submit" type="submit" value="Submit" onclick="clear_helloForm();"
/>
         <p />
	 <input type="hidden" name="helloForm:_link_hidden_" /><script type="text/javascript"><!--
function clear_helloForm() {
  var f = document.forms['helloForm'];
  var elem0 = f.elements['helloForm:_link_hidden_'];
  if (elem0.value != '') {
    elem0.value='';
  }
  f.target='';
}
clear_helloForm();
//--></script><input type="hidden" name="helloForm_SUBMIT" value="1" /><input
type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="C9+lUnxFbF33IdgUBUsYs6qe3...."
/></form>

    <p>
      <a href="http://validator.w3.org/check?uri=referer"><img
          src="http://www.w3.org/Icons/valid-xhtml10"
          alt="Valid XHTML 1.0!" height="31" width="88" /></a>
    </p>
    </body>
</html>  

however I would expect something like:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head> <title>Hello</title> </head>
    
    
    
    <body bgcolor="white">
    <form id="helloForm" name="helloForm" method="post" action="/guessnumber/guess/greeting.jsp;jsessionid=8127572BCEF374530312AB95A19F6A3C"
enctype="application/x-www-form-urlencoded">1
      <h2>Hi. My name is Duke.  I'm thinking of a number from
      1 to 10
      .  Can you guess
      it?</h2>
        <img id="helloForm:waveImg" src="/guessnumber/wave.med.gif;jsessionid=8127572BCEF374530312AB95A19F6A3C"
/>
        <input id="helloForm:userNo" name="helloForm:userNo" type="text" value="" /><input
id="helloForm:submit" name="helloForm:submit" type="submit" value="Submit" onclick="clear_helloForm();"
/>
         <p />
	 <input type="hidden" name="helloForm:_link_hidden_" /><script type="text/javascript"><!--
function clear_helloForm() {
  var f = document.forms['helloForm'];
  var elem0 = f.elements['helloForm:_link_hidden_'];
  if (elem0.value != '') {
    elem0.value='';
  }
  f.target='';
}
clear_helloForm();
//--></script><input type="hidden" name="helloForm_SUBMIT" value="1" /><input
type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="C9+lUnxFbF33IdgUBUsYs6qe3...."
/></form>

    <p>
      <a href="http://validator.w3.org/check?uri=referer"><img
          src="http://www.w3.org/Icons/valid-xhtml10"
          alt="Valid XHTML 1.0!" height="31" width="88" /></a>
    </p>
    </body>
</html>

Looks like miserable bug... But effect as if "1" gets possition of something. "10" gets right
possition of "1". "/wave.med.gif" gets right possition of "10". I guess that if there were
some 4th ouput element it would get position of "/wave.med.gif" and so on...

I attach screenshot, war and zip of m2eclipse project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message