on 07-06-2012 5:48 PM
My scenario is given like the action name of Ui element(link to action element), image source name and position id is given in database as shown below..based on view name
view name | position | Image | Action |
---|---|---|---|
P1 | 1 | pic1.jpg | CLICK |
P1 | 2 | pic2.jpg | SEND |
P1 | 3 | pic3.jpg | GEN_REPORT |
There are 3 UI elements(LInk to action element) used in a view.Now what are they expecting me to do..Dynamically i can set the image name by binding the property of image_source to some string variable and then pass the value to string.
But there is nothing to bind in events...we can only create new..there is no binding available????how to do do it...??May be is it related to assistance class??
Help me out please
yes can be possible, check out attributes to method you will find option for text alignment as well. If you create dynamic UI element in view you need declare action in same controller i.e viewcontroller, create action in actions tab in view controller which will generate method in viewcontroller.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
here is code for creating link to action dynamically, properties of link to action UI element is attribute to the static method. use below code in WDDOMODIFYVIEW method.
DATA lr_container TYPE REF TO cl_wd_uielement_container.
DATA lr_linktoaction TYPE REF TO cl_wd_link_to_action.
DATA lr_matrix TYPE REF TO cl_wd_matrix_head_data.
IF first_time = abap_true.
lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
CALL METHOD cl_wd_link_to_action=>new_link_to_action
EXPORTING
* bind_image_source = give image source here
on_action = 'CLICK' " Create action CLICK in actions tab
text = 'Link'
visible = '02'
RECEIVING
control = lr_linktoaction
.
lr_matrix = cl_wd_matrix_head_data=>new_matrix_head_data( lr_linktoaction ).
lr_linktoaction->set_layout_data( lr_matrix ).
CALL METHOD lr_container->add_child
EXPORTING
index = 1
the_child = lr_linktoaction.
ENDIF.
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 | |
10 | |
7 | |
6 | |
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.