on 08-22-2007 8:03 AM
Hi,
Can any global variable or a memory variable which can be defined for a view... so that i can store a value in it and retrieve it when i come back to this view.
points will be rewarded for helpful anwers
regards,
raksha
Hi Raksha,
You can do that by declaring an <b>Attribute</b> in the view by going to the <i><b>Attribute</b></i> tab in the view.
You can then access this simply using <b>wd_this->MY_ATTR</b>
Also, take care that this will store data only during a view's lifetime. In such cases, you can have the attribute in your component controller also.
To access the attribute of component controller from view controller, simply use
<b>wd_comp_controller->MY_ATTR</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raksha,
There can be two reasons. One is that either your view's lifetime ends. In such a case, define the attribute in your component controller and use wd_comp_controller as I mentioned before. Another reason can be that you are creating your component in another component and then deleting it somwhere. In such a case, define your attribute in the context of the parent component (rather than somewhere in the attributes tab) and share the value using context sharing.
Hope this is what you were looking for.
Regards,
Neha
Define it as an attribute in your view. Go to the attributes tab and define your variable. It can later be accessed as wd_this->attribute_name.
You can also define attributes in the comp controller, if it is needed across views. Then use wd_comp_controller->attribute_name to access it.
Export to and import from memory IDs can be used as well, but having it as attributes in your comp controller or view would be better.
Regards
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.