on 05-29-2009 7:36 AM
Hi All,
I have a message log for my application. i am populating the messages with the following code.
case ls_message-TYPE.
when 'S'.
lv_type = 0.
when 'W'.
lv_type = 1.
when 'E'.
lv_type = 2.
endcase.
CALL METHOD l_message_manager->report_message
EXPORTING
message_text = ls_message-MESSAGE
message_type = lv_type
* params =
* msg_user_data =
* is_permanent = ABAP_FALSE
* scope_permanent_msg = CO_MSG_SCOPE_CONTROLLER
* view =
* show_as_popup =
* controller_permanent_msg =
* msg_index =
* cancel_navigation =
* enable_message_navigation =
* receiving
* message_id =
I have a message area UI in my application. I am getting the messages displayed, but it is not displayed into the message area UI, instead it is populated into the WD framework's message area.
Please help me to understand how do i make the messages come into the message area.
Thanks,
Selvakumar M.
Hi,
Message area appears only when there is a message to be displayed. You must have placed the messgae area on top of the page. Messages gets displayed in message area, you don't need to do anything for it.
Regards
Arjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arjun,
The messages are display even if i remove the message area UI.
The exact requirement is that my message log is very big, so the customer is intended to have a text some thing link Show/Hide Message Log, so whenever the messages are available the link has to appear and the user on clicking it only the messages should be shown and if again they click on it they should hidden..
So what i planned was, if i put the messages into the message area, i can change the visibility of the message area, by linking it's visibility to an attribute and toggle the attribute to yes or no on clicking a link to action UI.
Please help me achieving this.
Thanks,
Selvakumar M.
And you were saying that the reason why you wanted to hide this MessageArea coz ots taking up lot of space on your screen. You can try proceed in the manner below to restrict the size occupied by the MessageArea irrespective of the number of entries it might contain.
1) Create a TransparentContainer at the area where you want your messages to be displayed.
2) Specify fixed width & height for this TransparentContainer.
3) Now embed the MessageArea ui element inside this TransparentContainer so it would also inherit the same properties as the TransparentContainer.
4) Set the scrollingMode property of the TransparentContainer to "Auto" so that you will have the scrollbars appear within the container depending up on the number of messages that are getting displayed. (NOTE: If you ommit setting this property you will find no difference & all the messages would get displayed like how they were getting earlier & eat up your screen space.)
Now if the number of messages increases the TransparentContainer would get a scrollbar & they would get displayed within the fixed area specified by you. You wouldn't be having the problem of them eating up too much of your screen space.
Regards,
Uday
Hi Selva,
You can do some work around.
Insert two linktoaction UI elements(One having name as Show Messages and second as Hide Messages ) and one messagearea UI element in your view.
Now create one context attribute Visible of type WDUI_VISIBILITY and bind the visible propery of both linktoaction UIs with this attribute. Keep the default value of this attribute as 01 .
Check Your message if it is not empty then show both the elements by setting this attribute as 02.
DATA ls_err TYPE symsg.
if ls_err is not initial.
* set single attribute
lo_el_context->set_attribute(
name = `VISIBLE`
value = '02' ).
endif.
Now in the onaction of linktoaction UI elements control the visibilty of your messagearea. For that also you need to create one more context attribute of type wdui_visibility and need to bind it with your messagearea UI element.
P.S. : You can use Buttons also in place of linktoaction UI elements.
I hope it helps.
Regards,
Rohit
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.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.