Editable Grid - SelectBox / Remove lines

1
0
-1

Hi Community,

So, I have a new task here at office that consists in showing at the screen an 'Excel Like' table. This table must be filled, each line, with some DB stuff. No big deal so far.

However, there is always a problem. :)

One of the steps of my process must be a manager who see this table and 'erase' some lines to send it to a supervisor who will 'erase' another lines. Then there will be a final approval.

The best thing I've found to do that is by an Editable grid. But I have 2 problems:

1 - I can't find a way to 'erase' the lines in the middle of the grid, only the bottom ones.

2 - I can't set a 'selectbox' to at least 'show' which lines should stay to next step and the ones that should be removed.

Is there any way to do such thing?

Any other ideas for my problem?

Thanks in advance.

2 answers

1
0
-1

Hi Pablo!

Thanks for your answer!

I got your point. Good idea! But... how am I supposed to delete only the selected lines? Any groovy stuff to do so?

Thanks again.

Comments

Submitted by Pablo Alonso de... on Wed, 02/05/2014 - 13:59

Rafael,

When you call for first time the connector you will populate a List (I supose) so when you want to select rows and click on submit you can use a groovy script(or java) to store in the same list removing the selected lines...

http://docs.oracle.com/javase/7/docs/api/java/util/List.html#removeAll%2...

In subscription you can do the same but without changing yet the list only the available values of the table widget

Cheers

Submitted by rafael.vianna on Wed, 02/05/2014 - 14:17

Pablo,

Indeed, I do populate a List with the content.

However, this is kinda easy since I'm not a java/groovy developer. The hard part is to get the selected ones only.

I'll try to dig something from the documentation you sent me, thanks. :)

If you find any sample code about how to do that, please let me know. =D

Thanks again.

Submitted by Pablo Alonso de... on Wed, 02/05/2014 - 14:27

Rafael,

To allow selection on table you need to check one checkbox... )

Submitted by rafael.vianna on Wed, 02/05/2014 - 16:51

Pablo,

I meant that hard is erase only the selected ones. The code to make the next screen load only the ones that were not selected in this first step. :)

Thanks again.

Submitted by Pablo Alonso de... on Mon, 02/10/2014 - 14:22

The groovy script can be this...

return myOriginalDataTable.removeAll(field_myTableWidget)

1
0
-1

Rafael,

You can use the table (not the editable one) and allow selection.

In subscription you can add a dependency to remove those lines (from database if needed) and update the table without submit the form (so you can erase one by one if needed) and then in the next task (supervisor one) you can do the same

If you are in community you can do the same but in several steps, in the first task you select rows to delete, after submit you remove it, and in next task you show to supervisor the table update with same behaviour

Cheers

Notifications