on 08-23-2007 6:04 AM
HI,
In my page threre will be seach button from whre user can chose multiple employee. Chosen fields will be displayed in a table. It is fine. Now in my page this seacrh will come again for chosing some different people. So i am planning to make the search a different componet and use the interface view . But i am affaid of that when the next seach will happen it will overwrite the previous table. As they will using same context.
Any one have any suggestion for this.
Thanks,
Prosun
You will be declaring a different component usages both times of the same component. So internally WD treats it like 2 different instances of the component.
So lets say for first search you used component A inside Component B. In the component controller of Component B, u declare usage of A, name of which is <b>UsageA1</b>. When u instantiate this usage preferably in WDDOINIT method,
data l_cmpusage type ref to if_wd_component_usage
l_cmpusage = wd_this->wd_Cpuse_<b>UsageA1</b>( ).
if l_cmpusage.hasActiveComponent( ) is INITIAL.
blah blah
l_cmpusage for Usage 1 is a brand new component usage (component) of COmponent A
Now again when COmponent A is used inside Component B, <b>you declare a DIFFERENT usage of Component A AGAIN</b> inside B , name of which is <b>UsageA2</b>
while instantiating the component usage
data l_cmpusage type ref to if_wd_component_usage
l_cmpusage = wd_this->wd_Cpuse_<b>UsageA2</b>( ).
if l_cmpusage.hasActiveComponent( ) is INITIAL.
blah blah
So in the component Usages section of B you will have 2 usages of Component A
Usage A1 Component A
UsageA2 Component A
WD will treat this as 2 different instances of Component A and <b>HENCE YOU CAN HAVE 2 DIFFERENT CONTEXT INSTANCES ETC</b>
So don't worry...data won't interfere from 2 usages
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prosun.
You can use two component usages to your search component and create 2 components. Then map the context of each csearch omponent to where you need it and nothing will be overwritten.
Cheers,
Sascha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.