This is an automated email from the git hooks/post-receive script. New commit to branch feature/1293-addAccountViewerTab in repository lima. See http://git.chorem.org/lima.git commit 9031da64a227488078497a6f1bf3571dcee7269e Author: dcosse <cosse@codelutin.com> Date: Tue Sep 15 17:18:09 2015 +0200 refs #1293 Correction sur les dates pickers et la recherche de compte appliquée égallement à l'onglet Lettering --- .../lima/ui/accountViewer/AccountViewerViewHandler.java | 6 ++---- .../java/org/chorem/lima/ui/lettering/LetteringView.css | 8 ++++++++ .../java/org/chorem/lima/ui/lettering/LetteringView.jaxx | 6 ++---- .../chorem/lima/ui/lettering/LetteringViewHandler.java | 16 +++++++++++----- 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/accountViewer/AccountViewerViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/accountViewer/AccountViewerViewHandler.java index 7cef851..37a4ba7 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/accountViewer/AccountViewerViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/accountViewer/AccountViewerViewHandler.java @@ -411,10 +411,8 @@ public class AccountViewerViewHandler { } public void accountComboBoxChange(PropertyChangeEvent event) { - if (event.getPropertyName().equals(AccountComboBox.PROPERTY_SELECTED_ITEM)) { - if (event.getNewValue() != null && event.getNewValue() instanceof Account) { - setAccount((Account) event.getNewValue()); - } + if (event.getPropertyName().equals(AccountComboBox.PROPERTY_SELECTED_ITEM) && event.getNewValue() != null && event.getNewValue() instanceof Account) { + setAccount((Account) event.getNewValue()); } } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.css b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.css index 2663ad9..1dd3474 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.css +++ b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.css @@ -70,11 +70,19 @@ labelFor : {beginPeriodPicker}; } +#beginPeriodPicker { + patternLayout: {handler.DATE_FORMAT}; +} + #endPeriodLabel { text : "lima.lettering.period.end"; labelFor : {endPeriodPicker}; } +#endPeriodPicker { + patternLayout: {handler.DATE_FORMAT}; +} + #letteredEntryLabel { actionIcon : "choose-entry"; labelFor : {letteredEntryComboBox}; diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx index 76ee663..167c0fc 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx @@ -73,13 +73,11 @@ <JLabel id="beginPeriodLabel"/> <JAXXDatePicker id="beginPeriodPicker" - patternLayout="dd/MM/yyy" - onActionPerformed="handler.setDateStart(beginPeriodPicker.getDate())"/> + onPropertyChange="handler.setDateStart(beginPeriodPicker.getDate())"/> <JLabel id="endPeriodLabel"/> <JAXXDatePicker id="endPeriodPicker" - patternLayout="dd/MM/yyy" - onActionPerformed="handler.setDateEnd(endPeriodPicker.getDate())"/> + onPropertyChange="handler.setDateEnd(endPeriodPicker.getDate())"/> <JToolBar.Separator/> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java index ae2f440..360d557 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java @@ -76,6 +76,8 @@ import static org.nuiton.i18n.I18n.t; */ public class LetteringViewHandler{ + protected static String DATE_FORMAT = t("lima.ui.dateFormat"); + protected LetteringView view; protected LetteringTable table; @@ -451,7 +453,7 @@ public class LetteringViewHandler{ } public void accountComboBoxChange(PropertyChangeEvent event) { - if (event.getPropertyName().equals(AccountComboBox.PROPERTY_SELECTED_ITEM) && event.getNewValue() instanceof Account) { + if (event.getPropertyName().equals(AccountComboBox.PROPERTY_SELECTED_ITEM) && event.getNewValue() != null && event.getNewValue() instanceof Account) { setAccount((Account) event.getNewValue()); } } @@ -578,13 +580,17 @@ public class LetteringViewHandler{ public void setDateStart(Date date) { - filter.setDateStart(date); - updateAllEntries(); + if (initializationComplete) { + filter.setDateStart(date); + updateAllEntries(); + } } public void setDateEnd(Date date) { - filter.setDateEnd(date); - updateAllEntries(); + if (initializationComplete) { + filter.setDateEnd(date); + updateAllEntries(); + } } public void setAccount(Account account) { -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.