Wicket onchange event returns the old value

I am attaching an ***onchange*** event using the Wicket framework. The problem is that the old value keeps being returned as the event is fired (Which makes sense). *See code below*. What I want to do is get the "***new***" value of the select / dropbox after it has changed. **How can I achieve this?** dropdown.add(new AjaxEventBehavior("onchange") { /** * * @param target */ @Override protected void onEvent(AjaxRequestTarget target) { Component component = getComponent(); DropDownChoice dropdown = (DropDownChoice) component; String value = dropdown.getValue();//This brings back the old value… } })

以上就是Wicket onchange event returns the old value的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准