cancel
Showing results for 
Search instead for 
Did you mean: 

passing attributes from one view to another in different windows

Former Member
0 Kudos

Using WDA on ECC 6.

In my component controller, I have a Create/Change Flag - I have copied this node & attribute to all Views in my application.

In Window1, I have a selection screen where I choose the Create or Change buttons. I call the appropriate event handler and update my context accordingly and then calls View2 in Window2.

In Window2, I have a view that displays a PDF. In the WDOINIT, I read my Context Node attribute to see if we're in CHANGE or CREATE mode, but no value comes in.

I thought it was possible to pass data through the Context from one window/view to another window view..

any ideas on what i'm doing wrong?

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

If all the windows and views are in the same component, they should all have access to the same component controller context. If the component controller context is mapped to the views (and not copied) they all have a shared reference back to the same data.

Former Member
0 Kudos

this is exactly what I thought.

I've checked my contexts and they are all mapped to the component controller.

the only kink I can think of is that i'm opening a new browser window from my selection screen - maybe the data is getting lost there.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You didn't mention that you were opening a new browser window. Of course your context is lost when that occurs because you are opening a completely new user session.

Former Member
0 Kudos

rats.

ok.. i'm trying now with passing parameters via the WD Application.

Or is there another way to pass over a couple of values?

Edited by: robert phelan on Jun 24, 2009 7:00 PM

Former Member
0 Kudos

ok, i resolved this issue by passing URL parameters from my calling application to the called application..

the code I used looks as follows:



*---- Pass parameters through lt_parms table to URL
  ls_parms-name  = 'OPERATION'.
  ls_parms-value = 'M'.
  APPEND ls_parms to lt_parms.

  ls_parms-name  = 'PROJECT_ID'.
  ls_parms-value = lv_ext_id.
  APPEND ls_parms to lt_parms.

  CALL METHOD cl_wd_utilities=>construct_wd_url
    EXPORTING
      application_name = 'zps_ppm_idea_sheet'
      in_parameters = lt_parms
    IMPORTING
      out_absolute_url     = str.
  l_cmp_api = wd_comp_controller->wd_get_api( ).
  l_window1 = l_cmp_api->get_window_manager( ).

  result = l_window1->create_external_window(
    URL = STR ).

  result->open( ) .

I basically transformed my component controller context attributes to URL parameters, called the app in a new browser passing those parameters.

Then, converted those URL parameters back to component controller context atributes for use on the other side.

Answers (0)