Modified transactional wrapper to avoid duplicating session

FEA: ItEr77S17AutomaticBudgeting
This commit is contained in:
Lorenzo Tilve Álvaro 2013-06-17 19:54:26 +02:00
parent 37858bb491
commit 2ccb291570
2 changed files with 2 additions and 12 deletions

View file

@ -1898,8 +1898,7 @@ public class OrderCRUDController extends GenericForwardComposer {
}
public BigDecimal getResourcesBudget() {
return Registry.getTransactionService()
.runOnAnotherReadOnlyTransaction(
return Registry.getTransactionService().runOnReadOnlyTransaction(
new IOnTransaction<BigDecimal>() {
@Override

View file

@ -625,16 +625,7 @@ public class OrderElementTreeController extends TreeController<OrderElement> {
}
public void addResourcesBudgetCell(final OrderElement currentElement) {
BigDecimal value = Registry.getTransactionService()
.runOnAnotherReadOnlyTransaction(
new IOnTransaction<BigDecimal>() {
@Override
public BigDecimal execute() {
return currentElement.getResourcesBudget();
}
});
// BigDecimal value = currentElement.getResourcesBudget();
BigDecimal value = currentElement.getResourcesBudget();
Textbox autoBudgetCell = new Textbox(Util.addCurrencySymbol(value));
autoBudgetCell.setDisabled(true);
addCell(autoBudgetCell);