Version
8.4
Question & Context
Hi everyone
I’m trying to improve the user experience for a form in my IdenittyIQ
Right now, when the user submits the form without entering an identity name, I want to show a validation popup below the field that clearly tells them "Enter Identity Name"
— similar to a tooltip or inline popup.
What I currently have
This is my form setup:
Form screenshots:
Here’s how the error looks now:
But what I really want is something like this (with a header and content):
import sailpoint.api.*;
import sailpoint.object.*;
import sailpoint.tools.*;
import sailpoint.api.*;
import sailpoint.web.messages.MessageKeys;
List messages = new ArrayList();
QueryOptions qo = new QueryOptions();
String trimValue = (value != null) ? ((String)value).trim() : null;
if (trimValue == null || "".equals(trimValue)) {
Message msg = new Message();
msg.setKey(MessageKeys.LCM_CREATE_IDENTITY_NO_NAME_ERROR);
messages.add(msg);
} else {
Filter filter = Filter.or(Filter.eq("id", trimValue), Filter.ignoreCase(Filter.eq("name", trimValue)));
qo.add(new Filter[]{filter});
qo.addFilter(ObjectUtil.buildWorkgroupInclusiveIdentityFilter());
int count = SailPointFactory.getCurrentContext().countObjects(Identity.class,qo);
if (count>0) {
Message msg = new Message();
msg.setKey(MessageKeys.LCM_CREATE_IDENTITY_NAME_ERROR);
messages.add(msg);
}
}
return messages;
What I’m looking for
How can I make the validation message appear as a popup directly under the field, similar to the UI shown in the “expected” screenshot?
Also, how can I customize the header and message content of that popup (e.g. “Enter Identity Name”)?
Any help or tips would be appreciated!