• 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
Re: Display Group Component Editing Issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Display Group Component Editing Issue


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


On Mar 15, 2007, at 4:51 PM, Chuck Hill wrote:


On Mar 15, 2007, at 4:37 PM, Jim Murry wrote:

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 = selectObject; };
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; };

You are trying to edit in the repetition?
Not editing in the repetition, selecting the hyperlink in the repetition.
I am using the default behavior that creating a new "Display Group Component" gives you by using an EOModel containing username, firstname, lastname.

Shouldn't those the user.username etc instead of userDisplayGroup.selectedObject.username?
I tried that and the selection from the repetition never fills out the selection fields for editing.


Chuck



InsertActiveImage: WOImageButton {action = userDisplayGroup.insert; filename = "DBWizardInsert.gif"; };
UpdateActiveImage: WOImageButton {action = saveChanges; filename = "DBWizardUpdate.gif"; };
DeleteActiveImage: WOImageButton {action = userDisplayGroup.delete; 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:
40global-village.net


This email sent to email@hidden

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







_______________________________________________ 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:
    • [Solved, Semi] Display Group Component Editing Issue
      • From: Jim Murry <email@hidden>
References: 
 >Display Group Component Editing Issue (From: Jim Murry <email@hidden>)
 >Re: Display Group Component Editing Issue (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Display Group Component Editing Issue
  • Next by Date: Groovy + webobjects
  • Previous by thread: Re: Display Group Component Editing Issue
  • Next by thread: [Solved, Semi] Display Group Component Editing Issue
  • Index(es):
    • Date
    • Thread