cancel
Showing results for 
Search instead for 
Did you mean: 

How to navigate to URL embedded in FormattedTextView

Former Member
0 Kudos

Hi,

I have a a URL embedded in a FormattedTextView UI element:

Need help? For technical support and other resources, review our <a href="http://insidemit.mit.edu/help-apps/contact.shtml"><strong>contact information</strong></a>

I have implemented an action associated with this UI element and I know that the parameter HREF will contain the URL but I don't know how to redirect the user to the URL.

What is the necessary code?

Thanks,

Carolyn Fuller

Accepted Solutions (1)

Accepted Solutions (1)

gill367
Active Contributor
0 Kudos

Hi

You can create an external window using the URL which is present in the HREF parameter of WDEVENT

here is the sample code.

data link type string.
  wdevent->GET_DATA(
  exporting
    name = 'HREF'
    IMPORTING
      value = link

  ).
  data lo_window_manager type ref to if_wd_window_manager.
  data lo_api_component  type ref to if_wd_component.
  data lo_window         type ref to if_wd_window.

  lo_api_component  = wd_comp_controller->wd_get_api( ).
  lo_window_manager = lo_api_component->get_window_manager( ).
  lo_window         = lo_window_manager->CREATE_EXTERNAL_WINDOW(
URL = link
  ).

  lo_window->open( ).

Thanks

Sarbjeet Singh

Former Member
0 Kudos

Worked perfectly!

Thanks,

Carolyn Fuller

Answers (0)