Can WOPopupButton's selectedValue binding set a value in a component?
Can WOPopupButton's selectedValue binding set a value in a component?
- Subject: Can WOPopupButton's selectedValue binding set a value in a component?
- From: Hugi Thordarson <email@hidden>
- Date: Fri, 29 Mar 2019 15:58:25 +0000
Hi all.
For … reasons* … I need to use the "selectedValue"-binding of a WOPopupButton,
rather than the "selection"-binding. However, it seems "selectedValue" is
unidirectional, i.e. if I bind it to a variable in a component, the variable is
read (to set the initially selected value when the pop-up renders) but it's not
set in the component when the form is submitted.
So… I guess the question is; shouldn't that binding be bidirectional, so I can
intercept the new [selectedValue] on form submission? It seems surprising it
doesn't just work, and it's tempting to think I'm simply just doing something
wrong.
If anyone can shed some light on this (or suggest a workaround) I'd be most
grateful. It would be lovely to able to avoid stuff like updating a hidden
field on the client when the pop-up changes (blech) or manually getting the
formValue from the request (pfft).
* For those interested in "reasons", it's that I have a few hundred select
boxes on a single page, each one containing the same identical list of few
hundred items. I'm populating these popups manually on the client using
JavaScript so I don't have to download a few megabytes of HTML on each request.
If anyone can suggest a different solution to *that* problem, then that makes
this question obsolete :).
Cheers,
- hugi
_______________________________________________
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