The ajax update container is getting refreshed! The selection from
the pop-up is also in the request's form values!
But the pop-up is simply ignoring the form values in the request. And
that is what I'm trying to find out why.
I got a little desperate and I added a takeValuesFromRequest() to
Wonder's PopUpButton in order to log some info and then call super. I
then compared the output on the app that works and the one that doesn't:
The app that works outputs this:
Jun 19 14:29:26 AjaxTest[60619] DEBUG
er.extensions.foundation.ERXPatcher - PopUpButton
takeValuesFromRequest :
_selection =
<ognl.helperfunction.WOHelperFunctionKeyValueAssociation:
keyPath=selectedState>
isDisabledInContext => false
context.wasFormSubmitted() => true
The app that doesn't work outputs this:
Jun 19 14:34:09 MyApp[60625] DEBUG
er.extensions.foundation.ERXPatcher - PopUpButton
takeValuesFromRequest :
_selection =
<ognl.helperfunction.WOHelperFunctionKeyValueAssociation:
keyPath=selectedGpci>
isDisabledInContext => false
context.wasFormSubmitted() => false
Notice it doesn't think the form was submitted. I'm not sure why.
On the other hand, in the app that works context.wasFormSubmitted()
returned true.
On Jun 19, 2009, at 2:40 PM, Gustavo Adolfo Pizano wrote:
Hello Ricardo.
I had a similar thing in my app, but as I see you have it inside a
form, so so far its fine, are you using a ajaxsubmitbutton? I
hadn't try the dynamic stuff with popupbuttons, but I know the Ajax
examples has one... maybe checking one will show you where the
mistake is.. its 80% in the developer as it happens to me with a
popupbutton last week, I was using the binding to selectedValue
instead of selections,.. it was driving me crazy.
G,.
On Jun 19, 2009, at 7:46 PM, Ricardo J. Parada wrote:
Hi All,
I have a form with a pop-up list in there. An AjaxObserveField
refreshes an ajax update container when the selection in the pop-up
changes. But the selection in my component is not being set.
I set a breakpoint in ERXWOForm's takeValuesFromRequest(). It is
getting called. And I see it calling _enterFormInContext() which
then calls context._setFormSubmitted(true). That looks right so
far. Then at that point I inspected context.wasFormSubmitted() as
well as context._wasFormSubmitted() and they both are turning
false. :-/ Now that doesn't look right.... So then the form
calls super.takeValuesFromRequest() and I was expecting the
WOPopUpButton to process the the selection contained in the form
values and then and setting the selection. But that never
happens. I inspected the form values and the newly selected value
in the pop-up is in there. So the pop-up is just not grabbing it
from the form values. :-/
I also printed the class of the context and it is an
ERXWOContext54. This is a Wonder app... or actually the wonderized
version of my non-wonder app. ;-) My non-wonder app does grab the
value from the form values in the request. My wonder app doesn't.
On an isolated wonder app the pop-up, ajax observe field and ajax
update container work perfect. The selection does get set there.
I'm using WO 5.4.3 and same Wonder version on both.
Any pointers for what to check that would help me find out why my
pop-up is not doing takeValuesFromRequest() ?
It is just a normal WOPopUpButton... here's the definition:
GPCIPopUp: WOPopUpButton {
name = "gpciPopUp";
displayString = aGpci.displayString;
item = aGpci;
list = gpciList;
selection = selectedGpci;
}
My setSelectedGpci() method in the component never gets called. :-/
I feel like a beginner!!! :-)
_______________________________________________
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/webobjectspicora%40gmail.com
This email sent to [email protected]
_______________________________________________
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/archive%40mail-archive.com
This email sent to [email protected]