You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by sia far <si...@hotmail.com> on 2006/03/04 03:57:25 UTC
no value for h:message or t:message
Hello Everyone:
I have the following simple code:
I have defined an input text as required. However, I get the following for
the validation error:
"{0}": Value is required
if I use h:message or t:message, neither the input id nor the label value is
replaced for {0}. I even tried to deply the simple application put on the
myfaces homepage, I get the same thing for validation. I am using RAD 6.01.1
and WAS 6.2.7. I am following everything by the book. Can anyone be kind
enough to point out what I doing wrong? Here is the code snippet (The first
input is the on that is required).
I have also tried to replace <t:message ... in the following snippet with
<h:message id="pmrError" for="form1:pmr" styleClass="red-dark"/>
but of no avail
<h:form id="form1" name="pmrSearch">
<h:panelGrid columns="3" cellpadding="2" >
<h:panelGroup>
<h:outputLabel for="form1:pmr" value="#{msg['pmrNo']}" />
<h:inputText id="pmr" maxlength="6" size="6"
value="#{searchPmrBean.pmr}" required="true" >
<f:validateLength minimum="1" maximum="6" />
</h:inputText>
<t:message id="pmrError" for="form1:pmr" styleClass="red-dark"
replaceIdWithLabel="true"/>
</h:panelGroup>
<h:panelGroup>
<h:outputLabel for="form1:bno" value="#{msg['bno']}:" />
<h:inputText id="bno" value="#{searchPmrBean.bno}" maxlength="3"
size="3" >
<f:validateLength maximum="3" />
</h:inputText>
</h:panelGroup>
<h:panelGroup>
<h:outputLabel for="form1:cno" value="#{msg['cno']}:" />
<h:inputText id="cno" value="#{searchPmrBean.cno}" maxlength="3" size="3"
>
<f:validateLength maximum="3" />
</h:inputText>
<h:commandButton id="searchPmr" styleClass="button-blue"
value="#{msg['go']}" action="#{searchPmrBean.searchPmr}"/>
</h:panelGroup>
</h:panelGrid>
</h:form>