Skip to main content
12-Amethyst
January 9, 2024
Solved

Data Utility for attribute as a column in a Table View

  • January 9, 2024
  • 2 replies
  • 4051 views

Hi All

 

I want to configure a Custom Data Utility to populate the value for an attribute that will be displayed as a column in a Table View.

I tried the getDataValue() and getPlainDataValue() methods of DefaultDataUtility and AttributesTableDataUtility but they are not getting triggered when the Table View with the Attribute column is rendered. It works only when the attribute is placed in a Layout.

Any suggestion on how to achieve the requirement?

@HelesicPetr 

 

Best answer by Ajit_Kulkarni

Hello,

 

So the workspace table is not designed with MVC. Simplest way to know the tables designed with MVC is to append &jcaDebug=true at the end of the URL. You will see a lot of lady bugs. 

 

Since workspace table is not designed with mvc , data utility will not  work on that table. 

 

Thanks and Regards

Ajit

 

2 replies

16-Pearl
January 9, 2024

Hello,

 

If possible , could you give more details ? Which table and which column you want to set the default value? 

I will give a try. 

 

Regards

Ajit

12-Amethyst
January 9, 2024

Hi Ajith

 

I want the attribute column(Test Attr) in Object List Table of Workspaces.

MV_10441462_0-1704816161086.png

And I do not want to set Default Value, the value will be calculated using a DataUtility.

16-Pearl
January 9, 2024

Hello,

 

So the workspace table is not designed with MVC. Simplest way to know the tables designed with MVC is to append &jcaDebug=true at the end of the URL. You will see a lot of lady bugs. 

 

Since workspace table is not designed with mvc , data utility will not  work on that table. 

 

Thanks and Regards

Ajit

 

HelesicPetr
22-Sapphire II
22-Sapphire II
January 10, 2024

Hi @MV_10441462 

How do you assign the datautility to the attribute? 

 

Usually If I want data utility is used everywhere I set the configuration in service.properties

selector is always the internal ID of the IBA attribute

xconf example>

 

<Service context="default" name="com.ptc.core.components.descriptor.DataUtility"
targetFile="codebase/service.properties">
 <Option cardinality="duplicate" order="1" overridable="true"
requestor="java.lang.Object"
selector="ORG_NAME"
serviceClass="cz.ext.OrgDataUtility.NameDataUtility"/>

 

PS: workspace table is not easy to customize but it is possible.  

PetrH 

12-Amethyst
January 10, 2024

Hi @HelesicPetr 

 

I tried both components.dataUtilities.properties and service.properties. Still not getting triggered when the Object List Table is rendered.

HelesicPetr
22-Sapphire II
22-Sapphire II
January 10, 2024

Hi @MV_10441462 

As I see, you want to use the Datautility in the workspace.

You can't. 

PetrH