This is an automated email from the git hooks/post-receive script. New change to branch develop in repository lima. See http://git.chorem.org/lima.git from 4bbfd4d Merge branch 'feature/1286-ordered-entries' into develop new 636a5ba refs #1242 verifivation que l'on filtre bien sur un compte new ae8502c fixes #1243 la sortie du champ date ou le clic sur une autre action entraine bien la prise en compte des dates saisies new 2dc6345 refs #1242 Modification pour plus de lisibilité suite à revue de code Kevin new 79ebf7d refs #1242 Refactoring pour plus de lisibilité new 4d8ac91 refs #1242 correction de merge new 7288ae1 Merge branch 'feature/1242-no-account-research-exception' into develop The 6 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 7288ae1258c19ad0cc40eea32c7708cb212391dd Merge: 4bbfd4d 4d8ac91 Author: dcosse <cosse@codelutin.com> Date: Sat Nov 28 08:01:10 2015 +0100 Merge branch 'feature/1242-no-account-research-exception' into develop commit 4d8ac91969dbe651ba7aa851dd383c43a11b7871 Author: dcosse <cosse@codelutin.com> Date: Sat Nov 28 08:00:46 2015 +0100 refs #1242 correction de merge commit 79ebf7d220ed2688a10b0ad1e421fabd7d706e2c Author: dcosse <cosse@codelutin.com> Date: Mon Sep 28 17:15:06 2015 +0200 refs #1242 Refactoring pour plus de lisibilité commit 2dc6345cdd1916ea9f90e358e407dd02efd60f41 Author: dcosse <cosse@codelutin.com> Date: Mon Sep 28 16:43:18 2015 +0200 refs #1242 Modification pour plus de lisibilité suite à revue de code Kevin commit ae8502c6e4ead0749acab5d1b714228efbc35370 Author: dcosse <cosse@codelutin.com> Date: Tue Jun 30 16:55:21 2015 +0200 fixes #1243 la sortie du champ date ou le clic sur une autre action entraine bien la prise en compte des dates saisies commit 636a5ba8c0db0f3bc3fd6675c69b6abc108541cd Author: dcosse <cosse@codelutin.com> Date: Mon Jun 29 14:49:57 2015 +0200 refs #1242 verifivation que l'on filtre bien sur un compte Summary of changes: .../AccountCondition/AccountConditionHandler.java | 6 ++- .../ui/Filter/dateCondition/DateConditionView.jaxx | 2 +- .../DateIntervalConditionView.jaxx | 7 ++-- .../ui/financialtransaction/AccountColumn.java | 44 +++++++++++++++------- 4 files changed, 40 insertions(+), 19 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository lima. See http://git.chorem.org/lima.git commit 636a5ba8c0db0f3bc3fd6675c69b6abc108541cd Author: dcosse <cosse@codelutin.com> Date: Mon Jun 29 14:49:57 2015 +0200 refs #1242 verifivation que l'on filtre bien sur un compte --- .../lima/ui/Filter/AccountCondition/AccountConditionHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/AccountCondition/AccountConditionHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/AccountCondition/AccountConditionHandler.java index 4138fdc..e5ba896 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/AccountCondition/AccountConditionHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/AccountCondition/AccountConditionHandler.java @@ -80,7 +80,8 @@ public class AccountConditionHandler implements ConditionHandler { public void accountComboBoxChange(PropertyChangeEvent event) { if (event.getPropertyName().equals(AccountComboBox.PROPERTY_SELECTED_ITEM)) { - setAccount((Account) event.getNewValue()); + Account account = event.getNewValue() == null ? null : event.getNewValue() instanceof Account ? (Account) event.getNewValue() : null; + setAccount(account); } } } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository lima. See http://git.chorem.org/lima.git commit ae8502c6e4ead0749acab5d1b714228efbc35370 Author: dcosse <cosse@codelutin.com> Date: Tue Jun 30 16:55:21 2015 +0200 fixes #1243 la sortie du champ date ou le clic sur une autre action entraine bien la prise en compte des dates saisies --- .../org/chorem/lima/ui/Filter/dateCondition/DateConditionView.jaxx | 2 +- .../ui/Filter/dateIntervalCondition/DateIntervalConditionView.jaxx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateCondition/DateConditionView.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateCondition/DateConditionView.jaxx index 93e365c..7c7168f 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateCondition/DateConditionView.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateCondition/DateConditionView.jaxx @@ -39,5 +39,5 @@ <JAXXDatePicker id='datePicker' date='{handler.getDate()}' formats='{handler.getFormats()}' - onActionPerformed='handler.setDate(datePicker.getDate())'/> + onPropertyChange='handler.setDate(datePicker.getDate())'/> </JInternalFrame> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateIntervalCondition/DateIntervalConditionView.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateIntervalCondition/DateIntervalConditionView.jaxx index a5fa4f6..bf261b6 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateIntervalCondition/DateIntervalConditionView.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateIntervalCondition/DateIntervalConditionView.jaxx @@ -28,7 +28,8 @@ org.chorem.lima.beans.DateCondition </import> <DateIntervalConditionHandler id="handler" - javaBean="new DateIntervalConditionHandler(this)"/> + constructorParams="this"/> + <Table> <row> <cell> @@ -38,7 +39,7 @@ <JAXXDatePicker id='beginDatePicker' date='{handler.getBeginDate()}' formats='{handler.getFormats()}' - onActionPerformed='handler.setBeginDate(beginDatePicker.getDate())'/> + onPropertyChange='handler.setBeginDate(beginDatePicker.getDate())'/> </cell> </row> <row> @@ -49,7 +50,7 @@ <JAXXDatePicker id='endDatePicker' date='{handler.getEndDate()}' formats='{handler.getFormats()}' - onActionPerformed='handler.setEndDate(endDatePicker.getDate())'/> + onPropertyChange='handler.setEndDate(endDatePicker.getDate())'/> </cell> </row> </Table> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository lima. See http://git.chorem.org/lima.git commit 2dc6345cdd1916ea9f90e358e407dd02efd60f41 Author: dcosse <cosse@codelutin.com> Date: Mon Sep 28 16:43:18 2015 +0200 refs #1242 Modification pour plus de lisibilité suite à revue de code Kevin --- .../lima/ui/Filter/AccountCondition/AccountConditionHandler.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/AccountCondition/AccountConditionHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/AccountCondition/AccountConditionHandler.java index e5ba896..0dd92ed 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/AccountCondition/AccountConditionHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/AccountCondition/AccountConditionHandler.java @@ -80,7 +80,10 @@ public class AccountConditionHandler implements ConditionHandler { public void accountComboBoxChange(PropertyChangeEvent event) { if (event.getPropertyName().equals(AccountComboBox.PROPERTY_SELECTED_ITEM)) { - Account account = event.getNewValue() == null ? null : event.getNewValue() instanceof Account ? (Account) event.getNewValue() : null; + Account account = null; + if (event.getNewValue() != null && event.getNewValue() instanceof Account) { + account = (Account) event.getNewValue(); + } setAccount(account); } } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository lima. See http://git.chorem.org/lima.git commit 79ebf7d220ed2688a10b0ad1e421fabd7d706e2c Author: dcosse <cosse@codelutin.com> Date: Mon Sep 28 17:15:06 2015 +0200 refs #1242 Refactoring pour plus de lisibilité --- .../ui/financialtransaction/AccountColumn.java | 44 +++++++++++++++------- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/AccountColumn.java b/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/AccountColumn.java index e8484d0..a76504d 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/AccountColumn.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/AccountColumn.java @@ -50,19 +50,20 @@ public class AccountColumn extends AbstractColumn<FinancialTransactionTableModel @Override public boolean setValueAt(Object value, int row) { Entry entry = tableModel.get(row); - // In case of Account field being feed up but no account was selected - // the value is a String instead of Account. - Account account = value == null ? null : value instanceof Account ? (Account) value : null; - boolean update = ((entry.getAccount()) == null != (account == null)) - || (entry.getAccount() != null - && !entry.getAccount().getAccountNumber().equals(account.getAccountNumber())); + + Account selectedAccount = getSelectedAccount(value); + Account previousAccount = entry.getAccount(); + + boolean update = isValueChange(selectedAccount, previousAccount); + if (update) { - Account previousAccount = entry.getAccount(); - entry.setAccount(account); - if (!tableModel.updateEntry(entry)) { - update = revertAccountChange(entry, previousAccount); + entry.setAccount(selectedAccount); + boolean updateSucceed = !tableModel.updateEntry(entry); + if (updateSucceed) { + setDescriptionFieldIfNone(entry, selectedAccount); } else { setDescriptionFieldIfNone(entry, account); + update = revertAccountChange(entry, previousAccount); } } @@ -70,15 +71,32 @@ public class AccountColumn extends AbstractColumn<FinancialTransactionTableModel } protected void setDescriptionFieldIfNone(Entry entry, Account account) { + protected Account getSelectedAccount(Object value) { + Account newAccount = null; + if (value != null && value instanceof Account) { + newAccount = (Account) value; + } + return newAccount; + } + + protected boolean isValueChange(Account newAccount, Account previousAccount) { + boolean update; + if (previousAccount == null) { + update = newAccount != null; + } else { + update = newAccount == null || !previousAccount.getAccountNumber().equals(newAccount.getAccountNumber()); + } + return update; + } + + protected void setDescriptionFieldIfNone(Entry entry, Account account) { if (StringUtils.isBlank(entry.getDescription()) && account != null && StringUtils.isNotBlank(account.getLabel())) { entry.setDescription(account.getLabel()); } } protected boolean revertAccountChange(Entry entry, Account previousAccount) { - boolean update; entry.setAccount(previousAccount); - update = false; - return update; + return false; } } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository lima. See http://git.chorem.org/lima.git commit 4d8ac91969dbe651ba7aa851dd383c43a11b7871 Author: dcosse <cosse@codelutin.com> Date: Sat Nov 28 08:00:46 2015 +0100 refs #1242 correction de merge --- .../java/org/chorem/lima/ui/financialtransaction/AccountColumn.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/AccountColumn.java b/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/AccountColumn.java index a76504d..d0ebe8f 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/AccountColumn.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/AccountColumn.java @@ -62,7 +62,6 @@ public class AccountColumn extends AbstractColumn<FinancialTransactionTableModel if (updateSucceed) { setDescriptionFieldIfNone(entry, selectedAccount); } else { - setDescriptionFieldIfNone(entry, account); update = revertAccountChange(entry, previousAccount); } } @@ -70,7 +69,6 @@ public class AccountColumn extends AbstractColumn<FinancialTransactionTableModel return update; } - protected void setDescriptionFieldIfNone(Entry entry, Account account) { protected Account getSelectedAccount(Object value) { Account newAccount = null; if (value != null && value instanceof Account) { -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository lima. See http://git.chorem.org/lima.git commit 7288ae1258c19ad0cc40eea32c7708cb212391dd Merge: 4bbfd4d 4d8ac91 Author: dcosse <cosse@codelutin.com> Date: Sat Nov 28 08:01:10 2015 +0100 Merge branch 'feature/1242-no-account-research-exception' into develop .../AccountCondition/AccountConditionHandler.java | 6 ++- .../ui/Filter/dateCondition/DateConditionView.jaxx | 2 +- .../DateIntervalConditionView.jaxx | 7 ++-- .../ui/financialtransaction/AccountColumn.java | 44 +++++++++++++++------- 4 files changed, 40 insertions(+), 19 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm