Patrick,

Not sure if this will work (i can only try it on Monday), so please
report back,
Eg.
public class MyHelper : AbstractHelper, IServiceEnabledComponent
        {
                private IEngineContext engineContext;

                public void Service(IServiceProvider provider)
                {
                        engineContext =
(IEngineContext)provider.GetService(typeof(IEngineContext));
                }
        }

The other option is to use this static method:
IEngineContext engineContext =
EngineContextLocator.Instance.LocateCurrentContext()


Cheers
John

On Feb 13, 1:58 am, Patrick McEvoy <[email protected]> wrote:
> I see this has already kinda been brought up, without solution...
>
> http://groups.google.com/group/castle-project-users/browse_thread/thr...
>
> Something isn't right here?!
>
> Cheers P
>
> On Feb 12, 2:36 pm, Patrick McEvoy <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi all,
>
> > When doing something like this in a custom helper, where in the life
> > cycle is the ControllerContext populated?
>
> > FormHelper fh = (FormHelper)ControllerContext.Helpers["FormHelper"];
>
> > After looking at the DefaultHelperFactory I wondered if this ctor
> > would give me access straight away, but it doesn't get substantiated
> > with this ctor from the HelperAttribute.
>
> > public DynamicFormBuilderHelper (IEngineContext engineContext) : base
> > (engineContext)
>
> > What is the proper way to access built in helpers (that require
> > context) in custom helpers?
>
> > Cheers P

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to