|
Re: How to delete row on TablePage [message #1403620 is a reply to message #1403549] |
Thu, 24 July 2014 15:36 |
Jeremie Bresson Messages: 1252 Registered: October 2011 |
Senior Member |
|
|
Bahtiyor Ruzimatov wrote on Thu, 24 July 2014 12:55we say thanks to the guys from BSI AG !
You're welcome.
Thank you for this detailed question.
Bahtiyor Ruzimatov wrote on Thu, 24 July 2014 12:551) How we can customize the confirmation messages in MessageBox into another national languages?
This is because the translations files in Scout RT are not complete. If the localized message for a given key is not found, the english fallback is used.
The current files were translated a long time ago by an external company. We do not have the skills to keep those file up to date without the community (people speaking the language). We need help in this area!
You can add the missing or the wrong translations in your application.
Have a look at the code in MessageBox.showDeleteConfirmationMessage(String, Object)
String intro = null;
String action = null;
if (itemType != null) {
intro = (n > 0 ? ScoutTexts.get("DeleteConfirmationTextX", itemType) : ScoutTexts.get("DeleteConfirmationTextNoItemListX", itemType));
action = (n > 0 ? t.toString() : null);
}
else {
intro = (n > 0 ? ScoutTexts.get("DeleteConfirmationText") : ScoutTexts.get("DeleteConfirmationTextNoItemList"));
action = (n > 0 ? t.toString() : null);
}
MessageBox mbox = new MessageBox(
ScoutTexts.get("DeleteConfirmationTitle"),
intro,
action,
ScoutTexts.get("YesButton"),
ScoutTexts.get("NoButton"),
null
);
DeleteConfirmationTextX, DeleteConfirmationText, DeleteConfirmationTitle are the keys of the messages you are looking for.
I have described how you can override a text entry from the framework in an Eclipse Scout application in StackOverflow. I hope you can use it to add the missing keys for your language. (You can skip the last part where I mention Bug 439590, because you can save the Dialog even if a warning is displayed). If you need more help, feel free to continue the discussion here.
When your translation is working as expected it would be great to share it with other eclipse scout users. You can help us by improving the default translation files provided by the Eclipse Scout framework.
I have given some inputs on how you can contribute translations back to the scout framework. If you are interested, feel free to ask anything you need to be able to contribute those files. I will guide you through the process to make it Happen. I do not see any other way to improve the localization of Eclipse Scout. We need contributions from native speaker, from people using those translations.
Bahtiyor Ruzimatov wrote on Thu, 24 July 2014 12:552)If our implementation for row deletion works fine, when we can use (Auto Discard On Delete)
I have try to explain the difference between delete and discard Row in the wiki: Delete a row from the table
If you have the property AutoDiscardOnDelete set to true, the row will be discarded when you call deleteRow(..). This matters only when you send the content of your table, back to the server, like in a TableField in a form. In this case you will read the TableData on the server-side you are interesting in persisting the deletion operation corresponding to each row with the state ITableHolder.STATUS_DELETED
I really like your approach where you call reloadPage() after the deletion. This way you are sure that the user gets an updated state that really correspond to the database state.
I hope this helps. Otherwise fell free to continue the discussion.
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04442 seconds