cancel
Showing results for 
Search instead for 
Did you mean: 

use of Object MESSAGE.

former_member184111
Active Contributor
0 Kudos

Hi All,

We need to show error messag to the user in case of incorrect entry.

I have a tableView with an editable field , when save is clicked this field is checked , if the entery made is incorrect , i want to display an error message at the bottom of the page.

I have to use the methods ADD_MESSAGE , ASSERT_MESSGAE and GET_MESSAGE o do this,

i cant figure out the syntax and specially , how to define the parameter condition of ADD_MESSAGE..

Please help,

Anubhav.

Edited by: Anubhav Jain on Jun 5, 2008 6:56 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,

In layout of the BSP Page, u can use phtmlb extension for this.

In one of my application, i have used the following code:


<%@extension name="phtmlb" prefix="phtmlb" %>

 <%
      if message is not initial.
      %>
      <phtmlb:messageBar id           = "messageBar"
                         text         = "<%= message-text %>"
                         type         = "<%= message-type %>"
                         rulerDisplay = "BOTTOM" />
      <%
      endif.
      clear message.
      %>

In the above code message can be brought in OnInputProcessing method and can be used in layout.

Hope this helps..

Regards,

Sneha.

former_member184111
Active Contributor
0 Kudos

Hi Sneha,

Its workling fine , just one query....

How to diaplay it in the bottom left corner of the screen?

Also i need answers to the first post in this thread, so i am not marking it as answered, but otherwise you solved the requirment.

Thanks a lot for the help.

Anubhav.

Former Member
0 Kudos

Hi Anubhav,

There are only three options available for 'rulerDisplay' attribute. They are NONE, BOTTOM and TOP.

If you speecify as 'BOTTOM' the message gets displayed at left bottom.

Regards,

Sneha.

former_member184111
Active Contributor
0 Kudos

Hi Sneha,

I treid , also looked the BSP SBSPEXT_PHMLB, its not workign as expected in my case.

have to do some workaround , i guess.

Many thanks for your time.

Anubhav.

former_member184111
Active Contributor
0 Kudos

Hi Sneha,

Actually if i use

rulerDisplay = "BOTTOM"

i get the message at the end of last cell of my gridLayout.

ie if i use something like...

<htmlb:gridLayout id = "maingrid"

columnSize = "1"

rowSize = "4"

then i get the message after the element specified in last gridLayoutCell but not at the bottom left corner of the page!!!

How to display the message at bottom left corner of my page?

Hope i was able to describe my doubt.

BR,

Anubhav..

Edited by: Anubhav Jain on Jun 6, 2008 10:22 AM

Former Member
0 Kudos

Hi,

u can also use javascript for dispalying the message in the status bar.

1. declare message variable in page attributes.

2. assign ur message to this variable 'message' in oninputprocessing

3. In layout set a condition



<% if message is not initial. %>

window.status="<%= message %>" ; 

<% endif. %>

Regards,

Sneha.

Former Member
0 Kudos

window.status = <%= message %> is a javascript and needs to be written inside

script quotes.

former_member184111
Active Contributor
0 Kudos

Hi Sneha,

Thanks for the info!!!

Regards,

Anubhav.