Project

General

Profile

Feature #1177

Validators and css

Added by Jan HrubeŇ° over 10 years ago. Updated over 10 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
03/07/2012
Due date:
% Done:

0%

Estimated time:

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

#1

Updated by Jan HrubeŇ° over 10 years ago

The second issue (global js function, that can be called from any widget) can be solved using WApplication::declareJavaScriptFunction() .

Also available in: Atom PDF