Support #6812
closedTime out warning message
0%
Description
If session is timed out the default warning message is :
"The application has stopped running, would you like to restart"
Is it possible to change the warning message?
Files
Updated by Roel Standaert almost 7 years ago
This message is identified by the id Wt.QuittedMessage. You can change it by providing your own message resource bundle, see the WMessageResourceBundle documentation if you're not familiar with that: https://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WMessageResourceBundle.html
Updated by Mahmudul Hasan almost 7 years ago
Roel Standaert wrote:
This message is identified by the id
Wt.QuittedMessage. You can change it by providing your own message resource bundle, see theWMessageResourceBundledocumentation if you're not familiar with that: https://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WMessageResourceBundle.html
Do you mean to add a message as below :
<?xml version="1.0" encoding="UTF-8"?>
Zuhause
Please restart
I tried this. Doesn't work.
Updated by Mahmudul Hasan almost 7 years ago
I have added this to my own message bundle. I can't edit the wt xaml file placed in the src folder.
https://github.com/emweb/wt/blob/master/src/xml/wt.xml
I am using wt library and can't change core resource of wt.
Please suggest.
Updated by Roel Standaert almost 7 years ago
How are you adding this own message bundle? I just tested it and it seems to work perfectly fine (using Wt 4.0.5). There's actually also another alternative: when you call quit() you can provide a string argument to change the message.
Updated by Mahmudul Hasan almost 7 years ago
Roel Standaert wrote:
How are you adding this own message bundle? I just tested it and it seems to work perfectly fine (using Wt 4.0.5). There's actually also another alternative: when you call
quit()you can provide a string argument to change the message.
i have myMessages.xaml file for different languages. And use it as :
> app->messageResourceBundle().use(WApplication::appRoot() + "myMessages");
am i doing it wrong?
Updated by Mahmudul Hasan almost 7 years ago
This worked as you suggested. May it was some refresh issue