Question about multiple AjaxSubmitLinks in one form
Suppose that I have one form which has two parts: each part has an AjaxSubmitLink and some other input components(such as TextField, CheckBox,...):
[code]
public class MyPage extends WebPage {
public MyPage()
{
Form form = new Form(...);
add(form);
//Part1
AjaxSubmitLink link1 = new AjaxSubmitLink(...)
TextField comp11 = new TextField(...)
CheckBox comp12 = new CheckBox(...)
ListChoice comp1n = new ListChoice(...)
form.add(link1);
form.add(comp11);
form.add(comp12);
form.add(comp1n);
//Part2
AjaxSubmitLink link2 = new AjaxSubmitLink(...)
TextField comp21 = new TextField(...)
CheckBox comp22 = new CheckBox(...)
ListChoice comp2n = new ListChoice(...)
form.add(link2);
form.add(comp21);
form.add(comp22);
form.add(comp2n);
}
}
[/code]
MyQuestion: when I click (AjaxSubmitLink link1) of Part1, I want to prevent Part2 to submit their data( and their backend Model object). What can I do ?