Hi there,
my question of today is the following:
I have a component A (working standalone) and a component B, which makes use of component A. To be visual: A is a three-step wizard, B is a table to choose from.
Now I want to start component A (the wizard) whenever the user chooses a new row in B. What I have is component B calling the interface view of component a, bypassing a parameter. This works. But when the user moves forward within the wizard, from step 1 to step 2 within component A, and then chooses another row in component B, the parameter is passed, I can update the context, but the view does not change - but I want to start over this component. The inbound plug of the interface view is marked as a startup plug, I do not really know if this should concern my question (doc is a bit short again on this).
Any help?
Thanks in advance
Detlev
Hi Detlev,
here's my solution of the day:
1. Change the Lifecycle property of the component usage of A owned by B to "manual".
2. Whenever the user selects a row, delete and recreate A (-> full "restart"):
if (wdThis.wdGetAComponentUsage().hasActiveComponent()) { wdThis.wdGetAComponentUsage().deleteComponent(); } wdThis.wdGetAComponentUsage().createComponent();
3. Fire the plug to A passing the parameter(s) as already done. If the InterfaceView of A is the default for the view area it resides in, it will be displayed by the component creation of A already, so firing the plug is just for transporting the parameters(s) in that case.
4. In wdDoExit() of the component controller of B, delete the component A for a full cleanup (maybe that's automatically done by the framework, but who knows):
if (wdThis.wdGetAComponentUsage().hasActiveComponent()) { wdThis.wdGetAComponentUsage().deleteComponent(); }
5. What you are doing here is a navigation inside an already running application, so there's no need to use startup plugs for that.
Hope that helps.
Best regards
Stefan
Add a comment