Hi,

I am trying out the @EventListener Ajax features and already got some impressive results without knowing anything about Javascript, but there's one thing that does not work:


Template:

<form jwcid="@Form" listener="listener:formSubmit">

  <input type="text" jwcid="[EMAIL PROTECTED]"
         value="ognl:formValue1" /><br>
  <input type="text" jwcid="[EMAIL PROTECTED]"
         value="ognl:formValue2" /><br>
  <input type="text" jwcid="[EMAIL PROTECTED]"
         value="ognl:formValue3" /><br>

  <input jwcid="@Submit"/>
</form>




Page class:

    public void formSubmit() {
        setMessage("Form 1 submitted");
        LOG.info("Form 1 was submitted");
    }

    public abstract String getFormValue1();

    public abstract String getFormValue2();

    public abstract String getFormValue3();
    public abstract void setFormValue3(String newValue);

    @EventListener(elements = "formField1",
                   events = "onchange", async=true)
    public void formField1Changed(BrowserEvent event) {
        LOG.info("formField1 changed");
        setFormValue3(getFormValue1());
        getRequestCycle().getResponseBuilder()
             .updateComponent("formField3");
}




The event listener is never fired at all. I tried variations of the event name liek "onchange", "onChange" etc., but no listener is fired...


Is there something wrong with my code?


Andy





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to