This is an automated email from the git hooks/post-receive script. New commit to branch feature/1223 in repository lima. See http://git.chorem.org/lima.git commit c77121333bce53bc94d4067c80a805888a69b3c0 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Apr 8 10:02:37 2015 +0200 refs #1223: l'onglet lettrage est peu réactif --- .../java/org/chorem/lima/entity/EntryTopiaDao.java | 3 +-- .../lima/ui/lettering/LetteringViewHandler.java | 27 ++++++++++++---------- .../org/chorem/lima/ui/lettering/TypeEntry.java | 6 ++--- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/entity/EntryTopiaDao.java b/lima-business/src/main/java/org/chorem/lima/entity/EntryTopiaDao.java index bf49d86..8dcc557 100644 --- a/lima-business/src/main/java/org/chorem/lima/entity/EntryTopiaDao.java +++ b/lima-business/src/main/java/org/chorem/lima/entity/EntryTopiaDao.java @@ -192,8 +192,7 @@ public class EntryTopiaDao extends AbstractEntryTopiaDao<Entry> { Account account = filter.getAccount(); if (account == null || account.getTopiaId() != null) { - builder.addLike(Entry.PROPERTY_ACCOUNT + "." + Account.PROPERTY_ACCOUNT_NUMBER, - filter.getAccount().getAccountNumber() + "%"); + builder.addEquals(Entry.PROPERTY_ACCOUNT, account); } String alias = builder.getAlias(); 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 d0a832c..ab032dd 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 @@ -94,7 +94,11 @@ public class LetteringViewHandler{ protected enum ButtonMode {DELETTRED, LETTRED, EQUALIZED, ALL} private static final Log log = LogFactory.getLog(LetteringViewHandler.class); + + protected boolean initializationComplete; + public LetteringViewHandler(LetteringView view) { + initializationComplete = false; this.view = view; initShortCuts(); financialPeriodService = LimaServiceFactory.getService(FinancialPeriodService.class); @@ -141,6 +145,11 @@ public class LetteringViewHandler{ } }); + initializationComplete = true; + + updateAllEntries(); + + } protected void initShortCuts() { @@ -390,16 +399,6 @@ public class LetteringViewHandler{ TypeEntry type = view.getLetteredEntryComboBox().getSelectedItem(); setTypeEntry(type); - - updateAllEntries(); - } - - protected List<Entry> findAllEntries(LetteringFilterImpl filter){ - if (filter != null) { - List<Entry> entries = financialTransactionService.getAllEntrieByDatesAndAccountAndLettering(filter); - return entries; - } - return null; } public void setDateStart(Date date) { @@ -425,12 +424,16 @@ public class LetteringViewHandler{ public void updateAllEntries() { - if (filter.getAccount() != null && filter.getDateStart() != null && filter.getDateEnd() != null) { + if (initializationComplete + && filter.getAccount() != null + && filter.getDateStart() != null + && filter.getDateEnd() != null) { - List<Entry> entries = findAllEntries(filter); + List<Entry> entries = financialTransactionService.getAllEntrieByDatesAndAccountAndLettering(filter); view.getTableModel().setValues(entries); } + onBalanceChanged(null); } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/TypeEntry.java b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/TypeEntry.java index c44fcad..6fd4c90 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/TypeEntry.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/TypeEntry.java @@ -29,11 +29,11 @@ import static org.nuiton.i18n.I18n.t; */ public enum TypeEntry { - LETTERED(true, false), + ALL(true, true), - NO_LETTERED(false, true), + LETTERED(true, false), - ALL(true, true); + NO_LETTERED(false, true); private boolean lettered; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.