Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
I believe someone suggested look at this in the past to remind users of tasks or things. I am not looking for the banner message which I used for system announcements. I am looking to have the yellow banner message ping users perhaps when they log in. I am not sure that's a triggerable event.
Is this documented in Customizer's guide and if so, under what search terms? Is there a better mechanism? I can see this working to appear when the user logs in or at a certain time of the day. I am holding just sending an email in my back pocket.
Example:
"You have X tasks in your queue that need attention and XX tasks are past due"
Solved! Go to Solution.
I actually found code that displays a message as a result of an action not necessarily login but should be the path to follow.
as part or a Processor doOperation(..), it returns a FormResult. There is a feedback message that goes into the yellow banner.
fbMsg = new FeedbackMessage(FeedbackType.FAILURE, (Locale)null, null, (ArrayList<String>)null, (wt.util.LocalizableMessage[]) null);
fbMsg.addMessage("Your message here ");
formresult.addFeedbackMessage(fbMsg);
return formresult;
The documentation is in the JSDoc. I think the biggest challenge is finding and throwing the right event.
Thanks found the JSDoc page. Considering this is handled via Javascript, I do not think a server side event can trigger this. It makes sense since this typically appears at the end of some action the user has done. It could be hooked into the home tab but ideally, the goal is to directly them back to this page. It has to balance that line of not being too annoying for users but a gentle reminder so not every time they refresh a certain page. Thanks, this gives me the place to look at a sense or effort. So long as no one else comes along with a canned solution, you'll get credit.
I actually found code that displays a message as a result of an action not necessarily login but should be the path to follow.
as part or a Processor doOperation(..), it returns a FormResult. There is a feedback message that goes into the yellow banner.
fbMsg = new FeedbackMessage(FeedbackType.FAILURE, (Locale)null, null, (ArrayList<String>)null, (wt.util.LocalizableMessage[]) null);
fbMsg.addMessage("Your message here ");
formresult.addFeedbackMessage(fbMsg);
return formresult;
You might find this interesting...
https://www.w3schools.com/howto/howto_js_alert.asp
We have moved to this for alert banners and a login "do you accept these terms" page that appears only once per session (the default code in the banner.txt will appear at every refresh/login etc)
We had to add a custom .jsp file to load in addition to begin_custom.jspf.