Feature #1177
openValidators and css
0%
Description
Hi,
I have few notices to FormWidgets and Validators.
On disabled widgets the validators should be inactive by default (I am putting text "n/a" in a field in which should be only numbers etc.). Now I am using setValidator(NULL), when widget is disabled, and setValidator(v), when is set to enabled.
Another workaround is for styling changed form widget. I am using fw->changed.connect(changedJs), where changedJs is a JSlot which is setting style class "changed" to calling widget. It leads to that this js function is transfered to client with every widget which is connected to changedJS. It would be convenient to have some similar js function in wt code, which should be only called from every widget. And for form widget there should be some method styleClassChanged(bool enabled).
regards,
Jan
Updated by Jan Hrubeš about 13 years ago
The second issue (global js function, that can be called from any widget) can be solved using WApplication::declareJavaScriptFunction() .