• 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[2]: setting values
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: setting values


  • Subject: Re[2]: setting values
  • From: "A. Uchida" <email@hidden>
  • Date: Thu, 20 Feb 2003 21:18:34 GMT

Hi Ricardo,

Thanks indeed for your kind advice, I will try!

Cheers!


Reply for "Re: setting values" written by Ricardo Strausz at Wed, 19 Feb 2003 17:56:29 -0600

>hola atsushi,
>
>in EOModeler you most generate the Java files for each entity
>(Property>Generate Java Files...)
>
>if you look to that sources, you will find methods of the form:
>
>     public Number no() {
>         return (Number)storedValueForKey("no");
>     }
>
>     public void setNo(Number value) {
>         takeStoredValueForKey(value, "no");
>     }
>
>so, too assign such a valu you need a line of the form
>
>objectA.setNo(objectB.no());
>
>I think this is the easiest way to do it...
>you can also use generic methods like "setValueForKey" and
>"takeValueForKey" but that means you will write more code... EOModeler
>does that for you!!!
>
>Suerte!
>dino
>
>
>
>On miircoles, febr 19, 2003, at 16:40 America/Mexico_City, A. Uchida
>wrote:
>
>> Hi there,
>>
>> MacOS 10.1.5 & WO5.0
>>
>> I'm just staring to use WO recently and also a beginner of Java
>> programming.
>> I would like to have your advices for my qestion.
>>
>> What I am trying to do in WO application is
>>     1. Create a new record in an entityA using display group insert().
>>     2. Save the new record in the entityA using saveChanges().
>>     3. Create a new record in an entityB using insert().
>>     4. set a value of an attribute of entityA to an attribute of the
>> entityB
>>     5. saveChanges() of entityB.
>>
>> I want to do the process 2 to 4 by an action on a WO component.
>>
>> What I did to set the value was to add
>>     entityB.aData = entityA.aData;
>> in the action method in the java file.
>> Both entityA and B was produced as a key using the entities.
>> And it doesn't allow me to finish the build.
>>
>> I think I had to use a method, something like "takeValueForKey".
>> But I don't know how to use it.
>>
>> Question1 : what method can be used to set a value of an entity to a
>> field
>> of the other entity?
>> Question 2 : I am learning WO by myself and had read some books for WO
>> but
>> when I get lost like this case, what kind of documents, do you think,
>> are usefull?
>> I checked the documents of the WO: EOControl, Java reference for Java
>> etc.
>> But I don't think it is useful.
>>
>> Any comments would be appreciated.
>> Thanks in advance.
>>
>> Atsushi Uchida
>> _______________________________________________
>> webobjects-dev mailing list | email@hidden
>> Help/Unsubscribe/Archives:
>> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>> Do not post admin requests to the list. They will be ignored.
>>
>
>Dino
>http://homepage.mac.com/strausz
>_______________________________________________
>webobjects-dev mailing list | email@hidden
>Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: setting values (From: Ricardo Strausz <email@hidden>)

  • Prev by Date: Re: question about manual of Apple's Webobjects
  • Next by Date: Re: JDBC plugin
  • Previous by thread: Re: setting values
  • Next by thread: Re: setting values
  • Index(es):
    • Date
    • Thread