Message Bar

Definition

The message bar allows to display application messages at the beginning (top) or at the end (bottom) of the form. The message can display an icon at the beginning of the messages that indicates the nature of the message (info, error and so on). The message bar has to be added to the form component. The form component has the methods to define if the message bar is displayed at the beginning or at the end of the form.

  • id

    Identification name of the message bar.

  • message

    Defines the messageType and the messageText for the message bar.

  • messageText

    Defines the messageText for the message bar. A messageType has to be defined, using method 'message' or 'messageType'. If no messageType is defined, the messageText is not displayed.

  • messageType

    Nature of the message.

    • ERROR

      Displays icon .

    • INFO

      Displays icon .

    • LOADING

      Displays the rotating icon .

    • NONE

      Displays no icon.

    • STOP

      Displays the ERROR icon.

    • VALIDATION

      Displays ERROR icon .

    • WARNING

      Displays icon .

Attributes

M

Values

Usage

id

*

String ( c s)

Taglib id="mBar"

Classlib Defined with the messageBar object.

message

 

String

Taglib No tag available

Classlib setMessage(MessageType.type, String mess)

messageText

 

String

Taglib messageText= "Invalid date"

Classlib setMessageText( "Invalid date")

messageType

 

ERRORINFOLOADINGNONESTOPVALIDATIONWARNING

Taglib setMessage(MessageType.type, String mess)

Classlib setMessage(MessageType.type, String mess)

Example

using the taglib

   <hbj:formid= "myFormId" method= "post" target= "_blank" encodingType= "multipart/form-data" action= "/htmlb/servlet/com.sap.htmlb.test.MyTestJsp1Test" ><hbj:messageBarid= "mBar" messageType= "ERROR" messageText= "FatalError" ><%myFormId.setMessageBar(mBar);%></hbj:messageBar></hbj:form>

using the classlib

Formform=(Form) this .getForm(); MessageBarmb= new  MessageBar( "messageBar" ); mb.setMessage(MessageType.ERROR, "FatalError" ); form.setMessageBar(mb);form.setMessageBarAtFormEnd( true );form.setMessageBarRequired( true );

Result