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

AjaxEditableLabel: Model change events not propagated from Editor

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.0-beta4
    • 1.3.0-rc2
    • wicket-extensions
    • None
    • any

    Description

      Model changes are not propagated from the Editor to the AjaxEditableLabel, so overriding onModelChanging/onModelChanged doesn't work as one might expect. The implementation should be changed to something like this (code sample by Gerolf):


      protected FormComponent newEditor(MarkupContainer parent, String componentId, IModel model)
      {
      TextField editor = new TextField(componentId, model)
      {
      private static final long serialVersionUID = 1L;

      protected void onModelChanging()

      { super.onModelChanging(); AjaxEditableLabel.this.onModelChanging(); }

      protected void onModelChanged()

      { super.onModelChanged(); AjaxEditableLabel.this.onModelChanged(); }

      };
      editor.setOutputMarkupId(true);
      editor.setVisible(false);
      editor.add(new EditorAjaxBehavior());
      return editor;
      }

      The same issue might apply to the other inline-editors.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jkriesten Jan Kriesten
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: