on 02-07-2008 5:31 AM
Hi all,
i want to use same OVS code in 2 views view1 and view2.
In applyResult method i am getting classcastException as
IPRivateView1.node<Name> applicationnode= IPRivateView1.create<name>element
because for 2nd view it has to come as
IPRivateView2.node<Name> applicationnode= IPRivateView2.create<name>element
How to identify that the result should be shown means view1 or view2.Otherwise is there any other solution for resolving this??
Regards
Padma N
Write the OVS code in the component controller and try to execute from it in both the views.As it is global you can accesses the same with "n" number of views.
Create a method in the comp.controller and write the OVS code in that method.And access the method from any view.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Create a context attribute ... e.g InputViewName
Set InputViewName to string view1 if View1 is implelemnting OVS else
set it to string view2
In applyResult method check if the context
InputViewName == view1
IPRivateView1.node<Name> applicationnode= IPRivateView1.create<name>element
else
InputViewName == view2
because for 2nd view it has to come as
IPRivateView2.node<Name> applicationnode= IPRivateView2.create<name>element
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Padma,
In applyResult() method, you can try using this:
IPrivateView1.I<node>Element ovsCallerNodeElement1 =
(IPrivateView1.I<node>Element) applicationNodeElement;
IPrivateView2.I<node>Element ovsCallerNodeElement2 =
(IPrivateView2.I<node>Element) applicationNodeElement;
And then set the context attributes for the caller nodes of both the views - View1 and View2.
Regards,
Sangeeta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.