Hi guys, what's up?
I'd like to know if it's possible to let all the message feedbacks close by themselves with a JS like this:
setTimeout(function(){ $public.FeedbackMessage.closeFeedbackMessage(); }, 2000);
For example, I would like any feedback message in my project to remain on the screen for only 2 seconds, according to the code above, if this is possible, how do I do it?
Thank you.
@Gustavo Mor Yes you can use the Javascript Feedback API of Outsystems to control that and even you can display any type of message (warning, information, error, success) with same function to enhance the reusability and to avoid the use of AutoclosefeedbackMessage every time when you call FeedbackMessage.
In the created example below, the feedback message will be auto hide based on the passed values in timeOutInMiliSeconds paramter to JavaScript or the user click on the feedback message before the timeOutInMiliSeconds reaches while the message types values can be passed as integer values take from the Outsystems JavaScript Documentation Here. (0 = Info, 1 = Success, 2 = Warning or 3 = Error )
Hope this will help
Yes, but you will have to integrate the JavaScript widget into the client action flow that initializes the feedback message for each instance. The AutoCloseFeedbackMessage clientAction in the example contains the suggested JS Code
Hello Gustavo,
Hope you're doing well.
I'd suggest for you to take a look at this Forge component as it allows you to easily control the Feedback Messages of your application. Everything is done client-side using JavaScript.
Kind regards,
Rui Barradas
Hi @Gustavo Mor ,
There is a forge component named Reactive Utilities, which provides a lot of other resources, including the one you are asking about.I have used this personally in my projects too. There is a client action named CloseFeedbackMessageWithTimeout that has in input the time for which the message will be shown, then it will be hidden.
Link to forge component - Reactive Utilities
I Hope it helps.