cancel
Showing results for 
Search instead for 
Did you mean: 

Horizontal Contextual Panel

Former Member
0 Kudos

Hi there,

i got some problems with my 2 level HCP even though i checked wdr_test_events.

First problem was renaming the tabs. i just added one more line to the context and used it as "text" reference. maybe there is some better solution than adding it hard on "entries" table with seperator.

Next problem is the triggering of action after clicking 1st lvl root or second lvl root.

I am really new in WD4A and really dont get it.

i got this peace

lv_value = context_element->get_path( withoutcontroller = abap_true ).

to get the contextual element like 1.HCP_DATA.4.RECURSION.1.

But i dont know how to trigger the action do get a view in the view-container beneath the HCP.

Hope you can understand my problem.

thx in advance

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Just another question because of the panel

Former Member
0 Kudos

Hi,

on button action hadler you can write code to set the visibility of the tabs.

Former Member
0 Kudos

Well,

i could change the visibility of the hole panel, but dunno how to change the single disable and visible things for the single tabs

Former Member
0 Kudos

Hi,

i thing you need to bind the itemVisible property to context attribute inside your node (dataSource).

on button action, you can loop through the context node and set the visibility. Note that this visibility is of type wdy_boolean.

Former Member
0 Kudos

Ive got this so far.

but obviously im not looping.

im setting all items on disabled and admin things invisible

and then trying 2 to it like this, but it throughs exception selected item not visible.

imports are login flag and admin flag

  
DATA: lo_context_node     TYPE REF TO if_wd_context_node,
        lv_login_status     TYPE wdy_boolean.



  IF im_is_logged_in EQ abap_true.

    lo_context_node = wd_context->get_child_node( 'HCP_DATA' ).

    lo_context_node->set_attribute( EXPORTING name   = 'ENABLED'
                                                   value  = abap_true ).


    IF im_is_admin EQ abap_true.
      lo_context_node->set_attribute( EXPORTING name   = 'VISIBLE'
                                                value  = abap_true ).
    ELSE.
      lo_context_node->set_attribute( EXPORTING name   = 'VISIBLE'
                                          value  = abap_false ).
    ENDIF.
  ELSE.
    lo_context_node->set_attribute( EXPORTING name   = 'ENABLED'
                                        value  = abap_false ).
  ENDIF.


Former Member
0 Kudos

Hi there,

well i just did a case now on that value and fired the plug, but im not sure if this is the right way either.

i want some usefull coding because i want to improve my skills not build on some wrong stuff.

at least it works like this for other ones issues

Edited by: -adrian- on Aug 6, 2010 9:42 AM

Former Member
0 Kudos

Hallo Adrian,

i think , you did good in case of firing plug to navigate to different views.

In my case i am not firing plugs but i am raising popup windows based on the case statements.

onSelect event method looks like this

DATA lo_portal_manager TYPE REF TO if_wd_portal_integration.
  DATA:
        lr_node TYPE REF TO if_wd_context_node.
  context_element->get_node( RECEIVING node = lr_node ).

*--------------------------------------------------------------------*
  DATA: lv_index TYPE i.
  CALL METHOD context_element->get_index
    RECEIVING
      my_index = lv_index.

  DATA: lv_text    TYPE string.
  context_element->get_attribute( EXPORTING name = 'TEXT' IMPORTING value = lv_text ).

  DATA: lo_window_manager TYPE REF TO if_wd_window_manager,
        lo_api_component  TYPE REF TO if_wd_component,
        lo_window         TYPE REF TO if_wd_window,
        lv_email          TYPE ad_smtpadr,
        lv_url            TYPE string.

  CASE lv_text.
    WHEN 'Email'.
      lo_api_component = wd_comp_controller->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).

      lv_email = wd_comp_controller->get_email_address( ).
      CONCATENATE 'mailto://' lv_email '?subject=Mock-Up Demo.'
      '&body=Hierbij ontvangt u wat informatie of er deze nieuwe applicatie.%0A%0a'
      'Voor meer informatie **** u contact op nemen met:%0A%0A'
      'Test manager.' INTO lv_url.

      CALL METHOD lo_window_manager->create_external_window
        EXPORTING
          url    = lv_url
        RECEIVING
          window = lo_window.

      lo_window->open( ).
    WHEN 'Dossier'.



      lo_api_component = wd_comp_controller->wd_get_api( ).
      lo_portal_manager = lo_api_component->get_portal_manager( ).

      CALL METHOD lo_portal_manager->navigate_absolute
        EXPORTING
          navigation_target = 'ROLES://portal_content/com.ics.civ.civpe_iViews/Dossier_Mockup'
      navigation_mode     = if_wd_portal_integration=>co_show_external
      window_features     = `toolbar=no, resizable=yes, location=no, width=1120, height=1120`
      window_name         = 'Zaak Dossier'
