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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Wrapping text in PDMLink JSP tables

avillanueva
22-Sapphire II

Wrapping text in PDMLink JSP tables

I wanted to write this down and share it while its fresh in my mind. In
writing my own report page, I had the need to show some columns as
wrapped text without having them truncated with the ... block. Most of
this was accomplished with CSS modifications. My page has 4 or more
custom tables with custom beans being displayed. I found that setting
"useJSCA" to false gave me the best, consistent output. NOTE: Firefox
and IE7 did render my table very differently (Damn you Bill
Gates..err...Steve Ballmer!). My company uses IE7 but I made extensive
use of Firebug for Firefox to inspect the elements and see where the
styles were originating from.



Issue: Remove truncation

Solution: CSS -

.jstdotspan {

display:none;

width:0;

}



Issue: Cell output typically is inside of a TD element with class "c".
Some really long data like descriptions have a table inside of them with
class "cell_long_text_width" and a single TD with class
"cell_long_text". The default data utility controls which output you get
based on some threshold, 200 I believe. In my case, I wanted to force it
for certain columns in certain tables.

Solution: Custom Data Utility and CSS -

.cell_long_text {
3 REPLIES 3

Hello Antonio,



I know this is a very old thread but was the only one in this entire forum talking aboutDefaultDataUtility class, I am trying to use it to remove the iteration number from the UI, a customer does not use it at all, he is all about versions in his process, so I tried it using the attached class, which is being applied but the iteration number is still there, do you know if that is possible?



Guilherme Rocha


Dear Guilherme,

You will not be able to do this, in our experience, without a lot of low level ootb changes, which will push up the cost of ownership of your application unacceptably. The history of Windchill means that the UI is a mixture of techniques and there is a great deal of different places this is added, JCA and data utilities are only one; imagine reports, applets etc etc. Users do not like inconsistency and so unless you have a very limited use of the UI then you maybe should re-consider.

Best Regards,
Simon

You want to customize in a way that is less invasive to the native vendor
provided code. That way, you can remove it easily at any time. The data
utilities may or may not be the best way.



Assuming the revisions are all alphabetic and iterations are numeric, using
the banner.txt in customizer's guide, you could implement a JQuery script
to scan the content of the page and filter out the iteration based on the
HTML source.



If you wanted to get real fancy, filter the html responses through a tomcat
filter. You'll get the HttpServletResponse with the content and you can
cut out the characters that way again based on pattern so as to not make it
overly complicated.



Both places would not catch everything possibly, so another way might be to
override the IterationIdentifier method that returns the value and see if
its blows up during testing. A debugger would work here nicely.



My suggestion is to not to do any of this and instead encourage adoption.
Revisions can take a long time to move from one to the next, other little
things can be traced with iteration and put to good use.










Announcements

Top Tags