You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Betlista (JIRA)" <ji...@apache.org> on 2013/06/09 00:49:20 UTC

[jira] [Updated] (WICKET-5220) AjaxEditableLabel not working well in form

     [ https://issues.apache.org/jira/browse/WICKET-5220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Betlista updated WICKET-5220:
-----------------------------

    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

{{code}}<!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>{{code}}

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...

  was:
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...

    
> AjaxEditableLabel not working well in form
> ------------------------------------------
>
>                 Key: WICKET-5220
>                 URL: https://issues.apache.org/jira/browse/WICKET-5220
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.8.0
>         Environment: Win8, MS10, Chrome 27.0.1453.94 m
>            Reporter: Betlista
>              Labels: AjaxEditableLabel
>
> 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
> {{code}}<!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>{{code}}
> 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...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira