检票:可以Checkgroup可以支持Ajax? [英] Wicket: can Checkgroup be Ajax enabled?

查看:108
本文介绍了检票:可以Checkgroup可以支持Ajax?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个选择动态列表,每个重由一个复选框psented $ P $。我也有一个选择他们全部全选复选框。我使用的是CheckGoup,CheckGroupSelector和检查,一切的伟大工程。现在有一种新的要求来改变状态上的某些其他的控制在页面上时一些复选框的选择

I have a dynamic list of choices, each represented by a checkbox. I also have a "select all" check box that selects them all. i am using a CheckGoup, CheckGroupSelector and Check and everything works great. now there is a new requirement to change the state on some other controls on the page when some of the checkboxes are selected.

我以为simpliest是阿贾克斯启用检查,但似乎它不可能。看来,检查没有让你一个AjaxFormComponentUpdatingBehavior添加到它。

I thought the simpliest is to Ajax-enable the Check but it seems its not possible. seems that Check does not allow you to add a AjaxFormComponentUpdatingBehavior to it.

有没有简单的方法来实现这一目标?

is there any simple way to achieve this?

我也在想使用普通o'ld复选框和添加的JavaScript做选择所有。至少复选框即可AJAX功能。

I was also thinking of using plain o'ld checkboxes and add javascript to do the select all. At least the checkbox can be ajax-enabled.

想法?

推荐答案

最简单的方案是通过更换复选框<一href="http://wicket.apache.org/apidocs/1.4/org/apache/wicket/ajax/markup/html/form/AjaxCheckBox.html"相对=nofollow> AjaxCheckboxes 由于CheckGroupSelector触发每个相关联的复选框的onclick事件,从而引发了Ajax的部分经常被他AjaxCheckbox。 据我所知(而据Javadoc中说明),在CheckGroupSelector运行在客户端使用JavaScript所以这应该工作。

The easiest would be to replace the CheckBoxes by AjaxCheckboxes since The CheckGroupSelector triggers the onClick event of each associated Checkbox, thus triggering the Ajax-part oft he AjaxCheckbox. As far as I know (and as far as the Javadoc states), the CheckGroupSelector runs on the client-side in JavaScript so this should work.

这篇关于检票:可以Checkgroup可以支持Ajax?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