AjaxEditableLabel: Model change events not propagated from Editor
-----------------------------------------------------------------

                 Key: WICKET-1097
                 URL: https://issues.apache.org/jira/browse/WICKET-1097
             Project: Wicket
          Issue Type: Improvement
          Components: wicket-extensions
    Affects Versions: 1.3.0-beta4
         Environment: any
            Reporter: Jan Kriesten


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.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to