Hi Michael,
OK. I discovered the error.
In MTWonder.js the method observeField in the object MTAjaxSubmitButton
Some code like this:
} else if (updateContainerID != null) { submitFunction = function(element, value) { if(!options.onBeforeSubmit || options.onBeforeSubmit(formFieldID)) { MTASB.update(updateContainerID, $(formFieldID).form, null, options); } } }
You need to add that .form to $(formFieldID)
When I get to the office I, the world's dumbest user of Git, will submit a patch (hopefully).
Best,
Aloha,
|
Mr. Johnny Miller
Web Development Manager
Kahalawai Media Company
Lahaina, HI 96761
tel: (808) 661-7962 | mobile: (808) 283-0791
website | e-mail
|
|
On Apr 19, 2013, at 2:03 AM, Michael Schmiedgen < email@hidden> wrote: Hi Johnny,
In the method generateActionUrl
If you put console.log(form.action) at the top of the method what does it output?
'undefined'
Are your inputs nested inside a form?
I just built a test case. It is a new, vanilla, Wonder Application generated with WOLips. The only thing altered is the 'Main' component, as shown below.
- If I click the popup button nothing happens. Error console displays: 'TypeError: actionUrl is undefined'. actionObserver() is not called.
- If I comment out MTAjaxObserveField's 'updateContainerID': actionObserver() gets called, error console is emtpy, but obviously the container gets no update.
- If I comment out 'fullSubmit' everything works fine. actionObserver() gets called, error console is empty and the container gets updated, the WOString prints my selection in the browser.
Thanks, Michael
------------------ public class Main extends ERXComponent { private static final NSArray<String> popupList = new NSArray<>("Eins", "Zwei", "Drei"); public String selection;
public Main(WOContext context) { super(context); } public NSArray<String> popupList() { return popupList; } public WOActionResults actionObserver() { System.out.println("observer: " + selection); return null; } } ------------------ <html> <body> <webobject name="Form"> <webobject name="UpdateContainer"> <webobject name="Observer"> <webobject name="Popup" /> </webobject> <webobject name="Selection" /> </webobject> </webobject> </body> </html> ------------------ Form : WOForm { } UpdateContainer : MTAjaxUpdateContainer { id = "ta_panel"; elementName = "div"; } Observer : MTAjaxObserveField { action = ""> updateContainerID = "ta_panel"; fullSubmit = true; } Popup : WOPopUpButton { list = popupList; selection = selection; } Selection : WOString { value = selection; } ------------------
-- ___________________________
Michael Schmiedgen, BSc Senior Software Engineer
Takwa GmbH Friedrich-List-Str. 36 99096 Erfurt GERMANY
Tel +49 361 6534096 Fax +49 361 6534097 Mail email@hidden Web http://www.takwa.de/ ___________________________
Amtsgericht Jena HRB 112964 Geschäftsführung: Ingo Buchholz
|