I’m extremely new to Grails and Groovy and even web development in general, so if this question seems too asinine, please bear with me, I’ve always been focused up-to-now on desktop development.
I’m attempting to create a web application that allows users to move objects around (drag-and-drop) on their screen from one column to another. Imagine something that allows users to organize things into various groups and each group has it’s own column. Also, the users should be able to create or delete any groups they’d like. (The creating/deleting groups part I’ve gotten taken care of in the Groovy code).
My question is, how, in the view/HTML code, do I get the site to be dynamic in terms of creating the grid? I need one column for each group, but the dataset of groups that exist will not be static, so in theory I will never know how many columns I actually need. I’ll also need to do the same thing for the rows, but I expect that doing it for the rows would be more or less the same as doing it for the column.
Thanks for any help you can provide. Cheers!
UPDATE:
I’m seeing Groovy used in the view to iterate over a list of items and create a dynamic bulleted list like this
<g:each in="${ group }" var = "group">
<li> ${ group.name } </li>
Should I just try something like that to dynamically create a <table> object? That seems like it’d work, but might not be the best way to go about it.
Take a look at JavaScript, jQuery and more specifically, jQuery UI Draggable and Droppable.