Let me try this again. :)

Has anyone created a reusable view component that uses a VM file?

When you did so, where did you put that VM file? Did you put it where
MR looks for it by default -- in the views/components/componentname/
directory of the site that uses the view component? Or did you put the
VM file in the same assembly as the view component and use it from
there?


Thanks!

--Stuart

On Wed, Jun 10, 2009 at 5:52 PM, Stuart<[email protected]> wrote:
>
> Greetings All --
>
> I'm feeling silly, but I'm having difficulty finding a 'standard way'
> of having my VM file in the same assembly as my view component. When I
> look at Contrib, for example, there is an assembly where all the view
> components are implemented, but the the view for each component is
> specified in the TestSite project. To me this seems like a bad idea --
> wouldn't I prefer to have my VM file in the same assembly as the view
> component? Isn't that an implementation detail? Shouldn't the assembly
> providing the view component encapsulate the view template?
>
> So I guess I have two questions...
>  1) Shouldn't I provide a default VM file for my view component
> inside the assembly where the view component is declared?
>  2) If I should, what is the proper way of rendering it? Do I
> override the Render method on my ViewComponent?
>
>
> Thanks,
>
> --Stuart
> >
>

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