Hello,


On Wed, 12 Apr 2006, Mike Kienenberger wrote:

[...]

As of JSF 1.1, there is not another way to do this.   JSF 1.2 will
support a requiredMessage attribute on UIComponents.

If you'd like to submit a patch to allow Tomahawk components to
support a requiredMessage value, we're interested in one.   Tomahawk
validators already support a "message" attribute, but this won't help
for the required attribute on components.


Ok, I'll will try to take some time for this and check the sources ...


You should be able to make the OptionalValidationFramework work for
this situation, but there are probably better ways to do it.



I've tried out the example on your Wiki-Page:

http://wiki.apache.org/myfaces/OptionalValidationFramework

Here is my Code:

[...]
<h:form id="updateAddressForm">
 <jsfcomp:submittedValueCollectorWalker/>
[...]
<h:inputText value="#{addressListBean.activeAddress.lastname}"
  id="lastname">
  <jsfcomp:optionalValidator 
delegateValidatorId="net.sf.jsfcomp.validator.RequiredValidator"/>
  <jsfcomp:optionalValidator id="lastnameValidator">
      <AddressValidator/>
  </jsfcomp:optionalValidator>
</h:inputText>
[...]
<h:commandLink action="#{addressListBean.updateAddress}">
     <h:outputText value=">> Daten speichern" />
     <f:param name="NET_SF_JSFC_OPT_VDTR_MODE" value="soft"/>
</h:commandLink>
[...]
<jsfcomp:optionalValidatorWrappingRequiredValidatorChecker/>
</h:form>
[...]


AddressValidator is the Id of my validatorclass.

When I execute this, following Exception was thrown:

[...]
javax.servlet.ServletException: /personaldata/pd_update_address.jsp(317,13) Attribute delegateValidatorId invalid for tag optionalValidator according to TLD
javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
[...]

I tried this under Myfaces 1.1.1 and 1.1.2 with the same result.

Can you give me an working example?


Thanks
Joerg


Reply via email to