Skip to Content
author's profile photo Former Member
Former Member

link to java function within pdv column?

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

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 27, 2004 at 01:04 PM

    ... in other words... how can I create a Link in the Java Code which calls the Java Function from the JSP Page? cheers Jens.

    Add comment
    10|10000 characters needed characters exceeded