You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Vinod Singh <Vi...@rmsi.com> on 2005/04/04 11:21:59 UTC

does not work with

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


Re: does not work with

Posted by Heath Borders <he...@gmail.com>.
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 <Vi...@rmsi.com> 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
hborders@mail.win.org