Re: Passing values between elements
"Jerry W. Walker" <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
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.
>
> Thanks,
> Siegfried
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/jerrywwalker%
> 40gmail.com
>
> This email sent to [email protected]
--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial
Strength Internet Enabled Systems
[email protected]
203 278-4085 office