0
final TextField<Double> regularPrice = new TextField<Double>("regular", new PropertyModel<Double>(listItem.getModel(), "price"))
{
private static final long serialVersionUID = 1L;
@Override
protected void onConfigure()
{
super.onConfigure();
setEnabled(cashflowStatus.compareTo(CashflowStatus.M_MANUAL) < 0);
}
};
listItem.add(regularPrice);
regularPrice.add(new AjaxFormComponentUpdatingBehavior("onChange")
{
private static final long serialVersionUID = 1L;
@Override
protected void onUpdate(AjaxRequestTarget target)
{
Double updatedValue = listItem.getModelObject().getPrice());
}
});
변경시 새로운 업데이트 된 값을 얻으 려하지만 모델에서 이전 값을 얻고 있습니다. 모델이 업데이트되지 않으며 새로운 업데이트 된 값을 제공해야합니다. 위의 코드에서 잘못된 점과 업데이트 된 값을 얻는 방법에 대해 알려주십시오.wicket textfield/model에서 업데이트 된 값을 얻는 방법