Re: How to place form in own public class for extending

2009-02-11 Thread Igor Vaynberg
On Wed, Feb 11, 2009 at 8:52 AM, pieter claassen wrote: > What if you want to reuse the inner class form in another page (you have to > make it public and non-inner for visibility) and then you want to override > the onSubmit() method. If I just create a public class MyForm and stick the > form co

Re: How to place form in own public class for extending

2009-02-11 Thread pieter claassen
What if you want to reuse the inner class form in another page (you have to make it public and non-inner for visibility) and then you want to override the onSubmit() method. If I just create a public class MyForm and stick the form contents (minus the tags) in MyForm.html, then wicket cannot find

Re: How to place form in own public class for extending

2009-02-11 Thread Igor Vaynberg
what is the problem of having the form as an inner class? public class mypage extends webpage { private class myform extends form { ... } public mypage() { add(new myform(..) { protected void onsubmit() {...}}); } } -igor On Wed, Feb 11, 2009 at 6:40 AM, pieter claassen wro

Re: How to place form in own public class for extending

2009-02-11 Thread Jonas
Let your panel have an onSubmit method, and let your form delegate calls to its onSubmit to the panels onSubmit. What do you mean by 'extend the form'? add more form fields? that doesn't work like this, because you have to match the panel's markup. you could use some kind of repeater or listview an

Re: How to place form in own public class for extending

2009-02-11 Thread pieter claassen
But how do you then extend the form in the panel and more importantly, how do you override the onSubmit() method of that form? Cheers, Pieter On Wed, Feb 11, 2009 at 3:50 PM, Ryan Gravener wrote: > I usually make a panel, add the form to the panel and write up the form in > the panel's markup. >

Re: How to place form in own public class for extending

2009-02-11 Thread Ryan Gravener
I usually make a panel, add the form to the panel and write up the form in the panel's markup. http://wicketstuff.org/wicket13/signin/?wicket:bookmarkablePage=:org.apache.wicket.examples.signin.SignIn Ryan Gravener http://ryangravener.com/flex | http://twitter.com/ryangravener On Wed, Feb 11, 2

How to place form in own public class for extending

2009-02-11 Thread pieter claassen
I am trying to move a form from an inner class that extends Form to a public class. This is so that I can override the onSubmit() method of my form. Below are my files. When I add the form to a wicket page with add(new TemplateEditForm("templateeditform", templatemodel)); and the corresponding