on 07-01-2005 5:26 PM
a)
I have a view container element that I want to pass parameters to. Is there a way to transcationally do this?
Can someone post some sample code.
b) To solve the above problem I fired a plug to the view inside the view container. This seems to create another thread and leads to unpredictable results. (The parent view renders correctly in some cases and doesn't in some other cases). Is this the wrong approach to passing parameters to viewcontainers? what is the recommended way.
Any help is appreciated..
Hi
What parameters are you trying to pass to the View Container. Can you explain a bit more on that.
regards
ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Are both the views in the same component or are you using 2 different components , one for Parent and one for child.
If it is a single component then you can access the context variables by using context mapping between the parentview and the component controller and then from component controller to the embedded view.
For test purpose just create a View1 with a input field and bind it to a context attribute of type say string.
Create a View container ui element and add it to another view called View2.
Now define the inbound and outbound plugs.
Create context attribute say va_str1 in View1.
Create a context attribute say va_componentStr1 in the component controller.
create a context attribute say va_str2 in View2.
Do a context mapping from View1 to component controller and then from component controller to the View2.
On click of some action in View1 just fire the plug.
In the View2 init() just write a print message
wdComponentAPI.getMessageManager().reportSuccess("Value "+wdContext.currentContextElement().getva_Str2());
I havent tried it with different DC's but do let me know if this was helpful.
regards
ravi
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.