Sorry if this is dirt simply but I seem to be missing something that every google search, as well as page 170 in Joshua Marker's book suggest should work.

I have a small app where there is an WOHyperlink called "Submit new idea" that calls a method that creates a new "Idea" object and the returns a new "EditIdea" page.

 public EditIdea submitIdeaAction() {
    EditIdea nextPage = (EditIdea) pageWithName("EditIdea");

    

    // Initialize your component here
EOEditingContext ec = session().defaultEditingContext();
ec.revert();


Idea aNewIdea = (Idea) EOUtilities.createAndInsertInstance(ec, "Idea");


nextPage.editIdea = aNewIdea;


return nextPage;

    

    }


In the Idea class (which is an EOGenerator class) has a constructor method that by sets the status of the class to "PROPOSED". 

private static final String PROPOSED = "P";

public Idea() {
super();
setProposedStatus();
}
public void setProposedStatus() {
setStatus(PROPOSED);
}

However, by the time I get to the EditIdea page, the Idea's status is null. Huh? I know the constructor above is getting called, but I don't know why it gets reset on the EditIdea page.

Help please!
Tarun

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to