on 09-17-2012 5:14 PM
Hello,
I'm trying to add a button to a new View I have added using the Create View wizard in the Component Workbench, and I ticked the Toolbar button checkbox during creation.
However, I cannot redefine the IF_BSP_WD_DYN_TOOLBAR_CALLBACK~GET_BUTTONS method. This make sense as it does not exist in the View implementation class.
Do I need to add the interface manually? Or has the Wizard missed something and I should instead delete and recreate my View?
Many thanks,
Stuart.
Hi Stuart,
If u want buttons in View you can add it in the Do prepare output method.
otherwise u want Buttons in Overview Page you need add Manually interface IF_BSP_WD_TOOLBAR_CALLBACK and then activate the IMPL class TOOLBAR methods will enable.
Hope this one helpful if u want any clarification let me know.
Regards,
Vishwa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Stuart,
Can you please tell me what logic u have done for this. I also have the same problem.
Regards,
Chhanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Chhanda,
I had to do this:
CLEAR gt_button_list.
ls_button-text = 'My button'.
ls_button-enabled = abap_true.
ls_button-on_click = 'Myaction'.
ls_button-type = cl_thtmlb_util=>GC_ICON_ACCEPT.
APPEND ls_button TO gt_button_list.
GV_MAX_BUTTONS = GV_MAX_BUTTONS + 1.
In the html for your view, you need to have something like this:
<chtmlb:configCellerator downloadToExcel = "TRUE"
editMode = "<%= lv_cellerator_editmode %>"
id = "ConfCellTable"
actions = "<%= controller->GT_BUTTON_LIST %>"
actionsMaxInRow = "<%= controller->GV_MAX_BUTTONS %>"
I think you have to use upper-case in the HTML or it will fail.
Please note there may be a better way of doing this, if anyone has a better method I'd love to learn it!
Stuart.
Hello Struart ,
Thank you for your answer.
I have solved my problem but little bit diffrent way.
I have follwed the following steps-
1. I have implemented the interface "IF_BSP_WD_DYN_BTN_CONTROL" in the impl class of my list view.
2. Insert the folwing 2 lines code in between existing html code . ( after id i have written this)
actions =
"<%= controller->IF_BSP_WD_DYN_BTN_CONTROL~GET_LOCAL_TOOLBAR_BUTTONS( ) %>"
actionsMaxInRow =
"<%= controller->IF_BSP_WD_DYN_BTN_CONTROL~GET_NO_OF_VISIBLE_TOOLBAR_BTNS( ) %>".
3. Redefine toolbar methods :
IF_BSP_WD_DYN_BTN_CONTROL~GET_NO_OF_VISIBLE_TOOLBAR_BTNS
and
IF_BSP_WD_DYN_BTN_CONTROL~GET_BUTTONS
regards,
chhanda
Hello Chhanda,
All these methods are part of IMPL class of the view. So if you face problem in redefining any of such methods then you need to do it in _IMPL class only.
All the request processing , Toolbar related Methods ,Controller Initialization and Destruction , Breadcrumbs and Messages, Context related Methods will be part of IMPL class.
If you dont find any interface where in you want to redefine the method , then add that interface to this impl class.
The reason why the redefine button was not available was because the interface is not present in the IMPL class hence the method too.
Hope you got it,
THanks and Regards,
Nikhil Kulkarni.
hi
in order to display buttons on view ,
just define one public parameter in your view implementation class GT_BUTTONS and fill this internal table in the DO PREPARE OUTPUT method with the buttons.
then go to html page of your view and use the bsp tag areaframesetter tag
<thtmlb:areaFrameSetter toolbarButtons = "<%= controller->gt_buttons %>"
hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.