Home > FAQs > Cookbook > Tabular inputs with HashMap


I have a need to enter tabular data, like marks from a list of examination candidates.

This is how it's done :

the mark.vm file..

the SaveMarksAction


The resulting vm file is rendered as

Webwork will populate the marks into the Map marks via

whereby you can get the list of candidateIds via

and the individual marks via

Possible enhancements

Couple tabular inputs with some sortable table component (javascript, client side)


DisplayTag (server side)

I believe there's some discussion on the mailing list about using Ognl to handle it automatically. I didn't follow it in detail, but from what I know, (do correct me if I'm wrong) the Ognl method is not available yet. The above works for now.


Feedback, comments and suggestions on better methods to perform the same function are welcome. If there's a simpler way, or a customised component to handle this tabular input automatically, I believe it'll be very useful.