Re: WOForm Question
Re: WOForm Question
- Subject: Re: WOForm Question
- From: David Avendasora <email@hidden>
- Date: Wed, 4 Apr 2007 15:40:47 -0500
<WOForm>
aRouting
aRouting.routingDescription
aRouting.part
<routingSteps Repitition>
aRoutingStep.stepNumber
aRoutingStep.stepName
aRoutingStep.instructions
<rsComponent Repetition>
aRSComponent.lineNumber
aRSComponent.part
aRSComponent.quantity
</rsComponent Repetition>
</routingSteps Repitition>
<WOSubmitButton/>
</WOForm>
There are 1+ RoutingSteps for every Routing and 1+ RSComponents for
every RoutingStep.
I can get the attributes of aRouting to update without problem, but I
don't know exactly how I'm supposed to write the code to step through
the 1+ RoutingSteps and update it's attributes (stepNumber, stepName,
instructions) and the same for the RSComponent attributes.
The page builds exactly how I want it to, all of the WOTextFields and
WOPopUpButtons populate correctly, but when I click the submit and
call the method that would write my changes into the EditingContext,
I get a nullPointerException when it reaches the
aRoutingStep.setStepNumber(aRoutingStep.stepNumber()) call.
When updating several Objects of one Entity, do I have to iterate
through the array of Objects, or what? This is the part I think I'm
just not getting. Maybe. I just don't know and I can't find any
documented examples of updating multiple Objects of one Entity with
one WOForm.
Thanks for your patience and help!
Dave
On Apr 4, 2007, at 3:23 PM, Chuck Hill wrote:
Where are the repetitions? What are the bindings inside a
RoutineStep?
On Apr 4, 2007, at 1:21 PM, David Avendasora wrote:
Hi all,
I am revising my question some.
Some review first. Here's my form structure:
<form>
Routing
-RoutingStep 1 of Routing
--RSComponent 1 of RoutingStep 1
--RSComponent 2 of RoutingStep 1
--RSComponent 3 of RoutingStep 1
-RoutingStep 2 of Routing
--RSComponent 1 of RoutingStep 2
--RSComponent 2 of RoutingStep 2
--RSComponent 3 of RoutingStep 2
-RoutingStep Etc, etc, etc.
</form>
I have no problem accepting and updating the "Routing" entity, but
I'm having problems getting the multiple related RoutingStep and
RSComponent entities to update. Can someone give me a general
outline of how the method for writing the changes into the
EditingContext should be formatted? I can't find any documentation
of this anywhere. This method is bound to the submit button
"action" binding.
Thanks!
Dave
_______________________________________________
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