You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Bertrand Delacretaz <bd...@apache.org> on 2014/01/08 11:58:07 UTC

YAMF - @Source annotation

Hi,

About https://cwiki.apache.org/confluence/display/SLING/YAMF+-+Yet+Another+Model+Factory

On Tue, Jan 7, 2014 at 5:24 PM, Justin Edelson (Confluence)
<co...@apache.org> wrote:>

>     // Ensure that "resource" is retrived from the bindings, not a request attribute
>     @Inject @Source("script-bindings")

IIUC @Source makes no sense without @Inject, so shouldn't that be

  @Inject(source="script-bindings")

?

-Bertrand

Re: YAMF - @Source annotation

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Wed, Jan 8, 2014 at 2:52 PM, Justin Edelson <ju...@justinedelson.com> wrote:
>>   @Inject(source="script-bindings")
...
> That's not how JSR-303 was defined...

Ah ok, I didn't realize you were using that - of course.

-Bertrand

Re: YAMF - @Source annotation

Posted by Justin Edelson <ju...@justinedelson.com>.
Hi,

On Wed, Jan 8, 2014 at 5:58 AM, Bertrand Delacretaz
<bd...@apache.org> wrote:
> Hi,
>
> About https://cwiki.apache.org/confluence/display/SLING/YAMF+-+Yet+Another+Model+Factory
>
> On Tue, Jan 7, 2014 at 5:24 PM, Justin Edelson (Confluence)
> <co...@apache.org> wrote:>
>
>>     // Ensure that "resource" is retrived from the bindings, not a request attribute
>>     @Inject @Source("script-bindings")
>
> IIUC @Source makes no sense without @Inject, so shouldn't that be
>
>   @Inject(source="script-bindings")
>
> ?

That's not how JSR-303 was defined.

Regards,
Justin

>
> -Bertrand