Project

General

Profile

Feature #781

Select Value when user clicks on Cancel button

Added by Juan C. Cristobo about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
01/30/2014
Due date:
% Done:

0%

Estimated time:
Browser (if web client):

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

#1

Updated by Harjo Kompagnie about 10 years ago

What does the smart-client return in this situation? because we wan't that to be in sync!

#2

Updated by Juan C. Cristobo about 10 years ago

I don't use the module in smart client, but if it uses dialogs plugin, the plugin also returns nothing/empty value.

#3

Updated by Harjo Kompagnie about 10 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?

#4

Updated by Juan C. Cristobo about 10 years ago

Perhaps a method like "setCancelButtonValue()", where the user can define other value than default, it won't break any current project...

#5

Updated by Juan C. Cristobo about 10 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...

#6

Updated by Harjo Kompagnie about 10 years ago

  • Status changed from New to Closed

OKke, that's a nice workaround indeed!

Will close this ticket!

Also available in: Atom PDF