cancel
Showing results for 
Search instead for 
Did you mean: 

Communication between different Component's views

ashish_shah
Contributor
0 Kudos

Hi Experts,

We have 3 components and each component has 1 screen.

Now we need to navigate from screen of component 1 and screen of component 2 to screen 3.

Depending from where it was called I want to navigate back to the calling screen.

Since these screens are in different components I am not sure how can I call these screens.

Can you please guide.

Thanks in advance.

Regards,

Ashish Shah

Accepted Solutions (0)

Answers (4)

Answers (4)

ashish_shah
Contributor
0 Kudos

Just followed anurag's advice and it worked.

it was simple but didnt strike , thanks guys.

Former Member
0 Kudos

Hi, If those components are standard components how to achive ths functionality

Former Member
0 Kudos

Hello Suneetha,

Approach for the standard components like ALV would be same.

This question is already answered, Please post a new question.

Regards

Anurag Chopra

Former Member
0 Kudos

Hi Ashish,

you could use "breadcrumb" UI Element.

Regards

Anurag Chopra

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi ,

Refer to the below thread.

[]

Priya

ashish_shah
Contributor
0 Kudos

Hi All,

The trouble here is , on click of "back" button on view of component 2,

I need to determine from which view was it called , if called from component1 , go back to view of component1.

If called from component 3 then go back to view of component 3.

I hope the scenario is clearer now.

Regards,

Ashish

Former Member
0 Kudos

Hello Ashish,

I would suggest to have a variable in a global class which is visible to all the components.

So when you navigate from one view to another, u store the value either 1 or 3 in that variable and then fire the plug to navigate.

Now when the back button is pressed, read the variable and you would know from which view it came and you can manage accordingly.

Regards

Anurag Chopra

saket_abhyankar
Active Participant
0 Kudos

Hi,

You can achieve it as follows:

1) Create an attribute of type char1 in the component 2 (Attribute tab of the component controller)

2) Set the value of this attribute based on the component from which this (2nd) component is called. e.g. If component 2 is called from component 1 then set the value of this attribute to 1. Set the value to 3 if called from component 3

You can set these value based on the initial methods respective component

3) On click of back button check the value of attribute. Based on this value, trigger the respective plug or navigate to corresponding view

4) Clear the value of attribute in back method

Or

If you have used interface node in the component, you can set the value of any attribute of interface node instead of attribute of component controller.

Regards,

Saket.

saket_abhyankar
Active Participant
0 Kudos

Hi,

You will have to go for 'Component Usage'.

e.g. If there are 2 components A and B and you want to see the view of component A in component B, then declare the usage of component A in component B. This will make available the component A in component B.

The methods and context of component A which you will make as 'Interface', will be available in the component B.

Regards,

Saket.