New Posts New Posts RSS Feed: How do I add a VM property?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

How do I add a VM property?

 Post Reply Post Reply
Author
pponzano View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Apr-2011
Location: Italy
Posts: 165
Post Options Post Options   Quote pponzano Quote  Post ReplyReply Direct Link To This Post Topic: How do I add a VM property?
    Posted: 09-Jan-2012 at 1:09am
Hello,
I've a complex type mapped from a store, I need to have an IsItemBusy property for my View purpose (need to set @ true a busyindicator) how can I achieve this?

the only thing that came to my mind was creating an object that has all the properties of the one returned from DB plus this other one...

Thanks
Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 09-Jan-2012 at 6:31pm
Hi Paolo,

If you've mapped your ComplexType in your model, then DevForce should have generated its class as well. You don't need to create the class manually. Your complex type class will inherit from IdeaBlade.EntityModel.ComplexObject.

Since DevForce generates the class partially, you can define the IsItemBusy property inside your own partial class and expose it to your View.

You can read the following write-up for further info. http://drc.ideablade.com/xwiki/bin/view/Documentation/model-complextype
Back to Top
pponzano View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Apr-2011
Location: Italy
Posts: 165
Post Options Post Options   Quote pponzano Quote  Post ReplyReply Direct Link To This Post Posted: 10-Jan-2012 at 5:48am
Perfect! Thanks a lot, you saved me from writing a shave-of-code with the ResultComplexObject as a parameter for my viewmodel!
Thanks
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down