Deprecation of method getTable(String)

For legacy applications containing Paths and Tables (from Applinx 5.2.5), we have been getting the following warning:

“The method getTable(String) from the type GXIClientBaseObject is deprecated.”

Here is a partial code list:

public void gx_fillForm() throws GXGeneralException{

	GXPathResponse res = getGXSession().executePath("BulkI2_Collection");
	gx_fillForm(res.getScreens());

	GXITable gx_table = getGXSession().getTable("BulkI2_Collection");
    getTagsAccesor().setTagTable("BulkI2_Collection",gx_table,getGXAppConfig().getTableBuildConfig(),this);
	getSession().setAttribute(EXCEL_TABLE_SESSION_KEY, gx_table);

}

So, 2 questions:

  • Is there an easy way to fix this? (bet not)
  • How long will the deprecation warning exist until it no longer works.

You should be able to fix this using:

getGXSession().getScreen().getTables()[0]

Let me know if this doesn’t help.

Gadi

Looks good so far. I have 677 modules to patch.
Thanks for your assistance.

Spoke too soon. With a collection table utilizing multiple screens, this fix only brings back the first screen’s data.

Are you using a path to collect the table’s data?

It is a path-based table in Applinx 5.2.5 unconverted to 8.

Hi Joe,

Unfortunately we don’t offer any automated migration from path-based-tables to path procedures.
You will need to create the new path procedure manually. The table needs to be defined on the screen, then you’ll need a path that goes through all the table’s screens and collect it.
You need to add this new path into a procedure group entity and generate a procedure client from the procedure group using right-click.
Once you have the procedure client generated into your project you can use it to collect the path response and use the “GXBindUtil.entityArrayToGXITable” utility to collect the content of the table into the GXITable object.

You can see an example of this in our composite demo web application, in the BrowseCustomers1.java file (inside the gx_fillForm() method).

If you need further clarifications let us know.

Regards,
Gadi