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>