on 05-01-2009 3:49 PM
Hi,
Maybe you can help me.
I am migration RWBS application based on WD for Java to NW7.11 and I am facing some copiling errors:
For example:
Code in NW7.0:
import com.sap.tc.webdynpro.services.sal.datatransport.core.IInputMassDatasource;
import com.sap.tc.webdynpro.services.sal.datatransport.core.InternalMassDataTransport;
Cannot longer be resolved and therefore the statement:
IInputMassDatasource source = InternalMassDataTransport.addInputMassDatasource(htmlSrc, WDWebResourceType.HTML);
Cannot be compiled.
I guess this has to be replaced by import com.sap.tc.webdynpro.services.sal.datatransport.api.IWDInputMassDatasource;
However IWDInputMassDatasource is an interface and I don't know how to get an instance implemeting this interface and how to replace the statement above.
I also didn't find any documentation is the portal except JAVADOC which is not helpful.
Thank you and best regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Armin,
Thank you so much for your quick answer.
I would like to confirm with you if the changes below are correct as I don't yet have J2EE installed for testing.
OLD CODE:
import com.sap.tc.webdynpro.services.sal.datatransport.core.IInputMassDatasource;
import com.sap.tc.webdynpro.services.sal.datatransport.core.InternalMassDataTransport;
public void print( java.lang.String pContent, java.lang.String pTitle ) {
ByteArrayInputStream htmlSrc = new ByteArrayInputStream(pContent.getBytes());
IInputMassDatasource source = InternalMassDataTransport.addInputMassDatasource(htmlSrc, WDWebResourceType.HTML);
String url = source.getUrl();
IWDWindow win = wdComponentAPI.getWindowManager().createNonModalExternalWindow(url,pTitle);
win.show();
}
NEW CODE:
public void print( java.lang.String pContent, java.lang.String pTitle ) {
ByteArrayInputStream htmlSrc = new ByteArrayInputStream(pContent.getBytes());
IWDResource source = WDResourceFactory.createMassDataResource(htmlSrc, WDWebResourceType.HTML);
String url = source.getUrl(WDFileDownloadBehaviour.AUTO.ordinal());
IWDWindow win = wdComponentAPI.getWindowManager().createNonModalExternalWindow(url,pTitle);
win.show();
}
Best regards,
Hassane.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.