You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Elijah Epifanov (JIRA)" <my...@incubator.apache.org> on 2005/09/04 16:35:30 UTC

[jira] Created: (MYFACES-489) before doesn't work

<h:message for="firstNumber" ...> before <h:outputLabel value="1" for="firstNumber" /> doesn't work
---------------------------------------------------------------------------------------------------

         Key: MYFACES-489
         URL: http://issues.apache.org/jira/browse/MYFACES-489
     Project: MyFaces
        Type: Bug
    Versions: 1.0.9m9    
 Environment: Win 2000, JDK 1.5.0_b03, Apache Tomcat 5.5.7 bundled with NetBeans IDE 4.1 release
    Reporter: Elijah Epifanov


I'm trying to use following code, but it doesn't work :(
I'm sure that <h:message> evaluates Value-Binding expression before the <h:outputLabel> is instantiated.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>My first JSF</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<f:view>
<h:form id="calcForm"><div align="center">
<div><h:message for="firstNumber" styleClass="message" infoClass="message-info" warnClass="message-warn" errorClass="message-error" fatalClass="message-fatal" />
<h:message for="secondNumber" styleClass="message" infoClass="message-info" warnClass="message-warn" errorClass="message-error" fatalClass="message-fatal" />
<h:message for="result" styleClass="message" infoClass="message-info" warnClass="message-warn" errorClass="message-error" fatalClass="message-fatal" />
</div><table border="0" cellpadding="0" cellspacing="0" class="dialog">
 <tr>
  <td width="100" align="right"><h:outputLabel value="First Number" for="firstNumber" /></td>
  <td width="60"><h:inputText id="firstNumber" value="#{CalcBean.firstNumber}"
		      							 required="true" styleClass="text" /></td>
 </tr>
 <tr>
  <td align="right"><h:outputLabel value="Second Number" for="secondNumber" /></td>
  <td><h:inputText id="secondNumber" value="#{CalcBean.secondNumber}"
		      							required="true" styleClass="text" /></td>
 </tr>
 <tr>
  <td align="right"><h:outputLabel value="Result" for="result" /></td>
  <td><h:outputText id="result" value="#{CalcBean.result}"/></td>
 </tr>
 <tr>
  <td colspan="2"><table width="100%">
		 <tr>
			 <td align="center" width="50%"><h:commandButton id="submitAdd" action="#{CalcBean.add}" 
            value="add" styleClass="button" /></td>
				<td align="center" width="50%"><h:commandButton id="submitMultiply" action="#{CalcBean.multiply}" 
            value="multiply" styleClass="button" /></td>
			</tr>
		</table></td>
 </tr>
</table>
</div>
</h:form>
</f:view>
</body>
</html>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (MYFACES-489) before doesn't work

Posted by "Martin Marinschek (JIRA)" <my...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-489?page=all ]
     
Martin Marinschek closed MYFACES-489:
-------------------------------------

    Fix Version: Nightly Build
     Resolution: Invalid
      Assign To: Matthias Weßendorf


we will reopen this bug if Mathias' evaluation is incorrect.

> <h:message for="firstNumber" ...> before <h:outputLabel value="1" for="firstNumber" /> doesn't work
> ---------------------------------------------------------------------------------------------------
>
>          Key: MYFACES-489
>          URL: http://issues.apache.org/jira/browse/MYFACES-489
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.9m9
>  Environment: Win 2000, JDK 1.5.0_b03, Apache Tomcat 5.5.7 bundled with NetBeans IDE 4.1 release
>     Reporter: Elijah Epifanov
>     Assignee: Matthias Weßendorf
>      Fix For: Nightly Build

