Hi all,
I have a problem when using the ULCHasChangedEnabler. I have a view with 4 tabs and almost a dozen of panes. I would like to use the enabler to check the dirty state of different panes. I have no special button nor component to activate. I just want to be able to detect which panes have been modified to prevent some unecessary call of database saving operation. Here is a simple example:
public MyClass() {
ULCHasChangedEnabler enabler = null;
...
private void init(){
enabler = new ULCHasChangedEnabler();
enabler.add(txtField1);
enabler.add(txtField2);
}
public boolean isDirty(){
return enabler.isEnabling();
}
...
}
The problem is that the enabler.isEnabling is always false. If I add the following lines, it runs.
myHiddenButton = new MyButton();
myHiddenButton.setEnabler(hasChangedEnabler);
But l don't want to add hidden component in every class I make with such an enabler.
I looks like if the enabler is not attached to a graphical element, it will not be updated. Thank you to tell me if it's a bug or if I have made it wrong.
Stéphane Barthon
DSI R&D - Nantes
Transports Graveleau
+33(0)2 40 05 35 63
- [ULC-developer] ULCHasChangedEnabler Stephane BARTHON
- RE: [ULC-developer] ULCHasChangedEnabler Janak Mulani
