cancel
Showing results for 
Search instead for 
Did you mean: 

Navigating back and forth between two WD Java DCs

Amey-Mogare
Contributor
0 Kudos

Hi,

I have two WD Java DCs which have one application each.

Both of these are Flash islands for WD Java.

Current scene

In View of DC1_APP contains a link UI elem to DC2_APP and currently, it is being opened in new non-modal window.

New requirment

- to open DC2_APP in same window

and

- DC2_APP should have a 'back' button in View that will navigate back to DC1_APP

and

- all the context data in DC1_APP should be intact when navigated back.

Can you please help me in achieving this scenario?

Thanks & regards,

Amey

Accepted Solutions (1)

Accepted Solutions (1)

Abhinav_Sharma
Contributor
0 Kudos

Hi Amey,

You can achieve the new scenario by following these steps:

1) Create a view in your DC1_APP say DC2_APPVIEW

2) Now in DC2_APPVIEW, create a button say Back, and View Container UI element.

3) Declare DC2_APP as a used component in DC1_APP, by making DC2_APP as a public part.

4) Embed the view in DC2_APP in the newly created view of DC1_APP view container UI element.

This way you can open the DC2_APP in same window and can navigate back to your previous window.

Regards

Abhinav S

Amey-Mogare
Contributor
0 Kudos

Thanks Abhinav!

This approach sounds promising.

Although, I was wondering how do I pass the URL parameter to DC2_APP?

Because, currently, DC2_APP expects two URL parameters.

How do I handle this in 'ViewContainer UI element' approach?

Abhinav_Sharma
Contributor
0 Kudos

Hi Amey,

You have to change the approach for passing the parameters to the application little bit. You can pass the required parameter through component interface of DC2_APP and then do your logic. You don't need to pass the values in URL parameter, whenever user navigated to DC2_APP, just set the required attributes in DC2_APP and then it should work the way it is working now.

Let me know if it helps you.

Regards

Abhinav S

Amey-Mogare
Contributor
0 Kudos

Thanks Abhinav!

I am trying to implement this now. Now, I can see View of DC2 inside viewcontainer or DC1's view.

So part-1 is done.

Now I could not understand how to pass parameter through interface controller.

Can you please elaborate?

Thanks a lot for your help so far.

Abhinav_Sharma
Contributor
0 Kudos

Hi Amey,

You can create a context attribute in interface controller of DC2 and then do the mapping in DC1 component. You can refer this [wikilink|http://wiki.sdn.sap.com/wiki/display/WDJava/UsecomponentsinbiggerWebDynproprojects+%28componentization%29] for using components in WD projects.

Once you done with the mapping of DC2 Interface with DC1 component controller, you can pass the values using setter and getter methods.

Regards

Abhinav Sharma

Amey-Mogare
Contributor
0 Kudos

Hi Abhinav,

Thanks a lot. It is working now!

Answers (0)