on 10-04-2009 12:21 PM
Hi all,
I have a view which contains a ViewContainerUIElement and a ButtonRow. A second view with form fields is embedded in the container of the first view. Validation of the form fields in the second view depends on the button pressed in the first view. How can I determine in the second view, the name of the action that is executed in the initial view?
Thanks and regards,
Patrick
Thanks for the replies. In the first view i write the appropriate action to an attribute in the context which is mapped in the second view.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ,
create context for ur 1st view's ButtonRow and second view's form fields in ur component controller
drag and drop the nodes created, so the similar context nodes wud be created in both the views
a context created in this way would be accessible in both the views
so now u can easily validate ur action in 2nd view , by simply reading the context attributes of ur
button Row
u cn do it by using the code wizard by pressing CNTRL + F7 and selecting the button Read Context NOdes/Attributes
rgds,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Patrick - I answer this question in a previous forum [;
If you used the wizard in order to create the popup the wizard create a button "OK" that I'm guessing you change to "SAVE", you will need to create an EVENT HANDLER under your method list tab in my example my EVENT HANDLER is "SEARCH_RESULT" once the user click the "OK" button it will call SEARH_RESULT event and it will do your code inside the event.
DATA LO_WINDOW_MANAGER TYPE REF TO IF_WD_WINDOW_MANAGER.
DATA LO_API_COMPONENT TYPE REF TO IF_WD_COMPONENT.
DATA LO_WINDOW TYPE REF TO IF_WD_WINDOW.
data LO_VIEW_C type REF TO if_wd_view_controller.
lo_view_c = WD_this->wd_get_api( ).
LO_API_COMPONENT = WD_COMP_CONTROLLER->WD_GET_API( ).
LO_WINDOW_MANAGER = LO_API_COMPONENT->GET_WINDOW_MANAGER( ).
LO_WINDOW = LO_WINDOW_MANAGER->CREATE_WINDOW(
WINDOW_NAME = 'SEARCH_POPUP_WIN'
* title =
* close_in_any_case = abap_true
MESSAGE_DISPLAY_MODE = IF_WD_WINDOW=>CO_MSG_DISPLAY_MODE_SELECTED
* close_button = abap_true
BUTTON_KIND = IF_WD_WINDOW=>CO_BUTTONS_OK
MESSAGE_TYPE = IF_WD_WINDOW=>CO_MSG_TYPE_NONE
DEFAULT_BUTTON = IF_WD_WINDOW=>CO_BUTTON_OK
).
lo_window->subscribe_to_button_event( button = IF_WD_WINDOW=>CO_BUTTON_OK
action_name = 'SEARCH_RESULT'
action_view = lo_view_c
is_default_button = ABAP_true ).
* lr_popup->open( ).
LO_WINDOW->OPEN( ).
the subscribe_to_button_event will call the event handler and it will trigger your code inside the event.
Thanks
Jason P-V
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Bind the context to both the view and validate the values in the button click.
Kind Regards,
Mukesh
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 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.