Wrox Programmer Forums
|
BOOK: Professional ASP.NET MVC 1.0 ISBN: 978-0-470-38461-9
This is the forum to discuss the Wrox book Professional ASP.NET MVC 1.0 by Rob Conery, Scott Hanselman, Phil Haack, Scott Guthrie; ISBN: 978-0-470-38461-9
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET MVC 1.0 ISBN: 978-0-470-38461-9 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 23rd, 2010, 11:33 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Question MVC Related collection help needed

Hi All,
I have been huge fan of p2p wrox for many years and have found and contributed to many solutions over the years, but some time ago.

I am now in need of further assistance and of cource wrox is the first place i would go.
It appears the site is more book focused now and I dont have the MVC book of this thread.
I am also using MVC 2.

I feel my question is quite stupid, but I cant get my head around it.

I have an entity 'Person' wheich inherits derectly from a generic entity called 'Entity'
this shouldn't have any effect but I mention for clarity.

The person object has a detail page that has its own detail plus a collection of ajax links that populate an area reserved for the related entities of a person.
eg. Clicking the Notes tab populate an area with a list of notes for that person.
ie. via
Code:
 
Ajax.ActionLink("Notes", "Notes", new AjaxOptions { UpdateTargetId = "dataContainer", InsertionMode = InsertionMode.Replace })
That shows a list of notes for that person nicely.

ahead of that list I have an 'Add Note' link which is intended to add another note to Person's Note collection.

How do I bind the new note form to add a note and as well assign it to the Person it is being applied to.

I either end up with a person view that does't know about its notes or a notes view that has no person attached.

the schema is

Person
blah

Note
Blah

PersonNote
PersonGuid
NoteGuid

You know the bottom line is I dont even know what to ask???

Can anyone give me some direction as to the best practice to add a Note to a Person onone page.
It has to be done in partial views so I can display the notes below the Person.
If a new note is added, I want it added to a partial view below the Person data display.

Any advise would be greatly appreciated.

Thanks for all the support I have gained from wrox over the years.
Appologetic for my abesnce in the last few years.
I bet peter lanoi and Imar spanjeers are still assisting us noobs.

I'd love a relavant link.

Many Thanks,
Rod

P.S.
using nhibernate.
Code:
<bagname="Notes"table="AT_NAR_PersonNote"lazy="false" >
<keycolumn="PersonGUID"></key>
<many-to-manyclass="AgileThought.ERP.Domain.Common.Note"column="NoteGUID">
</many-to-many>
</bag>
__________________
======================================
"They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad."
--Shakespeare
======================================

Last edited by rodmcleay; March 23rd, 2010 at 12:27 PM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
MVC tedr BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 4 February 5th, 2010 11:43 AM
TheBeerHouse MVC preview ASP.NET MVC Website Programming Problem Design Solution jminatel BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 5 July 18th, 2009 09:16 AM
Ready for TheBeerHouse MVC? jminatel BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 May 29th, 2009 01:31 PM
mvc datta123 Struts 1 October 26th, 2006 11:00 AM
MVC in j2ee and struts suresh_j2ee Servlets 2 December 29th, 2004 05:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.