How to retrieve values from a gx table.

Hi,
I need to consolidate few screens. One screen has a table. I have populated all the fields and table data using gx_fillform. The table is editable and user can add new row (I am adding a new row by java script) to that table. I am able to access the fields and save it but cannot access the table values.

  1. How can I retrieve values from that table?
  2. How can I assign the table values to an input variable (structure) of a path in order to send it to mainframe?

Please help.
Please suggest if I am doing something wrong and this task can be done easily by some other way. I am using ApplinX8.1

One more problem that I wanted to discuss is when I am populating values using gx_fillform the table has empty rows in it. I have defined the table on the screen which has 10 rows and I have also checked the checkbox for deleting empty rows. So if the result data structure has 5 rows then on the web my table has 10 rows, 5 rows with data and 5 empty rows. How can I remove these empty rows as its not required??

Thanks.

Hi Kumar,

If you view the page source in the browser you’ll notice all of controls inside the table have been given names such as:
ControlName_000 (first row)
ControlName_001 (second row)
And so on…

You can retrieve it from the Java Code like this:

String str = getTagsAccesor().getTagContent("ControlName_0xx");

Then you can pass it to your input structure just as you normally would.

myStructure myNewStruct = new myStructure();
myNewStruct.setControlName(str)

Just to make sure we’re on the same page, you are going to have to generate a procedure client for that path procedure otherwise you will not be able to use your path’s “structure input”.

Hope this helps
Ohad[/b]