on 09-01-2009 11:33 AM
Hi,
I want to navigate from view1 in comp A to view2 in compB and vice versa. I am able to do the first part view1 -> view 2 through interface controller.
Now i want to navigate back to the view1 from view2.
Please help.
Regards,
Priya
Hi priya,
follow these steps to navigate from CompB to CompA.
1. create a outbound plu in the Interface View of CompB.
2. creata the same outbound plug in the window controller of compB, since Window implements Interface View or copy the Plug from interface View and paste it in the Window Controller.
3. Create a Button Say "Back" in ViewB of COmpB , and in the Action Handler of this Button , fire the out bound plug.
4. to access the window Controller, add the window controller as Required controller to ur View in Properties Tab of View Controller.
Note: After doing the above procedure, sync both the dcs and open the window controller of CompA . here u will find the Interface View of CompB with outBound plug. create the link between the Intreface View to View A by creating a Inboung Plu in View A.
Hope it helps
Edited by: Fazal Ahamed on Sep 1, 2009 4:20 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for ur response.
please tel me how to connect to the 2nd view(i.e not the default view) of comp B from the view 1 of the comp A
and i need to go back depending on the scenario. i.e
if comp b 's view1 triggers comp B's view2 then the back button should take to the comp B's view 1.
if comp A's view1 triggers the comp B's view2 then the back button should go the comp A's view 1.
Thanks
Priya
Edited by: priya on Sep 1, 2009 7:05 PM
Hi,
Maintain a flag attribute in the context like "SourceView".
Before navigating from from View1 of CompA to View2 of CompB then populate "CompAView1" in that context attribute.
And map this context attribute between CompA View2 & CompB Interface Controller & CompB View2
Similarly before navigating from View1 of CompB to View2 of Comp then populate "CompBView1" in that context attribtue.
And map this context attribtue also between CompB View1 & CompB View2.
Now on click on back button action:
Based on the value in this context attribute invoke the corresponding fire plug.
Regards,
Charan
Hi Priya,
As i told Earliar, navigating diretly to second View of Comp B is not possible. But if that is ur requirements, then u have to create a new component which should have just the Second View of COmpB. so u will be having three components, where u can navigate from Comp A to CompC , CompB to CompC and vice versa.
Hope it helps,
Thanks and Regards
Hi,
Create one seperate view called "NavigationView" in CompB.
This View does not contain any context or anything its just decides the navigation and invokes that corresponding plug.
Now make this "NavigationView" as default.
Create one context attribute "ToView" in NavigationView & map this context attribute to CompB interface controller and also to View1 of CompA.
Now before navigating from View1 set the value in ToView context attribtue as "View1" Or "View2"
In the init method of this "NavigationView" check the context attribute as below and navigate to View2.
if("View2".equalsIgnoreCase(wdContext.currentContextElement.getToView()))
{
wdThis.wdFirePlugToView2();
}
Regards,
Charan
Hi,
Create one outbound plug (Exit) as "ToView1OfCompA" in InterfaceViewController of ComponentB.
Now add this CompB's InterfaceViewController in the properties tab of View2 of CompB. Because of this you can access all the plugs and methods of InterfaceViewController in View2.
Now in the back button action call this outbound exit plug as below.
wdThis.wdGetComponentBInterfaceViewController().wdFirePlugToView1OfCompA();
Note: You can't use the same procedure which you did to navigate from View1 of CompA to View2 of CompB. If you add CompA as used component in CompB, you will get runtime error for cyclic dependancy.
Regards,
Charan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi priya,
You have to use same procedure which you have used to nevigate from view1 to view2.
Regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.