on 10-29-2014 8:43 PM
Hi All,
I'm developing a web dynpro component and in this component i'm using "Message Area" UI element. I want to display multiple
messages in this message area. Problem I'm facing is when I'm displaying like 10 or more message the size of message area
is increasing and I dont want this to happen. I want message area to display 3 or 4 messages and then have a scroll bar.
I'm getting scroll bar but message area is increasing with the number of messages (displaying all 10 or 20 messages at a time).
I tried to setting "Max Visible Lines" property of message to '3' & '1' & '2' nothing worked, also tried changing layout to of the view to matrix, as i will get Height property but no luck.
Now system is displaying message as below.
but i want to display as following.
Above screen shot is from standard web dynpro application "WDR_TEST_MSG_AREA". I maintained properties of message area in my application similar to the message area of standard application, but didn't got results.
Thanks in Advance.
Hi,
You could create an Transparent container and set the height( in px) and scrolling mode to auto. Then place your message area inside it.
hope this helps,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kiran,
Thanks for your reply. I created Transparent container and set height and scroll mode. Now I'm able to set the height of the message area, but new problem came up. Now I'm having double vertical scroll bars, 1 for Transparent container and other for Message area. I tried a lot but couldn't get rid of scroll bar of message area. I couldn't find a way to disable scroll bar of message area.
Thanks in advance.
Hi MRA,
To remove scroll bar of message area, you need to set the Max visible messages to always more than the no. of visible messages.
proceed as below
METHOD WDDOMODIFYVIEW.
data lo_api_controller type ref to if_wd_controller.
data lo_message_manager type ref to if_wd_message_manager.
data lt_messages type if_wd_message_manager=>TY_T_MESSAGES.
data lv_msgs_count TYPE i.
lo_api_controller ?= wd_This->Wd_Get_Api( ).
CALL METHOD lo_api_controller->GET_MESSAGE_MANAGER
RECEIVING
MESSAGE_MANAGER = lo_message_manager
.
lt_messages = lo_message_manager->GET_MESSAGES( ).
describe TABLE LT_MESSAGES.
" Visible area is more than the no. of msgs, so no scroll bar
lv_msgs_count = sy-tfill + 1.
wd_context->set_attribute( EXPORTING
name = 'MAX_MSG_VISIBLE'
VALUE = lv_msgs_count ).
ENDMETHOD.
Hope this resolves your issue.
Regards,
Rama
Hi MRA,
Please write the below logic to set the maxVisibleMessages dynamically.
METHOD WDDOMODIFYVIEW.
data lo_api_controller type ref to if_wd_controller.
data lo_message_manager type ref to if_wd_message_manager.
data lt_messages type if_wd_message_manager=>TY_T_MESSAGES.
data lv_msgs_count TYPE i.
lo_api_controller ?= wd_This->Wd_Get_Api( ).
CALL METHOD lo_api_controller->GET_MESSAGE_MANAGER
RECEIVING
MESSAGE_MANAGER = lo_message_manager
.
lt_messages = lo_message_manager->GET_MESSAGES( ).
describe TABLE LT_MESSAGES.
" Visible area is more than the no. of msgs, so no scroll bar
lv_msgs_count = sy-tfill + 1.
data lo_message_area type ref to cl_wd_message_area.
lo_message_area = view->get_element( 'MSG_AREA').
if lo_message_area is bound.
lo_message_area->SET_MAX_VISIBLE_MESSAGES( value = lv_msgs_count ).
endif.
ENDMETHOD.
Note: here MSG_AREA is name of message area ui element.
Hope this helps you.
Regards,
Rama
Hi MRA,
Please share the snapshot of properties set for message area?
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
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.