我正在尝试在listView中添加TextField,它可以在退出时或更新其上的文本后更新模型。
我已收到wonderful针对此列出的下方的解决方案,但似乎有效 在wicket 6.7.0,我猜?
import org.apache.wicket.ajax.attributes.{ThrottlingSettings, AjaxRequestAttributes}
val detail = new TextField("detail", new PropertyModel[Meeting](meeting, "description"))
detail.add(new AjaxFormComponentUpdatingBehavior(("keyup")) {
protected def onUpdate(target: AjaxRequestTarget) {
meeting.salvarMeetingInfo(meeting)
}
protected override def updateAjaxAttributes(attributes: AjaxRequestAttributes) {
attributes.setThrottlingSettings(new ThrottlingSettings("thr", Duration.milliseconds(800.0)))
super.updateAjaxAttributes(attributes)
}
})
item.add(detail)
//Error messages
scala: object attributes is not a member of package org.apache.wicket.ajax
import org.apache.wicket.ajax.attributes.{ThrottlingSettings, AjaxRequestAttributes}
^
scala: not found: type AjaxRequestAttributes
protected override def updateAjaxAttributes(attributes: AjaxRequestAttributes) {
^
但是我需要使用wicket 1.4,所以wicket 1.4上面的代码有类似的实现或解决方案吗?
感谢有人帮助我。