on 05-31-2012 4:56 PM
Hello,
as I notice, url parameters we are collecting in windows HANDLEDEFAULT event handler. But program just at the startup reach this place.
So I want to ask, how I can collect url parameters in COMPONENTCONTROLLER at least in VIEW. Or from these component I can call WINDOWS HANDLEDEFAULT method.
Thank you for replays.
Martynas,
you can perform in two ways.
1. By defining attributes at component controller level.
Just define required attributes of your application parameters type at component controller level, and assign the values at HANDLEDEFAULT of your window.
thereafter you can make use of throughout your component.
2. By defining attributes at Assistance Class level.
same as above. but attributes should be at AssistanceClass level.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Chengalarayulu D,
At the moment I am getting these parameters in t HANDLEDEFAULT of my window and assign to assistant class.
But web Dynpro is working in this way:
1. ComponentController INI,
2. View INI,
3. Windows INI
So parameters I am getting just et the end, but these parameters I need in ComponentController.
Hi,
It will be executed in the order you mentioned. But if you need it in component contoller's method other than WDDOINIT, just check whether that method is accessed after Handle Default of Windows. You can put a breakpoint in that method and Handle default of Windows to check the precedence.
Hi,
however, HANDLEDEFAULT also will execute before screen visible, so, if you wanna do any operations with those parameters.. follow the below..
of course, as you mentioned execution sequence is right. if you see the below you can get some more idea.
1. Create a method at Component controller level i.e. AFTER_HANDLEDEFAULT which can make use of application parameters.
if wd_this->param1 eq 'PARAM1'.
ELSE.
ENDIF.
2. in HANDLEDEFAULT of window
**** get the parameters, and assign those to global attributes which are created at component controller level / assistance class level *****
wd_comp_controller->param1 = <application level parameter>.
now call the method of comp-controller
wd_comp_controller->AFTER_HANDLEDEFAULT( ).
3. Now your parameters are available globally, and required operations also executed on demand.
4. test the applicaiton.
hope you understood.
You can create an Assistance class and add attributes in it and can save the parameter values in those Assistance class attributes and they will be available all over the component globally through out its life.
Thanks
Phani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.