Is there a way to enable autocomplete for AjaxEditableLabel (just like AutoCompleteTextField)? I was going through AutoCompleteTextField as a reference and wrote my own behavior for autocompletion. The new behavior works perfectly for a TextField, but not for AjaxEditableLabel.

Answering my own question (in case someone is looking for the same functionality through a google search).

AjaxEditableLabel is a panel with a label and textfield component which is why adding the autocomplete behavior to it didn't work. I solved it by overriding the newEditor() method and adding my behavior to the editor in the AjaxEditableLabel panel like so:

AjaxEditableLabel<String> label = new AjaxEditableLabel<String>("foo") {

    protected FormComponent<String> newEditor(final MarkupContainer
      parent, final String componentId, final IModel<String> model) {

        final FormComponent form = super.newEditor(parent, componentId,
        form.add(new MyAutoCompleteBehavior());
        return form;


To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to