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 (Error).
INFO
Displays icon (Info).
LOADING
Displays the rotating icon (Loading).
NONE
Displays no icon.
STOP
Displays the ERROR icon.
VALIDATION
Displays the ERROR icon .
WARNING
Displays icon (Warning).
Attributes |
M |
Values |
Usage |
---|---|---|---|
id |
* |
String (cs) |
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 |
ERROR INFO LOADING NONE STOP VALIDATION WARNING |
Taglib setMessage(MessageType.type, String mess) Classlib setMessage(MessageType.type, String mess) |
Using the taglib
Syntax
<hbj:form id="myFormId" method="post" target="_blank" encodingType="multipart/form-data" action="/htmlb/servlet/com.sap.htmlb.test.MyTestJsp1Test" > <hbj:messageBar id="mBar" messageType="ERROR" messageText="Fatal Error"> <% myFormId.setMessageBar(mBar); %> </hbj:messageBar> </hbj:form>
Using the classlib
Syntax
Form form = (Form) this.getForm(); MessageBar mb = new MessageBar("messageBar"); mb.setMessage(MessageType.ERROR, "Fatal Error"); form.setMessageBar(mb); form.setMessageBarAtFormEnd(true); form.setMessageBarRequired(true);