Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-729

OnChangeAjaxBehavior does not work with <textarea> when using Safari

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.0-beta2
    • 1.3.0-beta3
    • wicket
    • None

    Description

      With the latest 1.3.0-SNAPSHOT, the following does not work with Safari 2.0.4. The handler is never invoked and the AJAX debug console shows absolutely no activity. The exact same code works with Firefox 2.0.0.4.

      import java.io.Serializable;

      import org.apache.wicket.ajax.AjaxRequestTarget;
      import org.apache.wicket.ajax.form.OnChangeAjaxBehavior;
      import org.apache.wicket.markup.html.WebPage;
      import org.apache.wicket.markup.html.form.Form;
      import org.apache.wicket.markup.html.form.TextArea;
      import org.apache.wicket.model.Model;
      import org.apache.wicket.model.PropertyModel;

      public class WicketBugPage extends WebPage {
      public WicketBugPage() {
      super(new Model(new Item()));

      Form form = new Form("form");
      add(form);

      TextArea description = new TextArea("description", new PropertyModel(getModel(), "description"));
      description.add(new OnChangeAjaxBehavior() {
      @Override
      protected void onUpdate(AjaxRequestTarget target)

      { Item item = (Item) getModelObject(); System.out.println(item.getDescription()); }

      });
      form.add(description);
      }

      public static class Item implements Serializable {
      private String description;

      public void setDescription(String description)

      { this.description = description; }

      public String getDescription()

      { return description; }

      }
      }

      <html>
      <body>
      <form wicket:id="form">
      <textarea wicket:id="description"></textarea>
      </form>
      </body>
      </html>

      Attachments

        Activity

          People

            janne Janne Hietamaki
            penberg Pekka Enberg
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: