Yup. I am not making any changes in this area. If Helpers are specified, they will be
propertly configured (with Controller) and made available as usual. It will just be a
personal decision to use a pure Helper or just call Hepler classes directly. Although, having
Views represented by classes is a bit contrary to MonoRail MVC, it does offer some
interesting possibilities.
e.g. It seems to be a common practice (at least web team at last project) to assign well defined
classes are dynamically created and therefore Controllers don't have access. It might be nice to
be able to something like this in a Controller as an alternative to setting the PropertyBag.
public void List()
{
RenderView("List", new InitializeViewDelegate(AssignOrders));
}
private void AssignOrders(Object view)
{
IList orders = ObtainOrders(...);
((IOrderContainer)view).Orders = orders;
}
with 2.0 event nicer
public void List()
{
IList orders = ObtainOrders(...);
RenderView("List", delegate(IOrderContainer view)
{
view.Orders = orders;
}
}
MonoRail is an enabling technology so it would be nice to enabled the best
features of views.
craig
On 6/13/06, hammett <[EMAIL PROTECTED]> wrote:
On 6/13/06, Craig Neuwirt <[EMAIL PROTECTED]> wrote:
> The WebFormsViewEngine does not inject the helpers like it does the
> PropretyBag. As a result, you have to become IControllerAware and
> access the Helpers dictionary from the Controller. You need to know the
> name and type and cast accordingly which is not very type safe. Creating
> and invoking the helpers directly seems more natural in Page class.
It is. But a way to access helper is not enforced right? There is a
small protocol, though, some helpers need a reference to the
controller. As long as you respect that, you'd be in good shape.
--
Cheers,
hammett
http://hammett.castleproject.org/
_______________________________________________
CastleProject-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/castleproject-users
_______________________________________________ CastleProject-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/castleproject-users
