You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Steve Jones (JIRA)" <ji...@apache.org> on 2011/03/16 23:55:30 UTC

[jira] Created: (WICKET-3542) Support for JSR 330 annotations (@Inject, @Named)

Support for JSR 330 annotations (@Inject, @Named)
-------------------------------------------------

                 Key: WICKET-3542
                 URL: https://issues.apache.org/jira/browse/WICKET-3542
             Project: Wicket
          Issue Type: Improvement
          Components: wicket-spring
            Reporter: Steve Jones


Currently wicket supports injection of dependencies using the SpringBean annotation. It would be nice to have an option to use JSR 330 annotations instead.

Not much would need to change for this, just some changes in AnnotProxyFieldValueFactory.

The SpringBean annotation would map directly to Inject and the "name" value could map to the Named annotation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Issue Comment Edited: (WICKET-3542) Support for JSR 330 annotations (@Inject, @Named)

Posted by "Bruno Borges (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13007808#comment-13007808 ] 

Bruno Borges edited comment on WICKET-3542 at 3/17/11 4:47 AM:
---------------------------------------------------------------

Yes, we recently had a discussion about this:

http://apache-wicket.1842946.n4.nabble.com/Spring-Annotations-supoprt-for-IoC-on-WebPages-td3320087.html

And I agree with *not* allowing that.

Although, I would consider renaming @SpringBean to something else that could easily fit with CDI / Spring / Guice

@WicketInject perhaps.

And the IoC could be switched at WicketApplication class without complication (I think). It is not usual, and probably not recommended to have more than one IoC anyway.

      was (Author: bruno.borges):
    Yes, we recently had a discussion about this:

http://apache-wicket.1842946.n4.nabble.com/Spring-Annotations-supoprt-for-IoC-on-WebPages-td3320087.html
  
> Support for JSR 330 annotations (@Inject, @Named)
> -------------------------------------------------
>
>                 Key: WICKET-3542
>                 URL: https://issues.apache.org/jira/browse/WICKET-3542
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-spring
>            Reporter: Steve Jones
>         Attachments: WICKET-3542.patch
>
>
> Currently wicket supports injection of dependencies using the SpringBean annotation. It would be nice to have an option to use JSR 330 annotations instead.
> Not much would need to change for this, just some changes in AnnotProxyFieldValueFactory.
> The SpringBean annotation would map directly to Inject and the "name" value could map to the Named annotation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (WICKET-3542) Support for JSR 330 annotations (@Inject, @Named)

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13007727#comment-13007727 ] 

Igor Vaynberg commented on WICKET-3542:
---------------------------------------

this may be a dangerous thing, using a custom annotation has its advantages.

for example, if we use the standard @Inject and the spring project is using aspect then wicket components will be instrumented by aspectj instead of wicket. obviously, this is undesirable. users will have to add exclusions into their package-scanning config, etc.

> Support for JSR 330 annotations (@Inject, @Named)
> -------------------------------------------------
>
>                 Key: WICKET-3542
>                 URL: https://issues.apache.org/jira/browse/WICKET-3542
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-spring
>            Reporter: Steve Jones
>         Attachments: WICKET-3542.patch
>
>
> Currently wicket supports injection of dependencies using the SpringBean annotation. It would be nice to have an option to use JSR 330 annotations instead.
> Not much would need to change for this, just some changes in AnnotProxyFieldValueFactory.
> The SpringBean annotation would map directly to Inject and the "name" value could map to the Named annotation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (WICKET-3542) Support for JSR 330 annotations (@Inject, @Named)

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13007720#comment-13007720 ] 

Martin Grigorov commented on WICKET-3542:
-----------------------------------------

Patch is welcome.
Can be applied to Guice as well.
Don't drop support for @SpringBean and Guice's Inject - there are people relying on them.

> Support for JSR 330 annotations (@Inject, @Named)
> -------------------------------------------------
>
>                 Key: WICKET-3542
>                 URL: https://issues.apache.org/jira/browse/WICKET-3542
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-spring
>            Reporter: Steve Jones
>         Attachments: WICKET-3542.patch
>
>
> Currently wicket supports injection of dependencies using the SpringBean annotation. It would be nice to have an option to use JSR 330 annotations instead.
> Not much would need to change for this, just some changes in AnnotProxyFieldValueFactory.
> The SpringBean annotation would map directly to Inject and the "name" value could map to the Named annotation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (WICKET-3542) Support for JSR 330 annotations (@Inject, @Named)

Posted by "Steve Jones (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Jones updated WICKET-3542:
--------------------------------

    Attachment: WICKET-3542.patch

Updated wicket files that implement this functionality (obviously it would be cleaner to make changes to the existing files rather than largely duplicating them)

> Support for JSR 330 annotations (@Inject, @Named)
> -------------------------------------------------
>
>                 Key: WICKET-3542
>                 URL: https://issues.apache.org/jira/browse/WICKET-3542
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-spring
>            Reporter: Steve Jones
>         Attachments: WICKET-3542.patch
>
>
> Currently wicket supports injection of dependencies using the SpringBean annotation. It would be nice to have an option to use JSR 330 annotations instead.
> Not much would need to change for this, just some changes in AnnotProxyFieldValueFactory.
> The SpringBean annotation would map directly to Inject and the "name" value could map to the Named annotation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (WICKET-3542) Support for JSR 330 annotations (@Inject, @Named)

Posted by "Martin Grigorov (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-3542.
-------------------------------------

    Resolution: Duplicate

Implemented with WICKET-4307 in Wicket 6.0
                
> Support for JSR 330 annotations (@Inject, @Named)
> -------------------------------------------------
>
>                 Key: WICKET-3542
>                 URL: https://issues.apache.org/jira/browse/WICKET-3542
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-spring
>            Reporter: Steve Jones
>         Attachments: WICKET-3542.patch
>
>
> Currently wicket supports injection of dependencies using the SpringBean annotation. It would be nice to have an option to use JSR 330 annotations instead.
> Not much would need to change for this, just some changes in AnnotProxyFieldValueFactory.
> The SpringBean annotation would map directly to Inject and the "name" value could map to the Named annotation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WICKET-3542) Support for JSR 330 annotations (@Inject, @Named)

Posted by "Bruno Borges (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13007808#comment-13007808 ] 

Bruno Borges commented on WICKET-3542:
--------------------------------------

Yes, we recently had a discussion about this:

http://apache-wicket.1842946.n4.nabble.com/Spring-Annotations-supoprt-for-IoC-on-WebPages-td3320087.html

> Support for JSR 330 annotations (@Inject, @Named)
> -------------------------------------------------
>
>                 Key: WICKET-3542
>                 URL: https://issues.apache.org/jira/browse/WICKET-3542
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-spring
>            Reporter: Steve Jones
>         Attachments: WICKET-3542.patch
>
>
> Currently wicket supports injection of dependencies using the SpringBean annotation. It would be nice to have an option to use JSR 330 annotations instead.
> Not much would need to change for this, just some changes in AnnotProxyFieldValueFactory.
> The SpringBean annotation would map directly to Inject and the "name" value could map to the Named annotation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira