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.

Maybe I don't understand you right.

However I think currently you can use a JSButton with defaultFormProcessing = false. JSButton is a server-only component. It does not get rendered in html and it is only there to receive onSubmit() notificatons. It can be triggered with the script gotten from JSButton.getTriggerJavaScript() ie by the DrowDownChoice-onClick.

Christian

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






--
Christian Essl
        

        
                
___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to