public class OrderEdit extends AbstractEditor<Order> {
    @Override
    protected void initNewItem(Order item) {
        super.initNewItem(item);
        item.setStatus(OrderStatus.NEW);
    }
}

@@ -48,16 +48,255 @@
 rder%3E %7B%0A
+%0A    @Inject%0A    private OrderService orderService;%0A%0A    @Override%0A    protected boolean preCommit() %7B%0A        Order order = getItem();%0A        order.setAmount(orderService.calculateAmount(order));%0A        return super.preCommit();%0A    %7D%0A%0A
     @Ove

Update OrderEdit.java