Announcement Announcement Module
No announcement yet.
Master/Detail as subform not updating domain object Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Master/Detail as subform not updating domain object

    i have a problem with my master/detail implementation when i use it as kind of a subform ( i'm not sure if its really the usage as a subform but i didnt know how to describe it better )

    I have my domain object ( Rechnung ) which basically has some simple attributes like string / integers and a Collection (a Set) of a more complex other domain class ( Rechart )

    Now i have a View where i have a Table displaying all Rechnung Objects from my Database and a PropertiesDialog to edit these Data and to add more.

    I wanted to the Set to be editable in a master/detail kind of way. And it works partially, i can add and edit the entries from the master table and the view refreshes correspondingly.. but when i commit the "global" ( Rechnung ) Form the underlying Set of Objects hasnt changed.

    i instantiate my master form like this
    RechartMasterForm master = new RechartMasterForm(FormModelHelper.createCompoundFormModel(((Rechnung)getFormModel().getFormObject())), "recharts", "rechartdetail", Rechart.class, artcontroller);
    then i simply add it to the "global" form
    and thats where i suppose the failure is because the master isnt really a subform of the "global" form( but when i use the addChildForm-Method i get an error saying that my DetailForm already has a parent.. ).

    to resume i have an domain object which has a Collection of another domain object which i want to be edited in a master/detail in the form of the "parent"-domain object but the editing of the set in the master/detail form ( which works ) is not saved (back ) in the original domain object where it belongs to.

    Does anyone has an idea what i have to do to have the changes take in effect?

    I hope you unterstood what my problem is....
    if you need the sourcecode or screenshots i can add more of it but i didnt want the post to be too long ...

    thanks in advance


  • #2
    i added some of the sourcecode in the attachment