Question

3
Replies
182
Views
AravinthT Member since 2016 15 posts
Tata Consultancy Services
Posted: 3 years ago
Last activity: 3 years 1 month ago
Closed

Upgrading Java 02 API to 03-02. SendData() and isBound() functions

Hi I am trying to upgrade Java API from 02 to 03-02 for a Java code that we have written to download a PageList as an excel file. We are using this activity to convert a page list into excel file and download it. We have some customizations needed while exporting to excel hence we are using our own activity. I am trying to upgrade this activity to use 03-02 Java API version instead of deprecated 02 version. I am not able to convert the below code into 03-02 version. What is the 03-02 version code for the below Java code:

Page objHeadersPage = getProperty("pxRequestor.pyHTTPResponseHeaders").getAsPage();
String fname="attachment;filename="+getParameterValue("ExcelFileName")+".xls";
if (objHeadersPage.isBound())
{
objHeadersPage.setValue("contentType" ,"application/vnd.ms-excel");
objHeadersPage.setValue("ContentDisposition" , fname);
sendData("", strData.toString());
}
else
{
sendData("","Error. Can't get \"pxRequestor.pyHTTPResponseHeaders\" page");
}

***Edited by Moderator Marissa to update categories***

Data Integration Low-Code App Development Upgrades
Moderation Team has archived post
Share this page LinkedIn