• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Display Group Component Editing Issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Display Group Component Editing Issue


  • Subject: Display Group Component Editing Issue
  • From: Jim Murry <email@hidden>
  • Date: Thu, 15 Mar 2007 16:37:37 -0700

Hi,

I am new to WO and I am trying to create a new "Display Group Component" or "Display Group Application".  It is created okay and it displays correctly in Safari,  I can select the items that are listed in the repeat field, but if I edit any of the items it always changes the first item in the repeat list.  Any help would be appreciated.

WOD listing

SelectionList: WORepetition {item = user; list = userDisplayGroup.displayedObjects; };
SelectObjectLink: WOHyperlink {action = "" };
ObjectIdentifier: WOString {value = user.username; };
ModificationForm: WOForm {multipleSubmit = true; };

usernameField: WOTextField {value = userDisplayGroup.selectedObject.username;  };
firstnameField: WOTextField {value = userDisplayGroup.selectedObject.firstname;  };
lastnameField: WOTextField {value = userDisplayGroup.selectedObject.lastname;  };


InsertActiveImage: WOImageButton {action = "" filename = "DBWizardInsert.gif"; };
UpdateActiveImage: WOImageButton {action = "" filename = "DBWizardUpdate.gif"; };
DeleteActiveImage: WOImageButton {action = "" filename = "DBWizardDelete.gif"; };

WOO listing

{
    "WebObjects Release" = "WebObjects 5.2"; 
    variables = {
        "userDisplayGroup" = {
            class = WODisplayGroup; 
            dataSource = {
                class = EODatabaseDataSource; 
                editingContext = "session.defaultEditingContext"; 
                fetchSpecification = {
                    class = EOFetchSpecification; 
                    entityName = User; 
                    fetchLimit = 0; 
                    isDeep = YES; 
                }; 
            }; 
            fetchesOnLoad = YES; 
            formatForLikeQualifier = "%@*"; 
            localKeys = (); 
            numberOfObjectsPerBatch = 0; 
            selectsFirstObjectAfterFetch = YES; 
        }; 
    }; 
}


JAVA listing


// Generated by the WebObjects Assistant Wed Mar 14 12:54:33 US/Pacific 2007

import com.webobjects.foundation.*;
import com.webobjects.appserver.*;
import com.webobjects.eocontrol.*;
import com.webobjects.eoaccess.*;

public class temp extends WOComponent {

    /** @TypeInfo User */
    protected EOEnterpriseObject user;
    // This WODisplayGroup is initialized from the .woo archive in the component's constructor method
    protected WODisplayGroup userDisplayGroup;

    public temp(WOContext context) {
        super(context);
    }

    public void selectObject() {
        userDisplayGroup.selectObject(user);
    }

    public void saveChanges() throws Exception {
        try {
            this.session().defaultEditingContext().saveChanges();
        } catch (Exception exception) {
            // An error occurred during the save. You could present an error page which
            // explains the reason for the save failure.
            // The default is to raise an exception which presents a diagnostic page.
            NSLog.err.appendln("Cannot save changes ");
            throw exception;
        }
    }

}

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Display Group Component Editing Issue
      • From: David Holt <email@hidden>
    • Re: Display Group Component Editing Issue
      • From: Chuck Hill <email@hidden>
  • Prev by Date: DOM Level 3 and JavaXML.Framework
  • Next by Date: Re: Display Group Component Editing Issue
  • Previous by thread: Re: DOM Level 3 and JavaXML.Framework
  • Next by thread: Re: Display Group Component Editing Issue
  • Index(es):
    • Date
    • Thread