Will check youre code out. i hope this week.

The problem now is that now always should the form completely be processed and other times is should
for example a Submit Link should i think process the form. But a onChange listener on a DropDownChoice shouldn't
That last one shouldn't be a real submit with validation. Just a submit to keep the current editting values.

johan


On 11/21/05, Christian Essl <[EMAIL PROTECTED]> wrote:
> 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



Reply via email to