@Thiago - Tried using null instead of "none" and it gave the error 
"Parameter validatorType was null or contained only whitespace".

@Robert - thanks for the code.  It worked great.  

I've pasted my code below....but I am having to have a separate getValidator
method for each of my components since the createValidator() method requires
a 'Field'.  Not sure if there is a generic way to do this.
 

private FieldValidator noopValidator = new FieldValidator() { 
                public boolean isRequired() {return false;} 
                public void render(MarkupWriter writer) {} 
                public void validate(Object value) {} 
        };
        
        
        public FieldValidator getNameValidator() {
        return getValidator("name");
        }
        
        public FieldValidator getCampaignIdValidator() {
        return getValidator("campaignId");
        }
        
        public FieldValidator getAdvertiserIdValidator() {
        return getValidator("advertiserId");
        }
        
        public FieldValidator getValidator(String componentId) {
        if(programsGroup.getPrograms().size() == 1) {
                Field f = (Field)
componentResources.getEmbeddedComponent(componentId);
                return fieldValidatorSource.createValidator(f, "required", 
null);
        }
        return noopValidator;
        }


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/how-to-dynamically-turn-t-validate-off-tp4536095p4536543.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to