cancel
Showing results for 
Search instead for 
Did you mean: 

In popup window, url is not getting linked to New popup window

Former Member
0 Kudos

Hi all,

I have a requirement to print the table datas on click of the button. For that I

have created html format file in the webdynpro java. when I click on the button

a new blank window opens but the url is not linked to window.

Here are following lines of code I have written.

try{

final String formattedStr = xml_file.toString();

final IWDCachedWebResource resource =

WDWebResource.getWebResource(formattedStr.getBytes("UTF-8"),

WDWebResourceType.HTML);

resource.setResourceName("HTML_inline.html");

linktoFile = resource.getURL();

}

map = utilities.PrintTable(wdContext, printList, wdComponentAPI);

wdContext.currentContextElement().setUrl(map.get("url").toString());

if(printurl != null)

{

IWDWindow window = wdComponentAPI.getWindowManager()

.createExternalWindow(printurl, "Test", false);

window.open();

}

Can anyone please suggest where I went wrong in the coding.

Thanks in advance.

Ponnusamy

Accepted Solutions (1)

Accepted Solutions (1)

former_member189631
Active Contributor
0 Kudos

Ponnusamy,

*Open your thread,

*Award Poiints for the useful relies by choosing option box for each reply(left).

*If your problem is solved choose "solved Problem"

Regards,

Ramganesan K.

Answers (2)

Answers (2)

former_member189631
Active Contributor
0 Kudos

Hi Ponnusamy,

Please mark the thread if your problem is solved.

Regards,

Ramganesan K.

Former Member
0 Kudos

hi,

Can you please explain me how to mark the thread.

Thanks

Ponnusamy

Former Member
0 Kudos

Hi,

You need to post how your PrintTable method works.

You need to tell map is an object of which class.

You need to tell how map.get("url") works.

If you can post the code for the above 3, we maybe able to find out what seems to be the issue.

I understand that you have stored your file as part of MIME repository and therefore wouldn't you be using DeployedPartObject to retrieve the url and thus the file ?


    String resourcePath =

      WDURLGenerator.getResourcePath(

        wdComponentAPI.getDeployableObjectPart(),

        FileDownloadView.FILE_NAME);

Regards,

Subramanian V.

Former Member
0 Kudos

Hi Subramanian,

My problem is solved. In thew following lines of code, i Have made the mistake

instead of map.get("url") i gave printurl.

if(printurl != null)

{

IWDWindow window = wdComponentAPI.getWindowManager()

.createExternalWindow(printurl, "Test", false);

window.open();

}

Thanks for ur help.

Ponnusamy P