on 08-16-2007 8:56 AM
Hello,
To avoid selecting the same data from DB I need to keep some data in internal tables. Those data are used to do the validations, every time the page is charged and the user selects some options. Can I define somehow the typical internal tables which will be visible from componentcontroller? Is it necessary to create the nodes and attributes to keep those data (in my case it would be more then 10 different kinds tables..)?
Thank you in advance.
Anna
Hi Anna,
You can use the Controller's <b><i>Attributes</i></b> to achieve this functionility. Just create some attributes (under the ATTRIBUTES tab) and store your data there instead of the context.
Also, just for information, a context's main purpose is store UI related data. So using Attributes should be a way out for you.
Hope this helps.
Regards,
Neha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Neha,
I have tried this, but the problem is that this new attribute is not visible from the method of componentcontroller. How should I access it? For example I have defined in the Attribute tab new attribute with the name TEST. If i try to use it as "TEST" in one of the methods I cannot activate the code.
Regards,
Anna
Hi Anna,
Define the attribute in your component controller and mark it as PUBLIC.
Now, in your view, u can use the following to access your attribute.
DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
DATA str TYPE string.
str = <b>lo_componentcontroller->test</b>.
Also, to access the attribute in your component controller, just use <b>wd_this->test</b>
Hope this helps.
Regards,
Neha
Anna,
Best bet is to use a ASSISTANCE CLASS for this. Define ur attributes in the assistance class and store ur tables and other parameters in the assistance class.
The dynpro runtine automatically creates a handle for the assistance class, wd_assist
Storing in assistance class had advantage of separating WebDynpro logic and application logic for better maintenance. Also better performance using assistance classes.
U can define assistance class by dould clicking ur component and entering the assistance class name.
The assistance class must inherit fro CL_WD_COMPONENT_ASSISTANCE.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.