Re: Passing values between elements
Re: Passing values between elements
- Subject: Re: Passing values between elements
- From: Paul Lynch <email@hidden>
- Date: Wed, 29 Mar 2006 17:22:07 +0100
Turn on multiple submit for the WOForm.
You make the default action a simple refresh, and bind a different
action to your "do it" submit button. The default form action will
be the first button in the html (a form binding doesn't seem to have
the same effect). You can use a 0x0 image submit button if this is
inconvenient.
for your layout.
Paul
On 29 Mar 2006, at 17:05, jesus Guzman wrote:
I have a similar requirement, but how do you distingluish between
the "accept" action and the "refresh 2nd pupup" action on submit.
since you trigger the accept on the 1st popups change
On Mar 29, 2006, at 6:50 AM, Jerry W. Walker wrote:
Hi, Siegfried,
I did something similar in an application a while back.
Translating the problem domain for that application to your two
button names: I created my page with the Location pop-up's list
attribute bound to the initialized array of locations. I bound the
Building pop-up's list attribute to an empty array. I also added
the onChange attribute to the Location button:
onChange = "javascript:this.form.target='_parent';
this.form.submit()"
The action method for the form submission used the Location's
selection attribute value in an EOQualifier which I used to fetch
the values for the Building's array for that location. The action
method, of course, returned context().page() to display the same
page again, but with the Building's pop up filled in.
By adding the "onChange" attribute to the Location's pop-up, you
save the user having to click a button after selecting the
location. The page still has to refresh, but it feels a bit more
convenient having the page refresh automatically upon selecting a
Location.
For a smoother approach without page refresh, you would have to
move to Ajax or download the complete Buildings array initially to
some JavaScript variable and play some games with JavaScript to
filter the ones you want based on the Location selection.
Regards,
Jerry
On Mar 29, 2006, at 6:46 AM, Siegfried Makedanz wrote:
Hello,
I have two dynamic elements (WOPopUpButton) named Locations and
Buildings. Now I would like to set the list binding in the
Buildings array based on the selection in Locations. Probably an
easy one, but as a sporadic WO user I have no clue yet.
_______________________________________________
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