You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Brian Ross (JIRA)" <ta...@jakarta.apache.org> on 2006/06/27 20:58:29 UTC

[jira] Created: (TAPESTRY-994) component types unnecessary for annotations

component types unnecessary for annotations
-------------------------------------------

         Key: TAPESTRY-994
         URL: http://issues.apache.org/jira/browse/TAPESTRY-994
     Project: Tapestry
        Type: Improvement

  Components: Annotations  
    Versions: 4.0.2    
    Reporter: Brian Ross
    Priority: Minor


Why do I have to type @Component(type = "TextField") when the return type of the abstract method below it is TextField?  Can't this be inferred?  

-- 
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


[jira] Assigned: (TAPESTRY-994) component types unnecessary for annotations

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

Andreas Andreou reassigned TAPESTRY-994:
----------------------------------------

    Assignee: Andreas Andreou  (was: Jesse Kuhnert)

> component types unnecessary for annotations
> -------------------------------------------
>
>                 Key: TAPESTRY-994
>                 URL: http://issues.apache.org/jira/browse/TAPESTRY-994
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: Annotations
>    Affects Versions: 4.0.2
>            Reporter: Brian Ross
>         Assigned To: Andreas Andreou
>            Priority: Minor
>
> Why do I have to type @Component(type = "TextField") when the return type of the abstract method below it is TextField?  Can't this be inferred?  

-- 
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


[jira] Commented: (TAPESTRY-994) component types unnecessary for annotations

Posted by "Norbert Sándor (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-994?page=comments#action_12424533 ] 
            
Norbert Sándor commented on TAPESTRY-994:
-----------------------------------------

I think that handling the name of the method's return type as component type may be misleading...

> component types unnecessary for annotations
> -------------------------------------------
>
>                 Key: TAPESTRY-994
>                 URL: http://issues.apache.org/jira/browse/TAPESTRY-994
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: Annotations
>    Affects Versions: 4.0.2
>            Reporter: Brian Ross
>         Assigned To: Andreas Andreou
>            Priority: Minor
>
> Why do I have to type @Component(type = "TextField") when the return type of the abstract method below it is TextField?  Can't this be inferred?  

-- 
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


[jira] Commented: (TAPESTRY-994) component types unnecessary for annotations

Posted by "Brian Ross (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-994?page=comments#action_12424550 ] 
            
Brian Ross commented on TAPESTRY-994:
-------------------------------------

I agree.  We don't need to be that smart about this.  The default if no type annotation is specified is the return type of the method.  If there is a special case where this is not correct, then the type annotation will need to be specified in order to handle it.  It is no worse for the special cases than the current behavior and is better for the typical case.

> component types unnecessary for annotations
> -------------------------------------------
>
>                 Key: TAPESTRY-994
>                 URL: http://issues.apache.org/jira/browse/TAPESTRY-994
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: Annotations
>    Affects Versions: 4.0.2
>            Reporter: Brian Ross
>         Assigned To: Andreas Andreou
>            Priority: Minor
>
> Why do I have to type @Component(type = "TextField") when the return type of the abstract method below it is TextField?  Can't this be inferred?  

-- 
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


[jira] Commented: (TAPESTRY-994) component types unnecessary for annotations

Posted by "Andreas Andreou (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-994?page=comments#action_12424529 ] 
            
Andreas Andreou commented on TAPESTRY-994:
------------------------------------------

The type parameter of Component annotation is in fact necessary in some cases,
i.e. when the component name is different that the component classname (@If and class IfBean)
or when the component is part of a library (and thus needs a prefix)

However, i too believe that if type is left blank the framework should try to fill in the details...

> component types unnecessary for annotations
> -------------------------------------------
>
>                 Key: TAPESTRY-994
>                 URL: http://issues.apache.org/jira/browse/TAPESTRY-994
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: Annotations
>    Affects Versions: 4.0.2
>            Reporter: Brian Ross
>         Assigned To: Andreas Andreou
>            Priority: Minor
>
> Why do I have to type @Component(type = "TextField") when the return type of the abstract method below it is TextField?  Can't this be inferred?  

-- 
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


[jira] Assigned: (TAPESTRY-994) component types unnecessary for annotations

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

Jesse Kuhnert reassigned TAPESTRY-994:
--------------------------------------

    Assign To: Jesse Kuhnert

> component types unnecessary for annotations
> -------------------------------------------
>
>          Key: TAPESTRY-994
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-994
>      Project: Tapestry
>         Type: Improvement

>   Components: Annotations
>     Versions: 4.0.2
>     Reporter: Brian Ross
>     Assignee: Jesse Kuhnert
>     Priority: Minor

>
> Why do I have to type @Component(type = "TextField") when the return type of the abstract method below it is TextField?  Can't this be inferred?  

-- 
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


[jira] Commented: (TAPESTRY-994) component types unnecessary for annotations

Posted by "Norbert Sándor (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-994?page=comments#action_12424528 ] 
            
