Transformin a form into a component
I have a doubt about componentizing a Form. If I create a class, MyForm.java, that extends Form Inside of it I declare all the form componets. After that I create the markup with all the components present on MyForm.java. I call it MyForm.html If I want to use it on a page, like MyPage for instance, how should I declare the form component on my page markup? It will be like that? Or are there any more steps to take to be able to componentize a form? MyPage.html ... form wicket:id=myform/form MyPage.java private final MyForm myform = new myForm(myform); ... this.add(myform); ? -- Two rules to succeed in life: 1 - don´t tell people everything you know. We shall go on to the end. We shall fight in France We shall fightover the seas and oceans. We shall fight with growing confidence and growing strength in the air. We shall defend our island whatever the cost may be We shall fight on beaches, we shall fight on the landing grounds, We shall fight in the fields and in the streets, We shall fight on the hills. We shall never surrender. Winston Churchill
Re: Transformin a form into a component
put it into a panel -igor On Wed, Apr 1, 2009 at 11:46 AM, Daniel Ferreira Castro dfcas...@gmail.com wrote: I have a doubt about componentizing a Form. If I create a class, MyForm.java, that extends Form Inside of it I declare all the form componets. After that I create the markup with all the components present on MyForm.java. I call it MyForm.html If I want to use it on a page, like MyPage for instance, how should I declare the form component on my page markup? It will be like that? Or are there any more steps to take to be able to componentize a form? MyPage.html ... form wicket:id=myform/form MyPage.java private final MyForm myform = new myForm(myform); ... this.add(myform); ? -- Two rules to succeed in life: 1 - don´t tell people everything you know. We shall go on to the end. We shall fight in France We shall fightover the seas and oceans. We shall fight with growing confidence and growing strength in the air. We shall defend our island whatever the cost may be We shall fight on beaches, we shall fight on the landing grounds, We shall fight in the fields and in the streets, We shall fight on the hills. We shall never surrender. Winston Churchill - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Transformin a form into a component
Thanks, it worked. :) On Wed, Apr 1, 2009 at 3:49 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: put it into a panel -igor On Wed, Apr 1, 2009 at 11:46 AM, Daniel Ferreira Castro dfcas...@gmail.com wrote: I have a doubt about componentizing a Form. If I create a class, MyForm.java, that extends Form Inside of it I declare all the form componets. After that I create the markup with all the components present on MyForm.java. I call it MyForm.html If I want to use it on a page, like MyPage for instance, how should I declare the form component on my page markup? It will be like that? Or are there any more steps to take to be able to componentize a form? MyPage.html ... form wicket:id=myform/form MyPage.java private final MyForm myform = new myForm(myform); ... this.add(myform); ? -- Two rules to succeed in life: 1 - don´t tell people everything you know. We shall go on to the end. We shall fight in France We shall fightover the seas and oceans. We shall fight with growing confidence and growing strength in the air. We shall defend our island whatever the cost may be We shall fight on beaches, we shall fight on the landing grounds, We shall fight in the fields and in the streets, We shall fight on the hills. We shall never surrender. Winston Churchill - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Two rules to succeed in life: 1 - don´t tell people everything you know. We shall go on to the end. We shall fight in France We shall fightover the seas and oceans. We shall fight with growing confidence and growing strength in the air. We shall defend our island whatever the cost may be We shall fight on beaches, we shall fight on the landing grounds, We shall fight in the fields and in the streets, We shall fight on the hills. We shall never surrender. Winston Churchill