Can someone clearly explain in words, what exactly is the difference between wdContext() and wdThis()
.When shud we use which one while we write the coding for the view and controller ??
Thanx in advance
Edited by: pankaj mathur on Sep 10, 2008 2:43 PM
During coding, the most generic situations where these 2 are used are,
1. you have to use wdThis if you want to call an action, a method, or a event handler which is defined either in your view or in your controller.
2. you have to use wdContext if you want to "get" or "set" values from or to the "node" and "attribute" (it could be a model node, model attribute,value node or value attribute).
so your next question:
Is this true that wdThis is generally used during the View coding when the data is available at the view context. Whereas wdContext() is used when the data is available at the controller context ??
- this is not true, if you understand the above mentioned 2 points.