Skip to Content
0
May 06, 2010 at 05:55 AM

Writing WdDoModifyView and File Download Code from Java to ABAP

34 Views

Hi,

I am re-writing a WD JAVA application into WD ABAP application.

In WD java application I have a button as a table cell editor and on click of it, I get reference of selected element in action handler method.

I have written this code for this:-

public static void wdDoModifyView(IPrivatePKmView wdThis, IPrivatePKmView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
  {
    //@@begin wdDoModifyView

	if(firstTime){
		IWDButton l_btnDownload = (IWDButton) view.getElement("btn_DownloadTableCell");
		l_btnDownload.mappingOfOnAction().addSourceMapping("nodeElement", "p_kmFolderEle");
	}
    //@@end

And this how the action handler looks like:-

  public void onActionaDownloadTableCell(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, com.sap.tc.webdynpro.progmodel.api.IWDNodeElement p_kmFolderEle )
  {
    //@@begin onActionaDownloadTableCell(ServerEvent)
    IPrivatePKmView.ICtx_vn_KmFolderDataElement l_kmFolderDataEle = (IPrivatePKmView.ICtx_vn_KmFolderDataElement)p_kmFolderEle;
    wdThis.wdGetPLdaCompController().mTableCellDownload(l_kmFolderDataEle.getLinkName(), l_kmFolderDataEle.getLinkValue());
    //@@end
  }

How do I achieve this in WD ABAP?

Thanks and regards,

Amey