[ 
https://issues.apache.org/jira/browse/WICKET-5482?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13888828#comment-13888828
 ] 

Ilia Naryzhny commented on WICKET-5482:
---------------------------------------

According to google guice code it doesn't matter which particular annotation 
was used - either @javax.inject.Named or @com.google.inject.name.Named. You can 
take a look com.google.inject.internal.Annotations.canonicalizeIfNamed.

But if you want explicetly test that with Named binding , I think, you can use 
this:

@Provides
@javax.inject.Named("mystring")
public String provideMyString()
{
    return "this is my string";
}

> Wicket-guice doesn't support @javax.inject.Named annotations
> ------------------------------------------------------------
>
>                 Key: WICKET-5482
>                 URL: https://issues.apache.org/jira/browse/WICKET-5482
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-guice
>    Affects Versions: 6.13.0
>            Reporter: Ilia Naryzhny
>              Labels: injection
>         Attachments: WICKET-5482.patch
>
>
> Following annotations in wicket commponent have not been supported now:
> @Inject
> @Named("myproperty")
> private String myproperty;
> And instead of throwing exception, wicket-guice just substitute "" for String 
> fields. And that is making debuging of problems quite difficult task.
> The problem, from my point of view, lies in 
> org.apache.wicket.guice.GuiceFieldValueFactory.findBindingAnnotation(); or 
> can be fixed one level up 
> (org.apache.wicket.guice.GuiceFieldValueFactory.getFieldValue())



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to