Oh, I see - you have inline javascript in the onchange handler. I
don't think that's going to work - you need to wrap the element in T5s
core DOM which is defined by RequireJS:

http://people.apache.org/~hlship/t5api/coffeescript/t5-core-dom-prototype.html

Do this instead:

/META-INF/modules/formSubmitter.js

define(["t5/core/dom"], function(t5) {
  return function(selectClientId) {
    return t5(selectClientId).on('change', function(e) {
      var form = this.findParent("form");
      return form.trigger("submit");
    });
  };
});

Or use CoffeeScript:

/META-INF/modules/formSubmitter.coffee

define ["t5/core/dom"], (t5) ->
        return (selectClientId) ->
                t5(selectClientId).on 'change', (e) ->
                        form = this.findParent("form")
                        form.trigger "submit"

Then in a render phase method in your component / page:

    jsSupport.require("formSubmitter").with(select.getClientId());

Steve.


On 11 March 2013 02:32, Lenny Primak <[email protected]> wrote:
> In 5.3, you had to do setSubmittingElement().  Not sure if this applies still 
> in 5.4, but if it does,
> it will need to be called.
>
> On Mar 10, 2013, at 1:39 PM, Lance Java wrote:
>
>> You need to fire the "click" event on the submit button, not "submit".
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to