Project

General

Profile

Actions

Support #6812

closed

Time out warning message

Added by Mahmudul Hasan over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Target version:
-
Start date:
01/02/2019
Due date:
% Done:

0%

Estimated time:

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

wtWarning.png (2.12 KB) wtWarning.png Mahmudul Hasan, 01/02/2019 11:55 AM
Actions #1

Updated by Roel Standaert over 5 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

Actions #2

Updated by Mahmudul Hasan over 5 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 the WMessageResourceBundle documentation 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.

Actions #3

Updated by Mahmudul Hasan over 5 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.

Actions #4

Updated by Roel Standaert over 5 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.

Actions #5

Updated by Mahmudul Hasan over 5 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?

Actions #6

Updated by Mahmudul Hasan over 5 years ago

This worked as you suggested. May it was some refresh issue

Actions #7

Updated by Roel Standaert over 5 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF