Hello thanks for your help.
But i try to use my validator and is doesn't work, my seam
bean is ok.
here my validator test code:


@Name("validatorvf")
@Scope(ScopeType.SESSION)
public class ValidatorVentilFactBean implements
Serializable{
        private static final Log log =
LogFactory.getLog(ValidatorVentilFactBean.class);
        private static final long serialVersionUID = 1L;

        public void validateRatachement(FacesContext context,
UIComponent component, Object value){
                log.warn(value);
                log.warn("validator pris!");
                
                String test = (String) value;
                if (test.equals("auto")) {
                     // do nothing as the given string is well-formed
                     return;
                }
                FacesMessage message = new FacesMessage(
                    FacesMessage.SEVERITY_ERROR, "taper auto",
                    null);
                throw new ValidatorException(message);
        }
}


And i declare it in my widget:


      <widget name="ratnumdeuxceate" type="text">
        <labels>
          <label mode="any">Rattachement 2</label>
        </labels>
        <translated>false</translated>
        <fields>
          <field>rat:numcptociideux</field>
        </fields>
        <properties mode="edit">
          <property name="required">true</property>
          <property
name="validator">#{validatorvf.validateRatachement}</property>
        </properties>
      </widget>


So i can see my seam bean is register by Nuxeo.
But i can't see my log test or my error message.

Have you a proposion about that?
Best Regards,
moise


---
Mailing list: [email protected]
Forum: http://forum.nuxeo.org/f/1/

Reply via email to