• 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
EO/Java class default Values
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EO/Java class default Values


  • Subject: EO/Java class default Values
  • From: Tarun Reddy <email@hidden>
  • Date: Tue, 26 Sep 2006 22:40:15 -0600

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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: EO/Java class default Values
      • From: Markus Ruggiero <email@hidden>
  • Prev by Date: Re: constructing a url...
  • Next by Date: Re: EO/Java class default Values
  • Previous by thread: problem generating pdf using apache FOP
  • Next by thread: Re: EO/Java class default Values
  • Index(es):
    • Date
    • Thread