Norbert Sándor commented on TAPESTRY-994:
-----------------------------------------

I think it will not be appropriate because of how component libraries work: two components in two separate libraries can easily share the same Java class.

It may work in some cases (for example in case of framework components) but it would introduce the special handling of those components...

> component types unnecessary for annotations
> -------------------------------------------
>
>                 Key: TAPESTRY-994
>                 URL: http://issues.apache.org/jira/browse/TAPESTRY-994
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: Annotations
>    Affects Versions: 4.0.2
>            Reporter: Brian Ross
>         Assigned To: Andreas Andreou
>            Priority: Minor
>
> Why do I have to type @Component(type = "TextField") when the return type of the abstract method below it is TextField?  Can't this be inferred?  

-- 
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


[jira] Resolved: (TAPESTRY-994) component types unnecessary for annotations

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

Andreas Andreou resolved TAPESTRY-994.
--------------------------------------

    Fix Version/s: 4.1.1
       Resolution: Fixed

> component types unnecessary for annotations
> -------------------------------------------
>
>                 Key: TAPESTRY-994
>                 URL: http://issues.apache.org/jira/browse/TAPESTRY-994
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: Annotations
>    Affects Versions: 4.0.2
>            Reporter: Brian Ross
>         Assigned To: Andreas Andreou
>            Priority: Minor
>             Fix For: 4.1.1
>
>
> Why do I have to type @Component(type = "TextField") when the return type of the abstract method below it is TextField?  Can't this be inferred?  

-- 
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


[jira] Commented: (TAPESTRY-994) component types unnecessary for annotations

Posted by "Norbert Sándor (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-994?page=comments#action_12424531 ] 
            
Norbert Sándor commented on TAPESTRY-994:
-----------------------------------------

If the type parameter is missing then the framework can iterate through all components of the given namespace.
- if there is exactly 1 component with the given Java class then it should be used
- otherwise an exc. should be thrown

I'm not sure if this feature worth the effort...

> component types unnecessary for annotations
> -------------------------------------------
>
>                 Key: TAPESTRY-994
>                 URL: http://issues.apache.org/jira/browse/TAPESTRY-994
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: Annotations
>    Affects Versions: 4.0.2
>            Reporter: Brian Ross
>         Assigned To: Andreas Andreou
>            Priority: Minor
>
> Why do I have to type @Component(type = "TextField") when the return type of the abstract method below it is TextField?  Can't this be inferred?  

-- 
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


[jira] Commented: (TAPESTRY-994) component types unnecessary for annotations

Posted by "Andreas Andreou (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-994?page=comments#action_12424536 ] 
            
Andreas Andreou commented on TAPESTRY-994:
------------------------------------------

I don't think there's a list of the components of the framework or the included libraries
anywhere at the time this enhancement worker processes the annotation.
So, complete component guessing is out of the question anyway...
We're simply talking about having a nice default here - not a complete
discovery service...


> component types unnecessary for annotations
> -------------------------------------------
>
>                 Key: TAPESTRY-994
>                 URL: http://issues.apache.org/jira/browse/TAPESTRY-994
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: Annotations
>    Affects Versions: 4.0.2
>            Reporter: Brian Ross
>         Assigned To: Andreas Andreou
>            Priority: Minor
>
> Why do I have to type @Component(type = "TextField") when the return type of the abstract method below it is TextField?  Can't this be inferred?  

-- 
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


[jira] Commented: (TAPESTRY-994) component types unnecessary for annotations

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

Jesse Kuhnert commented on TAPESTRY-994:
----------------------------------------

Sounds reasonable to me.

> component types unnecessary for annotations
> -------------------------------------------
>
>          Key: TAPESTRY-994
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-994
>      Project: Tapestry
>         Type: Improvement

>   Components: Annotations
>     Versions: 4.0.2
>     Reporter: Brian Ross
>     Assignee: Jesse Kuhnert
>     Priority: Minor

>
> Why do I have to type @Component(type = "TextField") when the return type of the abstract method below it is TextField?  Can't this be inferred?  

-- 
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


[jira] Commented: (TAPESTRY-994) component types unnecessary for annotations

Posted by "Andreas Andreou (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-994?page=comments#action_12424530 ] 
            
Andreas Andreou commented on TAPESTRY-994:
------------------------------------------

I don't see any special handling...
If type is left blank, the framework fills it with method.returnType.simpleName
An exception would have been thrown anyway...


> component types unnecessary for annotations
> -------------------------------------------
>
>                 Key: TAPESTRY-994
>                 URL: http://issues.apache.org/jira/browse/TAPESTRY-994
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: Annotations
>    Affects Versions: 4.0.2
>            Reporter: Brian Ross
>         Assigned To: Andreas Andreou
>            Priority: Minor
>
> Why do I have to type @Component(type = "TextField") when the return type of the abstract method below it is TextField?  Can't this be inferred?  

-- 
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