Implementing javascript events to Wicket

人走茶凉 提交于 2019-12-01 11:00:02
Thomas

The example you gave adds an event handler for the change event. What this event handler does is issueing a GET request to the ajaxBehaviordefined above. The behavior then extracts the slider value from the GET parameters and calls onValueChanged.

You can add another event handler just like this to SliderOptions. For instance:

.slideEvent(
    wicketAjaxGet(ajaxBehavior,
                  new MapBuilder<String, Object>()
                  .add("sv",  js("ui.value")).build()))));

This handler should call the ajax behavior any time the user moves the slider.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!