<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">
<[EMAIL PROTECTED] contentType="text/html"%>
<[EMAIL PROTECTED] pageEncoding="UTF-8"%>
<[EMAIL PROTECTED] uri="http://java.sun.com/jsf/html" prefix="h" %>
<[EMAIL PROTECTED] 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