>
> I'm trying to use following code, but it doesn't work :(
> I'm sure that <h:message> evaluates Value-Binding expression before the <h:outputLabel> is instantiated.
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <%@page contentType="text/html"%>
> <%@page pageEncoding="UTF-8"%>
> <%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
> <%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <title>My first JSF</title>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> <link href="default.css" rel="stylesheet" type="text/css" />
> </head>
> <body>
> <f:view>
> <h:form id="calcForm"><div align="center">
> <div><h:message for="firstNumber" styleClass="message" infoClass="message-info" warnClass="message-warn" errorClass="message-error" fatalClass="message-fatal" />
> <h:message for="secondNumber" styleClass="message" infoClass="message-info" warnClass="message-warn" errorClass="message-error" fatalClass="message-fatal" />
> <h:message for="result" styleClass="message" infoClass="message-info" warnClass="message-warn" errorClass="message-error" fatalClass="message-fatal" />
> </div><table border="0" cellpadding="0" cellspacing="0" class="dialog">
>  <tr>
>   <td width="100" align="right"><h:outputLabel value="First Number" for="firstNumber" /></td>
>   <td width="60"><h:inputText id="firstNumber" value="#{CalcBean.firstNumber}"
> 		      							 required="true" styleClass="text" /></td>
>  </tr>
>  <tr>
>   <td align="right"><h:outputLabel value="Second Number" for="secondNumber" /></td>
>   <td><h:inputText id="secondNumber" value="#{CalcBean.secondNumber}"
> 		      							required="true" styleClass="text" /></td>
>  </tr>
>  <tr>
>   <td align="right"><h:outputLabel value="Result" for="result" /></td>
>   <td><h:outputText id="result" value="#{CalcBean.result}"/></td>
>  </tr>
>  <tr>
>   <td colspan="2"><table width="100%">
> 		 <tr>
> 			 <td align="center" width="50%"><h:commandButton id="submitAdd" action="#{CalcBean.add}" 
>             value="add" styleClass="button" /></td>
> 				<td align="center" width="50%"><h:commandButton id="submitMultiply" action="#{CalcBean.multiply}" 
>             value="multiply" styleClass="button" /></td>
> 			</tr>
> 		</table></td>
>  </tr>
> </table>
> </div>
> </h:form>
> </f:view>
> </body>
> </html>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-489) before doesn't work

Posted by "Matthias Weßendorf (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-489?page=comments#action_12322618 ] 

Matthias Weßendorf commented on MYFACES-489:
--------------------------------------------

Elijah,

I think your problem is realted to *known* problems, described here:
http://www.onjava.com/pub/a/onjava/2004/06/09/jsf.html

Do you agree?
Do you get any (error/exception) - messages ?

-Matthias

> <h:message for="firstNumber" ...> before <h:outputLabel value="1" for="firstNumber" /> doesn't work
> ---------------------------------------------------------------------------------------------------
>
>          Key: MYFACES-489
>          URL: http://issues.apache.org/jira/browse/MYFACES-489
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.9m9
>  Environment: Win 2000, JDK 1.5.0_b03, Apache Tomcat 5.5.7 bundled with NetBeans IDE 4.1 release
>     Reporter: Elijah Epifanov

>
> I'm trying to use following code, but it doesn't work :(
> I'm sure that <h:message> evaluates Value-Binding expression before the <h:outputLabel> is instantiated.
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <%@page contentType="text/html"%>
> <%@page pageEncoding="UTF-8"%>
> <%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
> <%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <title>My first JSF</title>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> <link href="default.css" rel="stylesheet" type="text/css" />
> </head>
> <body>
> <f:view>
> <h:form id="calcForm"><div align="center">
> <div><h:message for="firstNumber" styleClass="message" infoClass="message-info" warnClass="message-warn" errorClass="message-error" fatalClass="message-fatal" />
> <h:message for="secondNumber" styleClass="message" infoClass="message-info" warnClass="message-warn" errorClass="message-error" fatalClass="message-fatal" />
> <h:message for="result" styleClass="message" infoClass="message-info" warnClass="message-warn" errorClass="message-error" fatalClass="message-fatal" />
> </div><table border="0" cellpadding="0" cellspacing="0" class="dialog">
>  <tr>
>   <td width="100" align="right"><h:outputLabel value="First Number" for="firstNumber" /></td>
>   <td width="60"><h:inputText id="firstNumber" value="#{CalcBean.firstNumber}"
> 		      							 required="true" styleClass="text" /></td>
>  </tr>
>  <tr>
>   <td align="right"><h:outputLabel value="Second Number" for="secondNumber" /></td>
>   <td><h:inputText id="secondNumber" value="#{CalcBean.secondNumber}"
> 		      							required="true" styleClass="text" /></td>
>  </tr>
>  <tr>
>   <td align="right"><h:outputLabel value="Result" for="result" /></td>
>   <td><h:outputText id="result" value="#{CalcBean.result}"/></td>
>  </tr>
>  <tr>
>   <td colspan="2"><table width="100%">
> 		 <tr>
> 			 <td align="center" width="50%"><h:commandButton id="submitAdd" action="#{CalcBean.add}" 
>             value="add" styleClass="button" /></td>
> 				<td align="center" width="50%"><h:commandButton id="submitMultiply" action="#{CalcBean.multiply}" 
>             value="multiply" styleClass="button" /></td>
> 			</tr>
> 		</table></td>
>  </tr>
> </table>
> </div>
> </h:form>
> </f:view>
> </body>
> </html>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira