cancel
Showing results for 
Search instead for 
Did you mean: 

Set Dynamic URL in IFrame CHIP

Former Member
0 Kudos

Hi Friends,

I have a webdynpro component with side pannel implimented. In the Side Pannel I have two chips( Web Dynpro Chip and IFrame Chip). This is how it looks below.

Now what I want is to pass the URL to IFrame chip dynamically. I tried tagging too but but cant fire the inport dynamically from my webdynpro component.

What I want is to pass the address details to the google map URL so that map points to the exact location when a row is selected.

Awaiting your inputs...

Accepted Solutions (0)

Answers (2)

Answers (2)

rabikiran_sahu
Participant
0 Kudos

Hi Jason,

Have to create a feeder class for dynamically handling the tags, can use the interface IF_CHIP_API, in order to receive inport events and fire outport events.

On the lead selection of the table use the below methods from the interface for tagging dynamically


ADD_DYNAMIC_INPORT

ADD_DYNAMIC_OUTPORT


Thanks,

Rabi

Former Member
0 Kudos

I have already tried below many things but the issue I am facing is I am not able to get the object of chip. Just need to know how I get the object.

This is not an FPM application so don't know if I can use a feeder class here.

METHOD onactionleadselect .

   DATA: l_chip_api TYPE REF TO if_chip_api,

           lo_def     TYPE REF TO if_chip_definition,

           lv_url     TYPE        string.

   l_chip_api = cl_chip_api_util=>get_chip_api_for_static_chip( ).

   IF l_chip_api IS BOUND.

     " WD component is embedded in a CHIP and CHIP is already started

     lo_def = l_chip_api->get_definition( ).

     lo_def->get_launcher_url( ).

*l_chip_api->set_chip_launcher_url_provider( launcher_url_provider =  ).

   ENDIF.

   DATA lo_lsapi TYPE REF TO if_lsapi.

   lo_lsapi = cl_lsapi_manager=>get_instance( ).

* lo_lsapi->if_lsapi_data_context~set_tag_value( name  = lv_tag_name

*                                                type  = lv_tag_type

*                                                value = lv_tag_value ).

ENDMETHOD.

rabikiran_sahu
Participant
0 Kudos

Hi Jason,

Please try like this below:

data:

    l_componentcontroller_api type ref to if_wd_component.

    l_componentcontroller_api = wd_this->wd_get_api( ).

data: lv_chip type ref to if_chip_Api.

CALL METHOD cl_chip_api_util=>get_chip_api

   EXPORTING

     wd_component = l_componentcontroller_api

   receiving

     chip_api     = lv_chip_api " Now you will have the chip reference for your particular webdypro component

"Now do all your operations

.

  IF l_chip_api IS BOUND.

     " WD component is embedded in a CHIP and CHIP is already started

     lo_def = l_chip_api->get_definition( ).

     lo_def->get_launcher_url( ).

*l_chip_api->set_chip_launcher_url_provider( launcher_url_provider =  ).

   ENDIF.

   DATA lo_lsapi TYPE REF TO if_lsapi.

   lo_lsapi = cl_lsapi_manager=>get_instance( ).

* lo_lsapi->if_lsapi_data_context~set_tag_value( name  = lv_tag_name

*                                                type  = lv_tag_type

*                                                value = lv_tag_value ).






The IF_WD_CONTROLLER interface enables you to access information using an active Web Dynpro component.

Please let me know if this works out!

Thanks,

Rabi

Former Member
0 Kudos

Thanks for the response buddy but have already tried it and it does not work. It does not return the instance of the chip.

One more thing I have two chips to my side panel( webdynpro chip and IFRAME chip).

Dynamic url needs to be set to IFRAME chip.

METHOD onactionleadselect .

   DATA: l_chip_api TYPE REF TO if_chip_api,

           lo_def     TYPE REF TO if_chip_definition,

           lv_url     TYPE        string.

*  l_chip_api = cl_chip_api_util=>get_chip_api_for_static_chip( ).

  l_chip_api = cl_chip_api_util=>get_chip_api( wd_this->wd_get_api( )->get_component( ) ).

   IF l_chip_api IS BOUND.

     " WD component is embedded in a CHIP and CHIP is already started

     lo_def = l_chip_api->get_definition( ).

     lo_def->get_launcher_url( ).

*l_chip_api->set_chip_launcher_url_provider( launcher_url_provider =  ).

   ENDIF.

   DATA lo_lsapi TYPE REF TO if_lsapi.

   lo_lsapi = cl_lsapi_manager=>get_instance( ).

* lo_lsapi->if_lsapi_data_context~set_tag_value( name  = lv_tag_name

*                                                type  = lv_tag_type

*                                                value = lv_tag_value ).

ENDMETHOD.

Former Member
0 Kudos

Kill the chip and launch a new one with the required URL parameters.

Former Member
0 Kudos

Kaski, Could you please elaborate how do I do that.

rabikiran_sahu
Participant
0 Kudos

Hi Jason,

try  the code in the webdynpro CHIP Component,

WDDOMODIFY VIEW

You will have one Chip Component where you have designed the side panel webdynpro Chip, and write the code when you select the lead selection definitely you will have the reference of the CHIP,

Goto WDDOMODIFY View and

data:

    l_componentcontroller_api type ref to if_wd_component.

    l_componentcontroller_api = wd_this->wd_get_api( ).

data: lv_chip type ref to if_chip_Api.

CALL METHOD cl_chip_api_util=>get_chip_api

   EXPORTING

     wd_component = l_componentcontroller_api

   receiving

     chip_api     = lv_chip_api "

Now in your Webdynpro chip create chip with outport dynamically and an event fire outport (Pass the value on lead selection to the parameter value of

chip with outport ).

Remember for Google Maps the Tag name must be

 SADDR for the starting point

 DADDR for the destination

and its mandatory to integrate with maps

Please let me know if your able to find through this.

Former Member
0 Kudos

Any thought on this.... if more info is needed please let me know.