title: Using ChangeListener in @ActionMethod
body: <p>I have created an application, it shows table of accounts. What I want is when I select any row from this table and press <code>delete</code> Button, hibernate will change field state to 0 in <code>AccountTable</code> (0 - stands for deleted account, 1 - for active).</p>
  
  <p>For now, I can't incorporate <code>ChangeListener</code> into <code>@ActionMethod</code></p>
  
  <pre><code>public ChangeListener&lt;PositionAccount&gt; deleteAccount = (observable, oldValue, newValue) -&gt; {
          DeleteAccount input = new DeleteAccount();
          input.setAccountId(newValue.getId());
  
          service.deleteAccount(input,context.getTaskView(),result -&gt; {
  
          });
      };
  </code></pre>
  
  <p>into</p>
  
  <pre><code>@ActionMethod(ACTION_DELETE_ACCOUNT)
      public void deleteAccount(){
          DeleteAccount input = new DeleteAccount();
  
          service.deleteAccount(input, context.getTaskView(), result -&gt; {
              model.getAccounts().addAll(result.getAccount());
              tv_loro_nostro_accounts.getSelectionModel().selectFirst();
          });
      }
  </code></pre>
  
  <p>I guess input in last code should be <code>ID</code> that is set on first code. How to put these two parts together?</p>
  
  <p>And what hibernate methods should I use to update table? Thanks</p>