*    history_mode        = IF_WD_PORTAL_INTEGRATION=>CO_NO_DUPLICATES
*    target_title        =
*    context_url         =
*    post_parameters     = ABAP_FALSE
*    use_sap_launcher    = ABAP_TRUE
*    business_parameters =
*    launcher_parameters =
      .
    WHEN 'ToDo lijst'.

      lo_api_component = wd_comp_controller->wd_get_api( ).
      lo_portal_manager = lo_api_component->get_portal_manager( ).

      CALL METHOD lo_portal_manager->navigate_absolute
        EXPORTING
          navigation_target = 'ROLES://ROLES://portal_content/com.ics.civ.civpe_iViews/ToDo_Mockup'
      navigation_mode     = if_wd_portal_integration=>co_show_external
      window_features     = `toolbar=no, resizable=yes, location=no, height=600, width=530`
      window_name         = 'Zaak ToDo lijst'
*    history_mode        = IF_WD_PORTAL_INTEGRATION=>CO_NO_DUPLICATES
*    target_title        =
*    context_url         =
*    post_parameters     = ABAP_FALSE
*    use_sap_launcher    = ABAP_TRUE
*    business_parameters =
*    launcher_parameters =
      .
  ENDCASE.

*--------------------------------------------------------------------*
* set the lead selection to the current node
*  cl_wd_dynamic_tool=>set_table_tree_lead_selection(
*    lead_selection = context_element
*    data_source    = lr_node ).

  lr_node->set_lead_selection_index( -1 ).

Former Member
0 Kudos

Thanks for this one. Is it also possible to open a link to an external application in the viewcontainer or is it only possible to see it in an external window.

For example the hello world cream app displaying where my wd_this->fire_to_view.plg( ). is displaying the view

Former Member
0 Kudos

Hi,

You can have the interfaceView (i.e Window with 1..n views) embedded into ViewContainerElement.

Former Member
0 Kudos

What?

Well. The Application i want to open in this Application ist not part of the window nor the application.

it is some other URL on that Application server i want to view in the view container.

like this

WHEN '1.HCP_DATA.4.RECURSION.3'.

      • to_HelloWorld Prog

lv_tmp_link = 'http://***********************************dynpro/sap/zat_hello_world'.

wd_this->fire_to ( lv_tmp_link ).

but just that logic^^

Former Member
0 Kudos

Hi,

I think you may consider creating a view as rootcontainer element as iFrame. (SwapRoot element).

Bind the Source property to context attribute.

create a window and embed the iframe view.

Use this interface view inside your ViewContainerElement.

WHEN '1.HCP_DATA.4.RECURSION.3'.

get the URL and set the context attribute (Source).

Other options are using CHIPS in 7.02 Ehp but it is no use for you as of now.

Former Member
0 Kudos

i read somewhere about iframe and there they said that its not recommened.

i thought there might be a simple solution 😮

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>it is some other URL on that Application server i want to view in the view container.

Is it still another Web Dynpro ABAP application? On the same server, right? You shouldn't use the iFrame to embed another Web Dynrpo ABAP. You should instead declare a component usage to this other application's web dynpro component and embed it in your window via the component usage.

Former Member
0 Kudos

So,

where are the screws i have to use?

anything in the "to be used" application or just the application with the HCP? and how do i use it with that onSelect handler

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>where are the screws i have to use?

I have no idea what you mean.

Former Member
0 Kudos

how do i use this component interface from the one app in the view container of the main app

Former Member
0 Kudos

HI,

If it is a WDA application you talk about then double click this application and you could see in the properties

component and interface view.

You can use this component as used component and the interface view to embed into your view assemly.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> how do i use this component interface from the one app in the view container of the main app

Have you ever used an ALV or Select-Option in Web Dynpro before? These are integrated via Component Usage. You need to use the same approach with the external component you want to embed within your application. If you aren't familiar with component usage I suggest reading this section of the online help:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/a7/1d8b412bb5b35fe10000000a1550b0/frameset.htm

or finding a tutorial on the ALV.

Former Member
0 Kudos

Thx for the tutorial.

i will have a look on thisone today. as you can see i dont have much expierience with web dynpro so far.. so i didnt work with alv before. but thank you very much:)

Former Member
0 Kudos

Hi again,

another problem appeared using the HCP.

The demo in WDR_TEST_EVENTS has the option to enable the HCP. But only after selecting a tab.

my work is to do some kind of login via number. before the login there is only one tab available.

after pushing a button to login i want to enable all the other tabs.

a logic for is_login( ). in supply list doesnt work, since it only loads at start.

how could i do something like this

one tab -> push button -> all visible tabs available