cancel
Showing results for 
Search instead for 
Did you mean: 

how to create dynamic table user interface in forms ?

rahul1
Champ in-the-making
Champ in-the-making
Hi Folks,

Just wondering in activiti task-forms how does one create dynamic table user-interface ( the one in which user can add rows, delete rows, edit any row) ? and how would you store that data back into process variable? This is a very common UI requirement across business processes like expense-claims, employee onboarding, leave-request etc. Any inputs, suggestions, sample code will be appreciated ?
6 REPLIES 6

tombaeyens
Champ in-the-making
Champ in-the-making
Can you elaborate what exactly you mean with dynamic table user-interface?

Do you mean that you want to specify a number of properties and their type in a human task activity inside a process and that Activiti Explorer then shows a form in table layout to get the user input for that task?  Or something else?

rahul1
Champ in-the-making
Champ in-the-making
more like if i define an array or map type and then activiti explorer shows a form in table layout in which the user can add rows of data, edit rows, delete rows and then finally submit the table of data back to process..thanks

jbarrez
Star Contributor
Star Contributor
The display of the table can be done by using basic freemarker (example from wikipedia):

<#list messages as m>
  <p><b>${m.from}:</b> ${m.body}</p>
</#list>

However, if you want to delete, update, etc, rows, than you would need a more powerful component. I dont know if it would be possible with some javascript framework for example.

davidcognite
Star Contributor
Star Contributor
Hi Guys,

A couple of answers:

Joram: The YUI library we use in Explorer does indeed support these features, see examples at: http://developer.yahoo.com/yui/examples/datatable/dt_rowdatamod.html and http://developer.yahoo.com/yui/examples/datatable/dt_cellediting.html

Rahul: No, the client side element of the forms component within Explorer does not allow for user editable tabular data at the moment. To add support you'd need to handle both the client side elements (achieved using YUI DataTable and a standard html table output from the ftl) and the server side validation and storing of that data.

jeetesh
Champ in-the-making
Champ in-the-making
Please any one tel me how to create dynamic table user interface in forms

frederikherema1
Star Contributor
Star Contributor
Please do not revive 2 year old threads -  instead create a new one.

Anyway, to answer your question: you're question is very vague. Maybe share the technology you're using, your actviti setup and what you exactly mean with "dynamic table". Also, what have you already tried?