CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Forum has moved

New location: CSLA .NET forum


CSLA .NET Resources:
  • CSLA .NET forum
  • CSLA .NET home page
  • MVC4 Binding an object which has a property of type BusinessListBase

    rated by 0 users
    Not Answered This post has 0 verified answers | 0 Replies | 1 Follower

    Not Ranked
    1 Posts
    dsburny posted on Fri, Jun 7 2013 6:19 AM

    Hi

    I have a viewmodel set up which is of type object1. Object1 has some properties, one of which is another object(object2) of type BusinessListBase. Currently when I submit my form using defaultModelBinder, object2 always has count = 0.

    Is the only way to bind the list to use FormCollection as below from the using csla ebook:

    public ActionResult EditList(FormCollection collection) { var list = RoleEditList.GetRoles(); UpdateModel(list, collection); SaveObject(list, false); return View(); }

    If so, how does UpdateModel map the keys to the listitems, as the key does not exactly match, and it doesn't seem to do anything in my code?

    Thanks

     

    Page 1 of 1 (1 items) | RSS

    Copyright (c) 2006-2014 Marimer LLC. All rights reserved.
    Email admin@lhotka.net for support.
    Powered by Community Server (Non-Commercial Edition), by Telligent Systems