on 09-04-2007 9:19 AM
Hi All,
how can i create a action and a handler dynamically for a dynamically created button,
please mention some steps....
Regards
Anuj Goyal
hi,
you need to create your action in development phase,
if you don't, you won't have an event handler method to trigger
to add the actions dynamically, you can add them on creation of the button
example:
lo_button = cl_wd_button=>new_button( id = lv_id
on_action = lv_action
text = lv_decision ).
cl_wd_grid_data=>new_grid_data( element = lo_button
h_align = 00 ).
lo_tray->add_child( lo_button ).
this is in case you set the button into a tray with gridlayout
grtz,
Koen
Message was edited by:
Koen Labie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When you create your button dynamically, there will be a method map_on_action in the button class. Use that to map at runtime the name of the action that is bound to the button. But it would be better if this action itself is created at design time using the Actions tab in your view. The binding can be done dynamically.
Hope this helps.
Regards
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.