Skip to main content
12-Amethyst
July 21, 2024
Solved

HTML formatting in Windchill 13 DataUtlity

  • July 21, 2024
  • 1 reply
  • 1587 views

Version: Windchill 13.0

 

Use Case: HTML table format issue for data utility after upgrading to Windchill 13


Description:

Hi all

 

I have a custom data utility for an attribute that returns a HTML snippet to create a table to be displayed in the Details page of Windchill 12. Recently we upgraded to Windchill 13 and since then the table has formatting issues. To be specific each cell has their own width whereas in Windchill 12 it was same as the cell in header row and in addition rows aren't separated but lined up one cell after the another. Anybody aware of this issue or faced anything similar?

Best answer by MV_10441462

Yes. CSS has been overridden the table display style to inline-block and that is the reason for this issue. Setting the attribute display value to revert worked partially for me. This is because default css in WNC 13 loads the display style as inline-block for classes attribute-group panel and attribute value.

1 reply

HelesicPetr
22-Sapphire II
22-Sapphire II
July 22, 2024

Hi @MV_10441462 

It would be very usefully if you share your code. if you wanted a help.. 

PetrH

12-Amethyst
July 22, 2024

Hi @HelesicPetr The HTML snippet is as below:

<table style="border: 1px solid #ddd; text-align: left; border-collapse: collapse; width: 100%;">
<tr><th style="border: 1px solid #ddd;">A</th><th>B</th><th style="border: 1px solid #ddd;">C</th></tr>
<tr><td style="border: 1px solid #ddd;">test</td><td style="border: 1px solid #ddd;">desc</td><td style="border: 1px solid #ddd;">sample</td></tr>
</table>

 

The above snippet will be built dynamically and an object of com.ptc.carambola.rendering.HTMLComponent will be created and returned as output for the getDataValue() of the datautility.

 

The output in WNC12 is 

MV_10441462_0-1721633057249.png

But the same code in WNC13 returns

MV_10441462_1-1721633125421.png

Thank you.

HelesicPetr
22-Sapphire II
22-Sapphire II
July 22, 2024

Hi @MV_10441462 

Ok, I would try to check the source html page in the browser and check what is different and where the values are lost.

The point could be that some css style can rewrite your style and so on. 

Also there can be some change that the style has to be written different way using newer option.

All what I have mentioned are my ideas what could case it. 

If I find a time I will try it

 

PS now I can see that there is trouble with the table definition. because all values are in one row. 

PetrH.