Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Hello all.
I am trying to display custom HTML fragment inside the OOTB attribute panel. I already created a controller that generates the fragment.
Can I use this controller to substitute attribute value using Data Utility?
As an example I could use com.ptc.carambola.rendering.HTMLComponent to display custom HTML in the attribute:
HTMLComponent hc = new HTMLComponent("<a href='www.google.com'> Goole Link </a>" );
But I need help figuring out how to dynamically generate that HTML.
Windchill R10.1
Any help is very much appreciated.
Vitaliy.
If your custom HTML fragment is only link then you can use
com.ptc.core.components.rendering.guicomponents.UrlInputComponent
Hi Kaushik,
I am also trying the same.In table Builder ,i need to display a Link. I m working on UrlInputComponent. Can you please elebroate how to achieve through UrlInputComponent.
What i am trying is ," In build component method,i am passing a UrlInputComponent instance: .but in table builder,its displaying as a string.
Can you please guide me ,
HI Chan,
Use this snippet.Hope it may help you.
UrlDisplayComponent url = new UrlDisplayComponent();
url.setLink("www.ptc.com");
url.setColumnName("columnName");
url.setLabel(part.getName());
url.setLabelForTheLink(part.getName());
return url;
Regards,
Kaushik
Thanks Kaushik..It exactly matchs my requirement..
you are welcome chan.
From table builder we populate the data in a table.
And after that using Data Utility you can make it hyper linked or highlighted or icon with link etc.
Regards,
Kaushik
Just to add to the discussion, it is more normal to use an icon to show a link rather than text with a link so the IconComponent is another key item in armoury here. A good tooltip is essential so the user can see what the icon means, and an icon saves on real estate usage. A GUIComponentArray can display a number of components in the same data utility such as a number of icons.
Regards and Happy Holidays,
Simon