Hm, dunno, does not look filterish to me. But you are right, maybe...

Is there a good reason why it is not recommended to pass a service to
a view component?
This would be by far the easyest solution.
I remember, a long time ago, I read, that purely the controller should
have access to the service/data layer, but I wonder if this is not
just a dogma...

On Mon, Dec 8, 2008 at 8:51 PM, Colin Ramsay <[EMAIL PROTECTED]> wrote:
>
> A filter?
>
> On Mon, Dec 8, 2008 at 10:44 PM, Jan Limpens <[EMAIL PROTECTED]> wrote:
>>
>> Hello,
>>
>> for MR
>> on a project, I have a BaseController and on it's Initialize method, I
>> used to pull some data I used on every page. That was nice for a
>> while, but recently I started to return a lot of Json and of course
>> base.Initialize fires and does a lot of stuff that has nothing to do
>> with the json requests.
>>
>> Now, I could separate json and layout methods via different
>> controllers, but this would lead to a lot of code repetition. I would
>> like to avoid to have a AddressController and another
>> AddressJSONController because they shared too much and I could not
>> even use inheritance.
>>
>> Now I *could* grab this data only when there is Layout. Is there some
>> kind of hook, I can use to put the data into the propertybag based on
>> this assumption? This would have to happen after the Action completed,
>> but before data is passed to the view engine. Is there something?
>>
>> --
>> Jan
>>
>> >
>>
>
> >
>



-- 
Jan

--~--~---------~--~----~------------~-------~--~----~
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