![](/img/trans.png)
[英]Wicket: Using a editable Inline-label inside a ListView and update a model after change this label value
[英]Add TextField in a listView with the feature to update the model on exit using wicket 1.4
我正在嘗試在listView中添加TextField,以便可以在退出時或在更新文本后更新模型。
對於此列出的波紋管,我已經收到了一個很好的解決方案,但似乎可以在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的代碼有類似的實現或解決方案?
謝謝能幫助我的人。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.