• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: MooTools Observer: fullSubmit not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MooTools Observer: fullSubmit not working


  • Subject: Re: MooTools Observer: fullSubmit not working
  • From: Johnny Miller <email@hidden>
  • Date: Fri, 19 Apr 2013 09:23:15 -1000

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

 _______________________________________________
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

  • Follow-Ups:
    • Re: MooTools Observer: fullSubmit not working
      • From: Michael Schmiedgen <email@hidden>
References: 
 >MooTools Observer: fullSubmit not working (From: Michael Schmiedgen <email@hidden>)
 >Re: MooTools Observer: fullSubmit not working (From: Johnny Miller <email@hidden>)
 >Re: MooTools Observer: fullSubmit not working (From: Michael Schmiedgen <email@hidden>)
 >Re: MooTools Observer: fullSubmit not working (From: Johnny Miller <email@hidden>)
 >Re: MooTools Observer: fullSubmit not working (From: Michael Schmiedgen <email@hidden>)
 >Re: MooTools Observer: fullSubmit not working (From: Johnny Miller <email@hidden>)
 >Re: MooTools Observer: fullSubmit not working (From: Michael Schmiedgen <email@hidden>)

  • Prev by Date: Re: Creating a WO Maven project
  • Next by Date: Re: exchange server and javamail solved
  • Previous by thread: Re: MooTools Observer: fullSubmit not working
  • Next by thread: Re: MooTools Observer: fullSubmit not working
  • Index(es):
    • Date
    • Thread