Announcement Announcement Module
No announcement yet.
CompoundFormModel.createCompoundChild(...) Confusion/Usage Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • CompoundFormModel.createCompoundChild(...) Confusion/Usage


    I have another a quick question about CompoundFormModel.createCompoundChild. I am little confused about its usage, can you provide some brief example. I have following structure (simplified) and I am wondering if I need to use it,
    class BusinessUnits {
        List applications;
        List globalUsers;
    class GlobalUser  {
         String name;
         String account;
         List role;
    class Role {
         String name;
    Now to show selected BusinessUnit properties, I have BusinessUnitGeneralForm, BusinessUnitUsersForm, BusinessUnitApplicationsForm, and I am using NestingFormModel and TabbedDialogPage to add these forms dialog page.

    In BusinessUnitUsersForm I have a list of user and visually it is JList upper half of the Pane and has another JTabbedPane to show selected User's properties. Do I need createCompoundChild to for this User's properties, I mean another NestingFormModel and TabbedDialogPage.?

    Sorry If it didn't sound like quick question.


  • #2


    • #3
      I don't believe you need a NestingFormModel like a instanceof CompoundFormModel for this; typically you use a compound form model when you have several -- perhaps many-- individual edits accross a number of pages and want to commit those edits as a group at the same time ... in other words, logically the pages make up a single "compound form" backing a single logical edit transaction.

      I think what you need in this case is simply another form model; for editing a user object. And you need local commit buttons on that page for editing a selected user, and a mechanism to set the backing form object when the selection changes. This would not require use of CompoundFormModel. You just need to have it when you select a User in your list that the user form model domain object is updated; Ollie and have discussed adding out-of-the-box support for this via a "IndexAdapter" for linking a object of a collection to the ValueModel interface, but we haven't yet implemented it. I think this would be a valuable enhancement.