简体   繁体   中英

Hyperlink in pentaho cde table component

I have created a table component in Pentaho in which I add a column with a hyperlink of the format https://www.aaaa.com/id . It correctly shows in the table.

Now I want to create another hyperlink in the same table, but it has format https://www.aaaa.com/probe&bbbbb%20&bbb$probe2 .

How can I make it show only the field and not the path?

I have achieved something similar but clicking anywhere in the row the page is opened while I want it to only open the hyperlink.

you have to write a function under click Action under advance property something like below. tableData[e.rowIdx][1] is a column name where you have to specify the column where you have to specify the click event.

function testClick(e) {
var id = e.tableData[e.rowIdx][1];
window.open('/pentaho/api/repos/%3Apublic%3Asample%3Adashboards%3Aname.wcdf/generatedContent?p_site='+id,"_self");

}

also you can write CSS to put underline and hover change color.

also put below code for all the table columns where you don't want click event.

#tbl_waste_overviewTable tbody tr td:nth-child(2) {
    pointer-events: none;
}

You should check the column name you want to achieve the click action on as below

function(obj) {
   if(obj.category == 'Desired Column'){

 // perform desired click action below
 }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM