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 2007/04/02 19:57:34 UTC

svn commit: r524857 - in /incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/stateless: StatelessPage.html StatelessPage.java

Author: ehillenius
Date: Mon Apr  2 10:57:33 2007
New Revision: 524857

URL: http://svn.apache.org/viewvc?view=rev&rev=524857
Log:
fix for stateless example

Modified:
    incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/stateless/StatelessPage.html
    incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/stateless/StatelessPage.java

Modified: incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/stateless/StatelessPage.html
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/stateless/StatelessPage.html?view=diff&rev=524857&r1=524856&r2=524857
==============================================================================
--- incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/stateless/StatelessPage.html (original)
+++ incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/stateless/StatelessPage.html Mon Apr  2 10:57:33 2007
@@ -21,6 +21,10 @@
 			the actual session creation will be deferred. A Wicket session object
 			is available, but is a temporary one.
 		</p>
+		
+		<p>
+			<span wicket:id="feedback" />
+		</p>
 
 	</body>
 </html>

Modified: incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/stateless/StatelessPage.java
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/stateless/StatelessPage.java?view=diff&rev=524857&r1=524856&r2=524857
==============================================================================
--- incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/stateless/StatelessPage.java (original)
+++ incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-examples/src/main/java/wicket/examples/stateless/StatelessPage.java Mon Apr  2 10:57:33 2007
@@ -1,18 +1,18 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
  */
 package wicket.examples.stateless;
 
@@ -21,6 +21,7 @@
 import wicket.markup.html.form.StatelessForm;
 import wicket.markup.html.form.TextField;
 import wicket.markup.html.link.BookmarkablePageLink;
+import wicket.markup.html.panel.FeedbackPanel;
 import wicket.model.Model;
 
 /**
@@ -40,19 +41,20 @@
 		setStatelessHint(true);
 		add(new Label("message", new SessionModel()));
 		add(new BookmarkablePageLink("indexLink", Index.class));
-		
-		StatelessForm statelessForm = new StatelessForm("statelessform"){
+
+		StatelessForm statelessForm = new StatelessForm("statelessform")
+		{
 			/**
 			 * @see wicket.markup.html.form.Form#onSubmit()
 			 */
 			protected void onSubmit()
 			{
-				info("Onsubmit of stateless page pressed, textfield updated: " + tf.getModelObject());
-				tf.setModelObject(tf.getModelObject()+ "_" +tf.getModelObject());
+				info("Submitted text: " + tf.getModelObject());
 			}
 		};
 		tf = new TextField("textfield", new Model());
 		add(statelessForm);
 		statelessForm.add(tf);
+		add(new FeedbackPanel("feedback"));
 	}
 }