Feature #781
Select Value when user clicks on Cancel button
0%
Description
When a user clicks on Cancel button, dialog returns nothing/empty value.
Sometimes (i.e., in an Input Dialog) the user can leave an empty value, then Servoy can't distinguish between that empty value and press cancel button.
I think that Cancel button must return null value, or a user-defined value (using a method like "setCancelButtonValue()")
History
Updated by Harjo Kompagnie about 11 years ago
What does the smart-client return in this situation? because we wan't that to be in sync!
Updated by Juan C. Cristobo about 11 years ago
I don't use the module in smart client, but if it uses dialogs plugin, the plugin also returns nothing/empty value.
Updated by Harjo Kompagnie about 11 years ago
oke, than I don't think it's wise to change that behaviour, there are many projects using this module both in smart & web, so that would break than, agree?
Updated by Juan C. Cristobo about 11 years ago
Perhaps a method like "setCancelButtonValue()", where the user can define other value than default, it won't break any current project...
Updated by Juan C. Cristobo about 11 years ago
Found an easy way:
Put this code anywhere (i.e., OnOpen Solution), before calling dialogs module:
solutionModel.getForm('dialogs_base').getVariable('returnValue').defaultValue = null;
You can set every value that dialogs returns when you click on cancel button.
It only works on web client, I think...
Updated by Harjo Kompagnie about 11 years ago
- Status changed from New to Closed
OKke, that's a nice workaround indeed!
Will close this ticket!