Revision 1983
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.impl/src/main/java/org/gvsig/tools/dynform/impl/DefaultJDynForm.java | ||
---|---|---|
75 | 75 |
public class DefaultJDynForm extends AbstractJDynForm implements JDynFormFieldListener { |
76 | 76 |
|
77 | 77 |
private Map components = null; |
78 |
private ComponentsFactory componentsFactory; |
|
78 |
private final ComponentsFactory componentsFactory;
|
|
79 | 79 |
|
80 | 80 |
public DefaultJDynForm( |
81 | 81 |
DynFormSPIManager manager, |
... | ... | |
367 | 367 |
} |
368 | 368 |
jfield.setValue(values.getDynValue(name)); |
369 | 369 |
} |
370 |
this.callUserEvent(USERCODE_FORM_ONSETVALUES, this); |
|
370 |
this.callUserEvent(USERCODE_FORM_ONSETVALUES, this, values);
|
|
371 | 371 |
try { |
372 |
if( (boolean) this.callUserFunction(USERCODE_FORM_ISREADONLY, this, values) ) {
|
|
372 |
if( (boolean) this.callUserFunction(USERCODE_FORM_ISREADONLY, this) ) { |
|
373 | 373 |
this.setReadOnly(true); |
374 | 374 |
} |
375 | 375 |
} catch (Exception ex) { |
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.services/src/main/java/org/gvsig/tools/dynform/services/dynform/AbeilleJDynForm.java | ||
---|---|---|
363 | 363 |
} |
364 | 364 |
for(String name : names ) { |
365 | 365 |
if( name.endsWith("_click") ) { |
366 |
Component c = form.getComponentByName(name.substring(0, name.length()-6)); |
|
366 |
String componentName = name.substring(0, name.length()-6); |
|
367 |
Component c = form.getComponentByName(componentName); |
|
367 | 368 |
if( c instanceof JButton ) { |
368 | 369 |
JButton button = (JButton) c; |
369 | 370 |
final String fnName = name; |
... | ... | |
395 | 396 |
} |
396 | 397 |
this.callUserEvent(USERCODE_FORM_ONSETVALUES, this, values); |
397 | 398 |
try { |
398 |
if( (boolean) this.callUserFunction(USERCODE_FORM_ISREADONLY, this, values) ) {
|
|
399 |
if( (boolean) this.callUserFunction(USERCODE_FORM_ISREADONLY, this) ) { |
|
399 | 400 |
this.setReadOnly(true); |
400 | 401 |
} |
401 | 402 |
} catch (Exception ex) { |
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.spi/src/main/java/org/gvsig/tools/dynform/spi/dynform/AbstractJDynForm.java | ||
---|---|---|
6 | 6 |
import java.awt.Dimension; |
7 | 7 |
import java.awt.event.MouseAdapter; |
8 | 8 |
import java.awt.event.MouseEvent; |
9 |
import java.io.IOException; |
|
10 | 9 |
import java.util.ArrayList; |
11 | 10 |
import java.util.HashMap; |
12 | 11 |
import java.util.HashSet; |
... | ... | |
42 | 41 |
import org.slf4j.Logger; |
43 | 42 |
import org.slf4j.LoggerFactory; |
44 | 43 |
|
44 |
@SuppressWarnings("UseSpecificCatch") |
|
45 | 45 |
public abstract class AbstractJDynForm implements JDynForm { |
46 | 46 |
|
47 | 47 |
protected static final Logger LOGGER = LoggerFactory.getLogger(AbstractJDynForm.class); |
... | ... | |
122 | 122 |
this.script = scriptManager.createScript(this.definition.getName(), source, null); |
123 | 123 |
this.script_initialized = true; |
124 | 124 |
return script; |
125 |
} catch (IOException ex) {
|
|
125 |
} catch (Exception ex) { |
|
126 | 126 |
LOGGER.warn("Can't load resource jfrms.", ex); |
127 | 127 |
this.script = null; |
128 | 128 |
this.script_initialized = true; |
Also available in: Unified diff