on 07-31-2007 1:38 PM
I have view A and view B in a web dynpro. B is a popup. In the popup window i can add a row to a table which is shown in view A. Saving and closing view B I see the changes only after resetting view A (i do that with wd_this->invalidate( ).
My question how to call invalidate from the popup (b) so that i can see after the refreshed table in A?
I found some anwers here, but they were to abstract.
Can you maybe give me an example?
Regards
Ezi
Hi ,
Create a event in component controller , handle the event in view A means create a event handler in view A and write the code to invalidate in that.
fire this event in view B where u want ... this will solve ur problem....
Regards
Yashpal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hm, thanks first for your answers.
the problem is that i can't use the component controller.
the method invalidate is:
method INVALIDATE .
data: node_table type ref to IF_WD_CONTEXT_NODE.
node_table = WD_CONTEXT->GET_CHILD_NODE( 'RELEASE_TABLE' ).
node_table->INVALIDATE( ).
endmethod.
and uses therefore the context of its own view.
when i use the component controller i can't invalidate the table i think?
In view A I created now a method
method INVALIDATE_E
wd_this->invalidate( ).
endmethod.
which calls the necessary method.
[I declared INVALIDATE_E as EVENT in the COMPONENTCONTROLLER..]
The EVENT in the COMPONENTCONTROLLER has got the name INVALIDAT.
Now i try to call INVALIDAT from view B.
When I write in the action of B
wd_this->fire_INVALIDAT_evt( ).
it says the method is unknown, protected or private.
but how to call the event from the componentcontroller?
can i just write wd_this->invalidate( ) in the view?
I will give you a clear overview what i have now:
<b>View A)</b>
1. An event INVALIDATE with the used functionality, connected to the component controller
<b>ComponentController
</b> In Events:
Event = Invalidat | Interface = yes
No Method implementation (is that right?)
<b>View B)</b>
Here I have an Action:
method OnActionInvalidat
wd_this->invalidate( ). (Here i actually don't know what the code should be. Tried different)
endmethod.
Would be very happy if somebody gives me the right hint.
Hi,
if you want to trigger the event the code would be
wd_this->fire_INVALIDATE_EVT( ).
Hi you can follow the Following steps:
1. In the Component Controller Create a Event INVALIDATE and create a method(Event_trigger) in the Component Controller with the Code wd_this->fire_INVALIDATE_EVT( ).
2. In the View A When you press Any Button , you do the following thing
In the Action Handler method, call the Component Controller Method(Event_trigger) Wd_COMP_CONTROLLER->event_trigger( ).So by Doing this You will be calling the Component ContRoller method which inturn will be Triggering the Event (INVALIDATE).
3.In the VIEW B you create a method of type Event Handler and in the Event Column press F4 and select the Corresponding event you created and inside this method you write the code what you what to do.
Let me know this is what you are expecting??
cheers
<b>Thanks to all!
Finally it works :)</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.