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

AjaxEditableLabel not working well in form

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.8.0, 7.0.0-M1
    • 6.9.0, 7.0.0-M1
    • None
    • Win8, MS10, Chrome 27.0.1453.94 m

    Description

      Using quickstart I created new maven project (using 6.8.0 wicket + extensions).

      Code of my page is

      package net.betlista;

      import org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel;
      import org.apache.wicket.markup.html.WebPage;
      import org.apache.wicket.markup.html.form.Form;
      import org.apache.wicket.model.CompoundPropertyModel;

      public class AjaxEditableLabelInFormTestPage extends WebPage {

      Form<AjaxEditableLabelInFormTestPageModel> form = new Form("form");

      AjaxEditableLabel<String> text = new AjaxEditableLabel<String>("text");

      public AjaxEditableLabelInFormTestPage()

      { form.setModel(new CompoundPropertyModel<AjaxEditableLabelInFormTestPage.AjaxEditableLabelInFormTestPageModel>(new AjaxEditableLabelInFormTestPageModel())); form.add(text); add(form); }

      class AjaxEditableLabelInFormTestPageModel

      { String text; }

      }

      code for markup HTML is

      <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
      <title>Insert title here</title>
      </head>
      <body>

      <form wicket:id="form">
      <span wicket:id="text">text</span>
      </form>

      </body>
      </html>

      and when I edit the label and press tab, it changed to regular page text (span), but when I press enter (while editing) the component is still input instead of span and the content is not submitted also. It's not possible to change the component to span again...

      Attachments

        Activity

          People

            svenmeier Sven Meier
            betlista Betlista
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: