cancel
Showing results for 
Search instead for 
Did you mean: 

Rfc input from selected element in another view

Former Member
0 Kudos

Hi,

In my web dynpro application I have two views.

In the first view I fill a variabile (selected_id ) in the custom controller with method onActionSelect.

Now in the second view I call a rfc using selectd_id as input, but it is empty.

How can I solve it?

FirstView


 public void onActionSelect(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, com.sap.wdp.IPrivateCatGdfView.IAlberoElement selectedElement )
  {
    //@@begin onActionSelect(ServerEvent)
    if(selectedElement.getIsFoglia().equals("X")){
    	
    	wdContext.currentContextElement().setSelected_Id(selectedElement.getId_corso());

    	wdThis.wdFirePlugOutCat();
    }
    //@@end
  }

Custom Controller



     Zhr_Schedapdf_Input input_pdf = new Zhr_Schedapdf_Input();
     wdContext.nodeSchedaPdf_Input().bind(input_pdf);
    
	String corso = wdContext.currentContextElement().getId_selected();
	input_pdf.setObjid(corso);

Accepted Solutions (1)

Accepted Solutions (1)

former_member197348
Active Contributor
0 Kudos

Hi Alfonso,

Why don't you set this value in View1?

e.g.

public void onActionSelect(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, com.sap.wdp.IPrivateCatGdfView.IAlberoElement selectedElement )
 {
    //@@begin onActionSelect(ServerEvent)
    if(selectedElement.getIsFoglia().equals("X")){
    	
    	wdContext.currentSchedaPdf_InputElement().setsetObjid(selectedElement.getId_corso());
 
    	wdThis.wdFirePlugOutCat();
    }
    //@@end
  }

Write the following code in wdDoInit() of Custom Controller

Zhr_Schedapdf_Input input_pdf = new Zhr_Schedapdf_Input();
     wdContext.nodeSchedaPdf_Input().bind(input_pdf);

Regards,

Siva

Answers (3)

Answers (3)

Former Member
0 Kudos

Many thanks!!

Former Member
0 Kudos

Hii,

Suppose u populate select_id from View1...map it with cust controller...so that the value gets passed over there....

create a value attribute at view2 and populate the value manually using getter setter methods.

If u want coding for that , i can provide u the same.

Former Member
0 Kudos

Hii,

Suppose u populate select_id from View1...map it with cust controller...so that the value gets passed over there....

create a value attribute at view2 and populate the value manually using getter setter methods.

If u want coding for that , i can provide u the same.