I'm trying to create a custom d2w component that extends ERDCustomEditComponent. What I want is a to many component that you can select a Person EO and if you click a link "new..." you can create a new Person eo and enter the Person.name. So far I can select the Person EO with no problem and I can create a new Person EO, BUT I cannot get what is typed into the WOTextField to update the Person.name value. My WOTextField simply connects to the person object in the component. <wo:textField value = "$person.name"></wo:textField> If I look at the the form values coming from the worequest in takeValuesFromRequest I can see the string in the dictionary. public void takeValuesFromRequest(WORequest r, WOContext c) { super.takeValuesFromRequest(r,c); System.out.println(r.formValues()); } {0.3.4.5.0.1.0.0.2.0.0.5.0.0.2.0.3.3.2.2.0.7.0.0.0.5.1.1.0.2.5.0.1.3.0.0.4.1 = ("Name"); 0.3.4.5.0.1.0.0.2.0.0.5.0.0.2.0.3.3.2.0.3 = ("1"); 0.3.4.5.0.1.0.0.2.0.0.5.0.0.2.0.3.3.2.0.5 = ("Add"); 0.3.4.5.0.1.0.0.2.0.0.5.0.0.2.0.5.3.3 = (""); wosid = ("PAAAvE86f69I8vC3Kh012g"); } So far the only way I can get this to work if I add an id to the WOTextField and change takeValueFromRequest. But this doesn't seem right. <wo:textField value = "$child.name" id = "name"></wo:textField> public void takeValuesFromRequest(WORequest r, WOContext c) { super.takeValuesFromRequest(r,c); System.out.println(r.formValues()); person().setName( (String)r.formValueForKey("name") ); } Is there a better way to do this? |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com