cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

HTML formatting in Windchill 13 DataUtlity

MV_10441462
12-Amethyst

HTML formatting in Windchill 13 DataUtlity

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?

ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

5 REPLIES 5

Hi @MV_10441462 

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

PetrH

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.

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

Announcements

Top Tags