5 Replies Latest reply on Jan 18, 2007 10:35 AM by Joao Viragine

    s:validate and facelets tag (source) file

    Pete Muir Master

      Hi

      I'm just experimenting with the <s:validate> validator component provided as part of the seam-ui library. The code checks to see that a valid value attribute by looking for a value attribute of

      {model.field}


      and determines the model from that by stripping off the .field part.

      My problem is that I've passed the value to the tag source file as a atttribute e.g.

      test-tag.xhtml
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:s="http://jboss.com/products/seam/taglib"
       >
       <h:inputText value="#{value}">
       <s:validate />
       </h:inputText>
      </ui:composition>
      


      test.xhtml
      ...
      <my:test-tag value="#{model.field}" />
      ...
      


      which causes the <s:validate> to throw a runtime exception as the attribute is not an value binding.

      Anyone had a similar problem; any suggestions on how to get this to work?

      Peter