[ 
https://jira.codehaus.org/browse/JBEHAVE-541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=271134#comment-271134
 ] 

Mauro Talevi commented on JBEHAVE-541:
--------------------------------------

What are the usecases you are trying to address? 

What one may do is to define an interface MetaEnabled that steps classes can 
optionally implement and the current Meta can be passed on to the instance (ah 
the good ol' Avalon days are coming back). 

You can't have any parsed data (including Meta) injected into the constructors 
of the steps classes without doing very complicated back flipping and throwing 
IoC out the window.


> Meta tags (and other things) injectable into components
> -------------------------------------------------------
>
>                 Key: JBEHAVE-541
>                 URL: https://jira.codehaus.org/browse/JBEHAVE-541
>             Project: JBehave
>          Issue Type: New Feature
>          Components: Guice Support, Pico Support, Spring Support
>            Reporter: Paul Hammant
>
> Meta tags can be injected into step methods.  They can't be injected into 
> step-pojo constructors, nor in any capacity to components that are themselves 
> injectable into step-pojo constructors.
> Workaround people have to do: accept the meta-tag into the step-pojo's step 
> method and hand it to wherever needs.  
> In our particular case, Page objects are being made by a DI container, and it 
> would be better separation of concerns to have meta tags injected where they 
> are needed, and not in the steps class (which only passes them on).
> The senior developer in question wishes, in lieu of something better, that 
> StoryRunner.RunContext.Meta was statically available (on a thread local) and 
> that page objects could pull it when they need it.  That's a breach of IoC of 
> course, but you get why he wishes for it.

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

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to