Good Day,
I'm using BPM Community Edition 6.2.1
I have a db query which would result in 12 column/fields with multiple rows/records. I would need to put these information into an editable grid/table.
How do I put these in the editable grid/table?
Thank you
Hi Alfred,
an editible grid requires a list of lists as the initial data for display. you can populate that list of lists manually from the resultset that is returned from the query, or you can (in some cases) just use the resultSet - effectively casting a resultset to a List of Lists. There are times when this will not work, depending on the data types that are returned in the resultset.
The point of making the grid editable, i guess, is so that you can make a change to a record and have that record written back to the DB. correct?
This is something you have to do manually. Using the following steps:
1. Save the resultset to a list of lists. Make sure that the resultset has a unique key value.
2. Display the list of lists in the editable grid.
3. Save the editable grid to a different list of lists.
4. after the form is submitted, compare the list of lists from 1. to the list of lists from 3. If there are any differences, then run an update query / api call on the appropriate record using the unique key from 1.
-declan
hi @DeclanMcGarry,please can you help me and be more explicit this is exactly what i want to do!
Hi, as a list of lists generated? I need to display in an editable table product id and product name. Both data I bring a Mysql database
On what point do you need more details ?
for now im just in the step 2. Display the list of lists in the editable grid.
i connected my bonita step to MS sql 2008 db ,i test it and it works great .
my query return 10 *12 table how can i take the result and display it in a table .
im confused with the widget which one should i use ?
thank you
If you want an editable grid, you need to use the “Editable grid” widget.
Then, in the “Data” tab of this widget, you set the first field with your list of list variable.
how to create a list of list variable ??
In the “Data” tab of your process, add a variable. In the “Data type” of this variable, choose “Java Object”. By default, the java object is a list, so you don’t need to change the Class.
Don’t forget to set fill this variable with the output of your sqlServer connector.