Use the Identity Manager IDE to open the form to which you want to add the warning.
Add the <Property name=’messages’> to the main EditForm or HtmlPage display class.
Add the <defvar name=’msgList’> code block from the following sample code.
Substitute the message key that identifies the message text to be displayed in the Alert box in the code sample string:
<message name=’UI_USER_REQUESTS_ACCOUNTID_NOT_FOUND_ALERT_VALUE >
Save and close the file.
<Display class=’EditForm’> <Property name=’componentTableWidth’ value=’100%’/> <Property name=’rowPolarity’ value=’false’/> <Property name=’requiredMarkerLocation’ value=’left’/> <Property name=’messages’> <ref>msgList</ref> </Property> </Display> <defvar name=’msgList’> <cond> <and> <notnull> <ref>username</ref> </notnull> <isnull> <ref>userview</ref> </isnull> </and> <list> <new class=’com.waveset.msgcat.ErrorMessage’> <invoke class=’com.waveset.msgcat.Severity’ name=’fromString’> <s>warning</s> </invoke> <message name=’UI_USER_REQUESTS_ACCOUNTID_NOT_FOUND_ALERT_VALUE’> <ref>username</ref> </message> </new> </list> </cond> </defvar> |
To display a severity level other than warning, replace the <s>warning</s> in the preceding example with either of the these two values:
error -- Causes Identity Manager to render an InlineAlert with a red “error” icon.
ok -- Results in an InlineAlert with a blue informational icon for messages that can indicate either success or another non-critical message.
Identity Manager renders this as an InlineAlert with a warning icon
<invoke class=’com.waveset.msgcat.Severity’ name=’fromString’> <s>warning</s> </invoke> |
where warning can also be error or ok.