How to make button as one of the column inside table component in CDE Pentaho? - pentaho

I am trying to make the table component with the button inside the table column in CDE Pentaho. How can it be achieved?

I guess it will need some work.
In the Draw function of your table, you may put some javascript to manipulate the DOM and add your button : as far as I remember, the draw function receives a parameter that is a structure with the column and row index of the current cell.
Try first this code in the draw function :
function(paramdraw) {
console.log(paramdraw);
}
and look for the content of paramdraw iin the console.
Maybe there is a better way to do it...

What we do here usually is something like editing the query on the datasource with a column that output the HTML code for a button.
SELECT
ID,
NAME,
concat('<input type="button" onclick="alert(',ID,')">click me</input>') as button
FROM
foo
WHERE
bar='bar';
That should display a button. If you are not using a query as datasource, but a transformation the idea is the same. Just make the output contains a string that when interpreted by the browser is a button.
Hope it helps. =)

Related

Selenium/Razor App: How to get a button ID from first row inside list?

I have a list with several rows and columns. Each row has a button called "Show Trail Details".
During the test, i click twice on the "Date" column title, to have the latest entry in the list in the first row.
I need to get the ID of the button inside the first row.
The IDs are changing all the time. So its either:
//tbody/tr[1]/td[6]/button[1]/span[1] or //tbody/tr[1]/td[4]/button[1]/span[1] and so on.
I tried to copy the HTML, but it looks weird when i run the html code.
The inspect looks like this:
Is there any way how to get that ID?
Thanks!
I need to get the ID of the button inside the first row.
But there's no "id" attribute on either the td, button, or span elements?
Or do you mean the '_b1_685ddfc4-de...' attribute?
If the id is just a means of getting access to the first button then you could just use something like:
WebElement firstShowTrailDetailsButton = driver.findElements(By.cssSelector("td[style='text-align:right'] button.mud-button")).get(0);

Kendo-Vue Hide button in column?

i'm struggling with this one, i need to hide a button, i mean a command button based on the value of a column.
i grab the following example from kendo pages, i would like to show/hide the button "View Details" based on the "Discontinued" value.
i've already tested with :visible or :hide properties without success.
https://stackblitz.com/edit/e1fre3
does someone know how to get this working?
The command option is expecting string or array so this is an updated stackblitz example that worked at my side - https://stackblitz.com/edit/e1fre3-wnzfer?file=index.html

I'm trying to reference the label value in my tab in Oracle Apex 5

I have several tabs in my APEX application. The first is "Arlington". I want to reference that in my query. In other words I want to have a query that displays data where the city = whatever the tab might say. In this example, it would obviously be Arlington. Am I being clear? I know there is a way to do it. I know my tab name is T_ARLINGTON. But I don't know how to reference the actual text of the tab. Thank you!
Simply create one page item and mention the tab title like ( &P1_NAME.), now refresh the page the text item value should be applied the tab title. this method showing the dynamic tab title...

selenium ide : click button with class on specific row in table

I have an html table wich contain multiple lines.
At the end of each line, the last row contain multiple button. I would like to click on the remove button of the first line.
I tried this Xpath code but the element in not located :
There is a mistake somewhere in my xpath query :
//table[#id='tableTest']/tbody/tr[8]/td[8]/a[#class="remove"]
Your query looks pretty OK, but there is no HTML code so we can just guess what happen. What about the number 8?
Try to use XPath axes. For example locator could look like this:
//table[#id='tableTest']/tbody/tr[1]/descendant::a[#class="remove"]
This should find the remove button in the 1st row whenewer it is.
Click the button of the first line... which I think you mean first row?
//table[#id='tableTest']/tbody/tr//a[#class="remove"]
That SHOULD find the first tr (row) of your table and select the href with the class remove. But it's not going to ensure it's the last cell, which if that's vital you'll need to use something like //table[#id='tableTest']/tbody/tr/td[last()]/a[#class="remove"]
Also, if you attach the html snippet this becomes much easier for many of us to answer.

innerHTML doesn't work properly in dynamically taken HTML from another element

There is a table that js creates dynamically.
A button triggers a function that get the tables first rows innerHTML.
And replace its with
While raplacing it takes style informations as is to the divs.
After these i add some extra styling to div with replace() too.
But that function creates and fills with . Is it about percentage width or another thing?
The sample code is spagettied too much. So i couldn't paste here.
I am using HTA (HTML Application) and vbs+javascript.
Thank you in advance
Çağlar