Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
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?
Solved! Go to Solution.
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.
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
But the same code in WNC13 returns
Thank you.
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.
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.
Hi @MV_10441462
Try to do not use "th" element. Use always "TD" for the row even though it is head row.
Try it to change it. .
or there may miss the scope definition (scope="col" or scope="row")
PetrH