Ajax Wicket DisableComponentListener禁用整个页面

Ajax Wicket DisableComponentListener禁用整个页面,ajax,components,wicket,javascript,Ajax,Components,Wicket,Javascript,我在wicket应用程序中使用了一个ajax按钮,该代码运行良好: @Override protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { super.updateAjaxAttributes(attributes); attributes.getAjaxCallListeners().add(new DisableComponentListener(form)); } 表单是带有标记的

我在wicket应用程序中使用了一个ajax按钮,该代码运行良好:

@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
    super.updateAjaxAttributes(attributes);
    attributes.getAjaxCallListeners().add(new DisableComponentListener(form));
}
表单是带有标记的组件:id=“表单”


但是我想禁用渲染的整个网页对象,并按照描述渲染指示器。在DisableComponentListener中用getPage()替换表单参数似乎不可行。

正如我在您链接到的页面上看到的,用于“禁用”表单的javascript代码使用传递的组件的元素id(=标记id)在客户端禁用它


问题是页面没有标记id。因此,您可以尝试编辑javascript代码以使用body元素,或者在层次结构的更高层添加自定义WebMarkupContainer,并将其传递给DisableComponentListener。

谢谢,这是可行的,但我如何才能访问属于我页面父页面的WebMarkupContainer呢需要在超级类中提供getter(在添加WebMarkupContainer as字段之后)