Skip to main content
Jan 9, 2024 3:53 PM UTC
Solved

Data Utility for attribute as a column in a Table View

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 

 

Jan 9, 2024 4:17 PM UTC

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

 

9 replies

Jan 9, 2024 3:57 PM UTC

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

Jan 9, 2024 4:04 PM UTC

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.

Jan 9, 2024 4:17 PM UTC

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

 

Jan 10, 2024 6:51 AM UTC

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 

Jan 10, 2024 7:34 AM UTC

Hi @HelesicPetr 

 

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

Jan 10, 2024 7:35 AM UTC

Hi @MV_10441462 

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

You can't. 

PetrH