You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by eh...@apache.org on 2006/12/02 20:18:20 UTC

svn commit: r481605 - in /incubator/wicket/branches/wicket-1.x/wicket-examples: .settings/ src/main/java/wicket/examples/forminput/

Author: ehillenius
Date: Sat Dec  2 11:18:19 2006
New Revision: 481605

URL: http://svn.apache.org/viewvc?view=rev&rev=481605
Log:
streamlined form input example

Removed:
    incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/forminput/FormInput_da_DK.html
    incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/forminput/FormInput_de.html
    incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/forminput/FormInput_fa_IR.html
    incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/forminput/FormInput_fa_IR.properties
    incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/forminput/FormInput_ja.html
    incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/forminput/FormInput_ja.properties
    incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/forminput/FormInput_nl.html
    incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/forminput/FormInput_pt_BR.html
    incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/forminput/FormInput_zh_CN.html
    incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/forminput/FormInput_zh_CN.properties
Modified:
    incubator/wicket/branches/wicket-1.x/wicket-examples/.settings/org.eclipse.core.resources.prefs
    incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/forminput/FormInput.java

Modified: incubator/wicket/branches/wicket-1.x/wicket-examples/.settings/org.eclipse.core.resources.prefs
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket-examples/.settings/org.eclipse.core.resources.prefs?view=diff&rev=481605&r1=481604&r2=481605
==============================================================================
--- incubator/wicket/branches/wicket-1.x/wicket-examples/.settings/org.eclipse.core.resources.prefs (original)
+++ incubator/wicket/branches/wicket-1.x/wicket-examples/.settings/org.eclipse.core.resources.prefs Sat Dec  2 11:18:19 2006
@@ -1,4 +1,4 @@
-#Mon Nov 13 11:43:31 CET 2006
+#Sat Dec 02 10:20:15 PST 2006
 eclipse.preferences.version=1
 encoding//src/java/wicket/examples/forminput/FormInput_da_DK.html=UTF-8
 encoding//src/java/wicket/examples/forminput/FormInput_de.html=UTF-8
@@ -7,10 +7,6 @@
 encoding//src/java/wicket/examples/forminput/FormInput_pt_BR.html=ISO-8859-1
 encoding//src/java/wicket/examples/forminput/FormInput_zh_CN.html=UTF-8
 encoding//src/java/wicket/examples/pub/Home_da_DK.html=UTF-8
-encoding//src/main/java/wicket/examples/forminput/FormInput_da_DK.html=UTF-8
-encoding//src/main/java/wicket/examples/forminput/FormInput_de.html=UTF-8
-encoding//src/main/java/wicket/examples/forminput/FormInput_fa_IR.html=UTF-8
-encoding//src/main/java/wicket/examples/forminput/FormInput_ja.html=UTF-8
-encoding//src/main/java/wicket/examples/forminput/FormInput_nl.html=UTF-8
-encoding//src/main/java/wicket/examples/forminput/FormInput_pt_BR.html=ISO-8859-1
-encoding//src/main/java/wicket/examples/forminput/FormInput_zh_CN.html=UTF-8
+encoding//src/main/java/wicket/examples/forminput/FormInput_da_DK.properties=UTF-8
+encoding//src/main/java/wicket/examples/forminput/FormInput_de.properties=UTF-8
+encoding//src/main/java/wicket/examples/forminput/FormInput_pt_BR.properties=ISO-8859-1

Modified: incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/forminput/FormInput.java
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/forminput/FormInput.java?view=diff&rev=481605&r1=481604&r2=481605
==============================================================================
--- incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/forminput/FormInput.java (original)
+++ incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/forminput/FormInput.java Sat Dec  2 11:18:19 2006
@@ -1,6 +1,6 @@
 /*
- * $Id$
- * $Revision$ $Date$
+ * $Id$ $Revision:
+ * 476966 $ $Date$
  * 
  * ==============================================================================
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
@@ -25,13 +25,13 @@
 
 import wicket.examples.WicketExamplePage;
 import wicket.markup.html.basic.Label;
+import wicket.markup.html.form.Button;
 import wicket.markup.html.form.Check;
 import wicket.markup.html.form.CheckBox;
 import wicket.markup.html.form.CheckGroup;
 import wicket.markup.html.form.ChoiceRenderer;
 import wicket.markup.html.form.DropDownChoice;
 import wicket.markup.html.form.Form;
-import wicket.markup.html.form.ImageButton;
 import wicket.markup.html.form.ListMultipleChoice;
 import wicket.markup.html.form.Radio;
 import wicket.markup.html.form.RadioChoice;
@@ -39,7 +39,6 @@
 import wicket.markup.html.form.RequiredTextField;
 import wicket.markup.html.form.TextField;
 import wicket.markup.html.form.validation.NumberValidator;
-import wicket.markup.html.image.Image;
 import wicket.markup.html.link.Link;
 import wicket.markup.html.list.ListItem;
 import wicket.markup.html.list.ListView;
@@ -63,8 +62,7 @@
 {
 	/** Relevant locales wrapped in a list. */
 	private static final List LOCALES = Arrays.asList(new Locale[] { Locale.ENGLISH,
-			new Locale("nl"), Locale.GERMAN, Locale.SIMPLIFIED_CHINESE, Locale.JAPANESE,
-			new Locale("pt", "BR"), new Locale("fa", "IR"), new Locale("da", "DK")});
+			new Locale("nl"), Locale.GERMAN, new Locale("pt", "BR"), new Locale("da", "DK") });
 
 	/** available numbers for the radio selection. */
 	static final List NUMBERS = Arrays.asList(new String[] { "1", "2", "3" });
@@ -135,7 +133,7 @@
 			add(integerTextField.add(NumberValidator.POSITIVE));
 			add(new RequiredTextField("doubleProperty", Double.class));
 			// we have a component attached to the label here, as we want to
-			// synchronize the id's of the label, textfield and datepicker. Note 
+			// synchronize the id's of the label, textfield and datepicker. Note
 			// that you can perfectly do without labels
 
 			add(new RequiredTextField("integerInRangeProperty", Integer.class).add(NumberValidator
@@ -212,17 +210,17 @@
 			// and this is to show we can nest ListViews in Forms too
 			add(new LinesListView("lines"));
 
-			add(new ImageButton("saveButton"));
+			add(new Button("saveButton"));
 
-			add(new Link("resetButtonLink")
+			add(new Button("resetButton")
 			{
-				public void onClick()
+				public void onSubmit()
 				{
 					// just call modelChanged so that any invalid input is
 					// cleared.
 					InputForm.this.modelChanged();
 				}
-			}.add(new Image("resetButtonImage")));
+			});
 		}
 
 		/**
@@ -321,7 +319,6 @@
 			// objects of
 			// type FormInputModel.Line) using property text.
 			item.add(new TextField("lineEdit", new PropertyModel(item.getModel(), "text")));
-			item.add(removeLink("remove", item));
 		}
 	}
 }