cancel
Showing results for 
Search instead for 
Did you mean: 

How to open a URL

former_member219446
Participant
0 Kudos
32

Hi

I have 4 URL s .

My Requirement is to open a perticulat url.

I have four buttons .If i click any of those button.corresponding URL has to be open.

I want the procedure and code also

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi lotla,

u can add the following code in the button action in ur view....

IWDWindow dialog =wdComponentAPI.getWindowManager().createExternalWindow("http://www.sdn.sap.com","SAP",false);

dialog.open();

regards

-


sunil

former_member182372
Active Contributor
0 Kudos

Hi srinivasarao,

In wdDoModifyView for every button:


final IWDButton button = (IWDButton)element;
final String id = button.getId();
button.mappingOfOnAction().addParameter( "action", id );

Add parameter to action action type string.

Put in action handler:


final IWDWindow window = wdComponentAPI.getWindowManager().createExternalWindow((String)URLs.get(action), "Window title", false);
window.open();

define


  static
  {
  	final Map URLs = new HashMap();
  	map.put( "id1", "http://www.google.com");
	map.put( "id2", "http://www.google.de");
	map.put( "id3", "http://www.google.ch");
	map.put( "id4", "http://www.google.ru");
  }

where id1, id2, id3, id4 - id`s of your buttons.

Best regards, Maksim rashchynski.