I need to make a calculator like this: <input text field> x <some fixed float value> = <the result> <input text field> x <some other fixed float value> = <the other result> ... and so on for a variable number of rows...
I need the user to input a number in one of the input text fields. I need the other input text fields to update themselves while the user types the number digits, so that all input fields show exactly the same number at any time. I need the results to update themselves also while the user types the digits. here is my html snippet <wicket:container wiker:id="repeating"> <input name="num" type="text" wicket:id="num" value="10,00"></input> x <span wicket:id="fixed">5.2</span> = <span name="total" wicket:id="total">52</span> </wicket:container> and Java code: Label fixed = new Label("fixed", myFixedNumber); add(fixed); final TextField input = new TextField<>("input"); add(input); input.add(new OnChangeAjaxBehavior() { @Override protected void onUpdate(AjaxRequestTarget target) { // this never gets called } }); Label total = new Label("total"); add(total); The problem is that onUpdate() never gets called. Please note that I'm not using any <form> because I do not need any (I don't need the user to submit anything), but I need to make calculations server side because the fixed value is known there. Is it possible to have onUpdate() called without using a form? if yes, what am I doing wrong? --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org