nice!

Thanks

what you do in the submit link i want to do in the form itself (so the form
generates a hidden input)
Then everything in that form, Links, onChange listenerers will/can use that
one to do the form submit but then dispatch the event)

johan

That's much better. Enclosed is the revised code. For demonstration there is also a wicket Button (JSButton) you can use to trigger from outside the form and which does itself not render anything.

A SubmitLink has now to be inside a JSForm:

        JSForm f = new JSForm("linkForm", new CompoundPropertyModel(mod));
        f.add(new TextField("value1"));
        f.add(new SubmitLink("link1") {
            protected void onSubmit() {
                System.out.println("Link1 was clicked, value1 is: "
                        + mod.getValue1());
            };
        });
        f.add(new SubmitLink("link2") {
            protected void onSubmit() {
                System.out.println("Link2 was clicked, value1 is: "
                        + mod.getValue1());
            };
        });

Manuel please test this new code.

Christian

Attachment: SubmitLink.java
Description: Binary data

Attachment: ExternalSubmitLink.java
Description: Binary data

Attachment: JSForm.java
Description: Binary data

Attachment: JSSubmit.java
Description: Binary data

Reply via email to