Hi,

You can use JavaScript to make the calculations. Attach event listener to
the input fields (or their parent if you know how to use event delegation)
and when they change just update the value of the total field.

You can also use AjaxFormComponentUpdatingBehavior to do this with Wicket.
But this will do Ajax call to the server side, so it will be sub-optimal.

P.S. Please use [email protected] for your questions.


On Mon, Jan 21, 2013 at 6:22 AM, lawrence <[email protected]> wrote:

> Hi,
>
> I am new to wicket. I want do a simple calculation on wicket table. On the
> image you can find Cost, no of pax and no of days and total columns. I
> would
> like to dynamically(when number is entered in textbox) calculate cost * no
> of pax * no of days and put the total in total's column and sum all the
> total into grand total. I am really confused how to do this.
>
> <http://apache-wicket.1842946.n4.nabble.com/file/n4655557/calculation.png>
>
> Thank you
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Dynamic-Calculation-on-Table-tp4655557.html
> Sent from the Forum for Wicket Core developers mailing list archive at
> Nabble.com.
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Reply via email to