Hello!
I'm trying to use WebDynPro property styleClassName.
I've found component WDR_TEST_CUSTOM_STYLES with examples + there is a sample code in if_wd_custom_style documentation.
Everything looks quite simple (sample code I'm using below). New, empty WDP component, only with button + init code.
But! In WDR_TEST_CUSTOM_STYLES its works, in my app - not.
When I tried to copy WDR_TEST_CUSTOM_STYLES to my $TMP it stopped working too (endless loading on views with style).
I didnt find where bug happens - somewhere deep in standart AFTER my code.
Any hints why it could be?
============================
DATA l_style_manager TYPE REF TO if_wd_custom_style_manager.
DATA l_style TYPE REF TO if_wd_custom_style.
" Get the custom style manager
l_style_manager =
wd_comp_controller->wd_get_api( )->get_application( )->get_custom_style_manager( ).
" Create a new custom style with name myButtonStyle for BUTTON elements
l_style =
l_style_manager->create_custom_style( style_class_name = 'STYLE'
element_type = 'BUTTON' ).
" Set font color to red
l_style->add_style_property( name = 'FONTCOLOR'
value = 'RED' ).
" Add custom style
l_style_manager->add_custom_style( l_style ).