Revision 44346 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/featureform/swing/impl/DefaultJFeaturesForm.java
DefaultJFeaturesForm.java | ||
---|---|---|
414 | 414 |
|
415 | 415 |
@Override |
416 | 416 |
public void update(Observable observable, Object notification) { |
417 |
if( store == null || formset==null ) { |
|
418 |
return; |
|
419 |
} |
|
417 | 420 |
if( notification instanceof FeatureStoreNotification ) { |
418 | 421 |
FeatureStoreNotification n = (FeatureStoreNotification) notification; |
419 | 422 |
switch( n.getType() ) { |
... | ... | |
465 | 468 |
|
466 | 469 |
@Override |
467 | 470 |
public void update(Observable observable, Object notification) { |
471 |
if( store == null || formset==null ) { |
|
472 |
return; |
|
473 |
} |
|
468 | 474 |
if( notification instanceof FeatureStoreNotification ) { |
469 | 475 |
FeatureStoreNotification n = (FeatureStoreNotification) notification; |
470 | 476 |
switch( n.getType() ) { |
... | ... | |
518 | 524 |
} |
519 | 525 |
|
520 | 526 |
private void saveChanges(JDynFormSet dynformSet) { |
527 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
521 | 528 |
if( dynformSet.isInNewState() ) { |
522 | 529 |
Feature feat = null; |
523 | 530 |
try { |
... | ... | |
541 | 548 |
} catch(Exception ex) { |
542 | 549 |
LOGGER.warn("Can't reload form data after insert.",ex); |
543 | 550 |
} |
551 |
this.formset.message(i18n.getTranslation("_Record_saved")); |
|
544 | 552 |
} else { |
545 | 553 |
int index = dynformSet.getCurrentIndex(); |
546 | 554 |
DynObject dynObject = dynformSet.get(index); |
547 | 555 |
|
548 | 556 |
if ( !(dynObject instanceof FacadeOfAFeature) ) { |
549 | 557 |
LOGGER.warn("Can't get the associated feature index " + index); |
550 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
551 |
dynformSet.message(i18nManager.getTranslation("error_saving_data_will_not_save")); |
|
558 |
dynformSet.message(i18n.getTranslation("error_saving_data_will_not_save")); |
|
552 | 559 |
throw new RuntimeException("Can't save values"); |
553 | 560 |
} |
554 | 561 |
dynformSet.getFormValues(dynObject); |
Also available in: Unified diff