Thanks Heath,
It is working but with globalOnly="true".
Thanks again,
Vinod
Heath Borders
<heath.borders@ To: MyFaces Discussion
<[email protected]>
gmail.com> cc:
Subject: Re: <h:message> does not
work with <h:form>
04/04/2005
07:36 PM
Please respond
to "MyFaces
Discussion"
The form itself doesn't have messages associated with it. The messages are
associated with the individual components that contain the validation
errors. If you want all messages displayed you can use the <h:messages />
tag with globalOnly="false".
On Apr 4, 2005 4:21 AM, Vinod Singh <[EMAIL PROTECTED]> wrote:
Hi All,
I am using myfaces with tiles so all of my jsp pages are inside <f:subview
>. My problem is that the <h:message for="clientForm" /> tag does not work
for <h:form> tag meanwhile it works for other components. But <h:messages
/> works for <h:form> also.
A typical page is like below-
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<f:loadBundle basename="Message" var="Message"/>
<link rel="stylesheet" type="text/css" href="css/tiles.css" />
<h:outputText value="CLIENT"/>
<h:form id="clientForm">
<h:message for="clientForm" errorClass="errMsgStyle" infoClass="
infoMsgStyle" showSummary="true" showDetail="true" />
<h:panelGrid columns="3">
<h:outputText value="#{Message.client_name_label}" />
<h:inputText id="client_id" value="#{Client.client_id}" required="
true" size="40">
<f:validateLength maximum="30" minimum="3" />
</h:inputText>
<h:message for="client_id" />
<h:outputText value="#{Message.client_desc_label}" />
<h:inputText id="description" value="#{Client.description}"
required="true" size="40">
<f:validateLength maximum="50" minimum="1" />
</h:inputText>
<h:message for="description" />
<h:commandButton id="submit" action="#{Persister.saveClient}" value
="#{Message.client_submit_button}" />
</h:panelGrid>
</h:form>
Any clues.
Thanks
Vinod
--
-Heath Borders-Wing
[EMAIL PROTECTED]