Skip to Content
0
Former Member
Jan 26, 2004 at 06:54 PM

link to java function within pdv column?

37 Views

Hello,

does anybody know how to implement an onClick()-Event within a PDV-Column?

I use the PDVJspDynPage API and tried the following:

protected void afterPdvExecuteSource(IDataViewer pdv)

{

// get data from PDV object

try

{

IData myData = pdv.getData();

// add a new column displaying status icons

IFieldInfoItem fieldInfo = myData.addColumn("DETAILS");

fieldInfo.setHeaderText("Details");

fieldInfo.setDataType(DataType.STRING);

fieldInfo.setDisplayType(TableColumnType.IMAGELINK);

fieldInfo.setLinkFieldName("DETAILS_URL");

//fieldInfo.setLinkClickTarget("detailImageClick");

// set values for images by providing URLs

for (int i = 0; i < myData.getRowCount(); i++)

{

DataString linkURL = new DataString("detailImageClick");

DataString detailPicURL =

new DataString(productCatalogSegmentBean.getCmPath() + "details.jpg");

myData.setValue(i, "DETAILS", detailPicURL);

myData.setValue(i, "DETAILS_URL", linkURL);

System.out.println("

linkURL:" + linkURL + "

");

}

}

catch (SourceException ex)

{

ex.getMessage();

}

}

The link is working but opens a blank page which tries to open the page "detailImageClick" instead the onDetailImageClick() function... any ideas?

Cheers Jens