Skip to Content
avatar image
Former Member

Rfc input from selected element in another view

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);

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Feb 12, 2009 at 02:33 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 13, 2009 at 06:44 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 13, 2009 at 06:44 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 13, 2009 at 08:51 AM

    Many thanks!!

    😊

    Add comment
    10|10000 characters needed characters exceeded