Chris,
this
is generell in JSF (see [Bergsten] )
the
component tree does not know a component with ID=rayon,
when I
comes first to <x:message/>.
-Matthias
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 18, 2004 9:10 AM
To: MyFaces Discussion
Subject: x:message tag
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 18, 2004 9:10 AM
To: MyFaces Discussion
Subject: x:message tag
Hi there,
I played around with the messages tag. I realised, that it is not possible to set a x:message tag
before the input tag which it is referencing to. Like this:
<x:message for="" detailFormat="*" styleClass="ErrorText" />
<h:inputText id="rayon" styleClass="FieldForm NormalText TextLeftAlign" value="#{WVSForm.a_WVSObject.a_Rayon}">
<f:validateLongRange minimum="0" maximum="9999"/>
</h:inputText>
Error: Can't find Component"rayon"
It works if I set the x:message tag after the input tag:
<h:inputText id="rayon" styleClass="FieldForm NormalText TextLeftAlign" value="#{WVSForm.a_WVSObject.a_Rayon}">
<f:validateLongRange minimum="0" maximum="9999"/>
</h:inputText>
<x:message for="" detailFormat="*" styleClass="ErrorText" />
But on the other hand, in the x:dataTable it doesen't matter. both
<h:column >
<x:message for="" detailFormat="*" styleClass="ErrorText" />
<h:inputText id="skunbr" value="#{sku.a_Skunbr}" required="true" >
<f:validateLength minimum="8" maximum="8" />
</h:inputText>
</h:column>
and
<h:column >
<h:inputText id="skunbr" value="#{sku.a_Skunbr}" required="true" >
<f:validateLength minimum="8" maximum="8" />
</h:inputText>
<x:message for="" detailFormat="*" styleClass="ErrorText" />
</h:column>
work perfectly.
Now my question is: Is this correct or is this a remaining bug?
greetz,
Chris
