on 08-14-2007 7:25 AM
Hi,
I need to open a URL (for PrintView), on the action of a button. I cn't use LinkToUrl as its not possible to associate an action on its click. How can i do that?
Regards,
Smriti
Hi,
First u have to create outbound plug in interfaceview
1)Open the node WebDynpro -
> Web Dynpro Components -
> <ComponentName> -
> Component Interface -
> Interface Views in that click <interfacename> interface view .
2) Select the Plugs tab in the Plugs area.
3)Choose New next to the outbound plug table.create new outbound plug.for example,Name GotoUrl, and choose Type Exit Plug.
4)Select the new outbound plug GotoUrl and choose New next to the parameter table.taEnter the name Url datatype as STRING.
5)Open the view in the View Designer and select the Properties tab. Choose Add next to the Required Controllers table and add the <interface name>InterfaceView
Place 1 button and check,
onActionButton write this code
{
wdThis.wdGetSampleInterfaceViewController().wdFirePlugGotoUrl(
"http://www.google.com");
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh,
I tried it but i am getting this error:
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Cannot exit embedded component via outbound plug GoToPrintUrl of view <ComponentName>InterfaceView
at com.sap.tc.webdynpro.progmodel.view.ViewManager.fireExitPlug(ViewManager.java:200)
Regards,
Smriti
Message was edited by:
Smriti Behl
Hi Smriti,
Inside the action of the button try this.
try {
String linkToBeOpen =
WDURLGenerator.getWebResourceURL(
wdComponentAPI.getComponent().getDeployableObjectPart(),
"<put the URL here>");
IWDWindow window =
wdComponentAPI.getWindowManager().createNonModalExternalWindow(
linkToBeOpen,
"My window title");
window.show();
} catch (WDURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Regards,
Mithu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.