我准备了一个可重复使用的面板并将其添加到我的页面.我的页面表单中有2个下拉选项.我使用来自https://cwiki.apache.org/WICKET/dropdownchoice-examples.html#DropDownChoiceExamples的ajax示例 - 注意 两个DDC工作正常(更改一个值然后隐藏/取消隐藏另一个.但它不起作用我的面板.我使用:
private final MyPanel panel1 = new MyPanel ("MyPanel");
panel1.setOutputMarkupPlaceholderTag(true);
Run Code Online (Sandbox Code Playgroud)
...在DDC1中ajax行为方法:
onUpdate(AjaxRequestTarget target) { ...
DDC2.setVisible(true);
panel1.setVisible(true);
}
Run Code Online (Sandbox Code Playgroud)
我必须提交表格以隐藏/取消panel1.如何在DDC2不提交表单的情况下使其工作方式相同?