Как это будет реализовано с калиткой.Когда одна цифра, введенная во второе текстовое поле автоматически, в первом текстовом поле появляются такие же изменения: мой код:
txtLtpPriceCE.add(new AjaxFormSubmitBehavior("onkeyup") {
@Override
protected void onSubmit(AjaxRequestTarget target) {
System.out.println(txtLtpPriceCE.getInput());
showCalculatorModel.setTxtIntrinsicValueCE(txtLtpPriceCE.getInput());
target.addComponent(txtIntrinsicValueCE);
}
@Override
protected void onError(AjaxRequestTarget target) {
throw new UnsupportedOperationException("Not supported yet.");
}
});
Мой компонент:
final TextField txtLtpPriceCE = new TextField("txtLtpPriceCE",
new PropertyModel(showCalculatorModel, "txtLtpPriceCE"));
item.add(txtLtpPriceCE);
final TextField txtIntrinsicValueCE = new TextField("txtIntrinsicValueCE",
new PropertyModel(showCalculatorModel, "txtIntrinsicValueCE"));
item.add(txtIntrinsicValueCE);
txtIntrinsicValueCE.setOutputMarkupId(true);