Skip to main content
10-Marble
June 28, 2023
Solved

CustomTableBuilder WTArrayList(QueryResult) custom columns ?

  • June 28, 2023
  • 1 reply
  • 1638 views

When creating a CustomTableBuilder with "return new WTArrayList(PersistenceHelper.manager.find((StatementSpec) querySpec)" for the OOTB Default tables, am I able to add custom columns and how?

 

The question aims to the return value not the TableConfig and ColumnConfig, but rather how to fill the columns.

 

 

 

Best answer by HelesicPetr

Hi @phoffmann 

There are many resources about data utility. 

https://www.ptc.com/en/support/article/CS360977

PetrH

1 reply

HelesicPetr
22-Sapphire II
22-Sapphire II
June 29, 2023

Hi @phoffmann 

 

What custom Colum means? All columns are managed in a TableConfig and the value is shown by DataUtility. . 

The return statement returns the objects from the system and that objects are shown in the table. There is no necessary to think about custom column.

 

PetrH

phoffmann10-MarbleAuthor
10-Marble
June 29, 2023

Hi @HelesicPetr 

thank you very much for the response.
Using the QuerySpec to find Objects and display them in the table is working fine.
I like to add a custom Column (String) for an additional Information regarding the object.

When the table is rendered a validation is done and I would like to add the result of the validation for each Object in a custom column as String.

HelesicPetr
22-Sapphire II
22-Sapphire II
June 29, 2023

Hi @phoffmann 

I understand, so you need to add the column parameter in the TableConfig  and set your own data utility that will care about the value.

So if the validation result is saved in database you will just read it from DB for each row. If is not saved in DB, you will need to validate it for each row in the datautility 

 

There is another way to save the results in a request in commandBean, but it does not work for every situations.

 

PetrH