cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Pushing events to the confirmation message (yellow drop down banner at top)

avillanueva
22-Sapphire II

Pushing events to the confirmation message (yellow drop down banner at top)

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.

avillanueva_1-1677874216253.png

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"

 

ACCEPTED SOLUTION

Accepted Solutions
avillanueva
22-Sapphire II
(To:avillanueva)

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;

 

View solution in original post

4 REPLIES 4

The documentation is in the JSDoc. I think the biggest challenge is finding and throwing the right event. 

 

Screenshot 2023-03-06 at 07.49.35.png

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.

avillanueva
22-Sapphire II
(To:avillanueva)

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.  

Announcements

Top Tags