Better use only a constructor with PageParameters or chain them as I
suggested you already.
new MyPage() {
this(new PageParameters());
}
new MyPage(PageParameters params) {
super(params);
.. here do your logic
}
On Fri, Apr 8, 2011 at 10:37 AM, Juansoft <[email protected]> wrote:
> Thanks for your replie Martin.
>
> Really if submitting the form the parameter constructor is called. I tried
> to delete this constructor (parameter) and the page actually only have one
> constructor (without parameter) and runs...
>
> I don't understand how page run without the parameter constructor in
> stateless page.
>
> When the page have this constructor it's called and runtime exceptions
> ocurrs, and if parameter constructor is deleted page works?
>
> With this works fine:
>
> public final class Test extends WebPage {
> public Test () {
> super ();
>
> StatelessForm Form = new StatelessForm("formData"){
>
> public void onSubmit() {
> System.out.println("Enter");}
> };
>
>
> add(Form);
>
> this.setStatelessHint(true);
> }
>
> //Parameter constructor deleted!!
> }
>
> -----
> Another "wicket" newbie programmer
> ********************************
> Wicket en EspaƱol -
>
> http://aprendiendowicket.wordpress.com
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Stateless-form-throws-Unexpected-RuntimeException-tp3434187p3435643.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>