Results 1 to 3 of 3

Thread: CompoundFormModel.createCompoundChild(...) Confusion/Usage

  1. #1
    Join Date
    Aug 2004
    Location
    Northridge, CA
    Posts
    151

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

    Ollie,

    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,
    Code:
    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.

    Amad

  2. #2
    Join Date
    Aug 2004
    Location
    Northridge, CA
    Posts
    151

    Default

    Anyone???

  3. #3
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •