cancel
Showing results for 
Search instead for 
Did you mean: 

which button was clicked in same view

volkan_bekci2
Explorer
0 Kudos

Dear All,

I have 2 views in WDA. First view is main view and main view is seperated by left view and right view in ViewContainerUIElement.

Because of second view, There is 2 button in left and right side. How can i know which button was clicked? Actually left and right view is completely same.

Thanks a lot,

Volkan

Accepted Solutions (0)

Answers (5)

Answers (5)

volkan_bekci2
Explorer
0 Kudos

solved with seperated views.

Thank you guys

0 Kudos

Hi Volkan,

Assumption:

  • event triggered for Event is known.
  • we can create/modify buttons event   without changing funcationality.

Solution:

just create flag   in each button specifying the position it is in.

If My assumptions are Wrong.

You better debugg it Buddy .

Thanks

krishna Acharyas.
       

0 Kudos

Hi dear,

                      I don't think you have to make two different views , all you have to do is make   two  different actions  and modify  it according to the position they placed in View 2.

Thanks

Krishna Acharya

volkan_bekci2
Explorer
0 Kudos

Dear Krishna,

How can i know he button position? Actually I need the where the button is assigned. Because there is 2 seperated right and left ViewContainerUI element.

Thanks,

Volkan

former_member183072
Active Participant
0 Kudos

Hi,

My first impresion is that you cannot see,

If you want different, then you have to create 2 different views, that are looking the same.

Regards,

Hancila

volkan_bekci2
Explorer
0 Kudos

Hi Hancila,

I can make two same view. But i would like to solve this problem without.creting 2 different views.

I think, There is a way. I will try to find this way with devugging system.

Thanks,

Volkan

former_member183072
Active Participant
0 Kudos

Hi Volkan,

You can create one different action for each button.

Regards,

Hancila

volkan_bekci2
Explorer
0 Kudos

Hi Dear Hancila,

I can not create different action. Because the views are same. Also buttos are same.

If i do some change left view, automatically right view is changed.

How can i know which sides button was clicked?

Former Member
0 Kudos

Try following code and check the value in the lv_view_name..

     Data lv_view_name TYPE string.

   DATA lo_controller TYPE REF TO if_wd_view_controller.

   DATA lo_view_info TYPE REF TO if_wd_rr_view.

   lo_controller = wd_this->wd_get_api( ).

   lo_view_info = lo_controller->get_view_info( ).

   IF lo_view_info IS BOUND.

    lv_view_name = lo_view_info->get_name( ).

   ENDIF.

volkan_bekci2
Explorer
0 Kudos

Hello Chandra,

Actually lv_view_name is same.

There is 2 VCU element in main view. But two VCU element is assinged same view. So Your code is now work.

Thanks