cancel
Showing results for 
Search instead for 
Did you mean: 

View Context vs. Controller Context

Former Member
0 Kudos

Hi,

Is there any difference (performance-wise only), between storing table data in the View context directly, or storing it in the controller's context , and mapping the controller context nodes to the view's ones.

Provided that we add table rows to a context with something like:

wdContext.nodeX().addElement(wdContext.nodeX().createElement(iterator.next()));

Thanks in advance.

Regards,

Angel

Accepted Solutions (0)

Answers (1)

Answers (1)

arun_srinivasan
Contributor
0 Kudos

hi angel,

storing value attribute in the view context in local data(local scope). storing value attribute in controller context is global data(global value).If u map the view context to the comp. controller u can use this data in another view

for table first u store data in value a

ex:

String place=wdContext.currentContextElement().getPlace();

String sex=wdContext.currentContextElement().getSex();

IPrivateTablleview1.IMynodeElement x=wdContext.nodeMynode().createMynodeElement();//this for creating element for the node

wdContext.nodeMynode().addElement(x);//this is for adding element to the node

wdContext.currentMynodeElement().setPlace(place);//this for setting data to the element

wdContext.currentMynodeElement().setSex(sex);

wdContext.nodeMynode().moveNext();

hope this helps u,

Regards,

Arun

Former Member
0 Kudos

Hi Arun,

Thanks for the reply, but as i said before, I don't care about the scope/visibility of the data - only about if there is any speed difference between the two ways. For example -> is the same data transmitted to the client depending on the context, in which the data is stored? (view context, controller context, etc.)

Regards,

Angel

Message was edited by: Angel Todorov

Former Member
0 Kudos

Overhead is minimal -- instead getting element directly, mapped element is dereferenced. With JDK 1.4 and its JIT this is almost zero.

VS

arun_srinivasan
Contributor
0 Kudos

hi

let take this scenario when ur webservices model. u have send data of the view to the webservice.in this case view context is mapped to the comp ctr and comp ctrl is mapped to the webservice model. this is simple scenario

hope this helps,

regards,

arun