You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Scott Walter (JIRA)" <ta...@jakarta.apache.org> on 2005/07/05 16:35:11 UTC

[jira] Created: (TAPESTRY-375) Provide easier way to get access to the validators from a Delegate

Provide easier way to get access to the validators from a Delegate
------------------------------------------------------------------

         Key: TAPESTRY-375
         URL: http://issues.apache.org/jira/browse/TAPESTRY-375
     Project: Tapestry
        Type: Improvement
  Components: Framework  
    Versions: 4.0    
    Reporter: Scott Walter


Using the new validation framework to get a handle to the validators from a Delegate requires coding this:
        ValidatorsBinding vb = (ValidatorsBinding) component.getBinding("validators");        
        Collection collection = (Collection) vb.getObject();
        for(Iterator it = collection.iterator();it.hasNext();){
            Validator validatorObject = (Validator) it.next();
        }

Could a helper method be provided such as?:  Collection getValidators(Component component)

Also is there a constant for the "validators" binding? In case the name changes in the future.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Resolved: (TAPESTRY-375) Provide easier way to get access to the validators from a Delegate

Posted by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-375?page=all ]

Jesse Kuhnert resolved TAPESTRY-375.
------------------------------------

    Resolution: Invalid

I believe the fix exists already, perhaps it's just not documented as clearly. You want to use the "ValueConverter" service as in:

protected Iterator getValidatorsIterator(ValidatableField component)
    {
        return (Iterator) _converter.coerceValue(component.getValidators(), Iterator.class);
    }

> Provide easier way to get access to the validators from a Delegate
> ------------------------------------------------------------------
>
>                 Key: TAPESTRY-375
>                 URL: http://issues.apache.org/jira/browse/TAPESTRY-375
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: 4.0
>            Reporter: Scott Walter
>
> Using the new validation framework to get a handle to the validators from a Delegate requires coding this:
>         ValidatorsBinding vb = (ValidatorsBinding) component.getBinding("validators");        
>         Collection collection = (Collection) vb.getObject();
>         for(Iterator it = collection.iterator();it.hasNext();){
>             Validator validatorObject = (Validator) it.next();
>         }
> Could a helper method be provided such as?:  Collection getValidators(Component component)
> Also is there a constant for the "validators" binding? In case the name changes in the future.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org