2014-07-02 59 views
-1

我已經使用Fxml中的onEditCommit事件來檢索用戶編輯後的數據。如何解決事件onEditCommit的類型不匹配錯誤?

FXML碼 - :

<TableColumn editable="true" maxWidth="5000.0" minWidth="10.0" onEditCancel="#editEnd_0" onEditStart="#editStart_0" onEditCommit="#editCommit_0" prefWidth="136.0" text="Description Of Goods" fx:id="value_0" /> 

實現onEditCommit事件 - :

public void editCommit_0(CellEditEvent<Record,String> event) 
    { 

     System.out.println("Value edited: On edit new value is "+event.getNewValue()); 
    } 

錯誤 - :

Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: argument type mismatch 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:483) 
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) 
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:483) 
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) 
    at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1763) 
    at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1651) 
    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86) 
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238) 
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191) 
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) 
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) 
    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) 
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49) 
    at javafx.event.Event.fireEvent(Event.java:204) 
    at javafx.scene.control.TableCell.commitEdit(TableCell.java:335) 
    at javafx.scene.control.cell.CellUtils$4.handle(CellUtils.java:252) 
    at javafx.scene.control.cell.CellUtils$4.handle(CellUtils.java:243) 
    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86) 
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238) 
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191) 
    at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59) 
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) 
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) 
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) 
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) 
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) 
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) 
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) 
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) 
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) 
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) 
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) 
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) 
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) 
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) 
    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) 
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54) 
    at javafx.event.Event.fireEvent(Event.java:204) 
    at javafx.scene.Scene$KeyHandler.process(Scene.java:3949) 
    at javafx.scene.Scene$KeyHandler.access$2100(Scene.java:3896) 
    at javafx.scene.Scene.impl_processKeyEvent(Scene.java:2036) 
    at javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2493) 
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:170) 
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:123) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:197) 
    at com.sun.glass.ui.View.handleKeyEvent(View.java:517) 
    at com.sun.glass.ui.View.notifyKey(View.java:927) 
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) 
    at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39) 
    at com.sun.glass.ui.win.WinApplication$4$1.run(WinApplication.java:112) 
    at java.lang.Thread.run(Thread.java:745) 

完整代碼 - :

Controller.java 

/* 
* To change this license header, choose License Headers in Project Properties. 
* To change this template file, choose Tools | Templates 
* and open the template in the editor. 
*/ 

package com.techi.calco.transaction.controller; 

import com.techi.calco.Main; 
import com.techi.calco.model.ItemGroup; 
import com.techi.calco.util.EditingCell; 
import com.techi.calco.model.Record; 
import com.techi.calco.service.ItemService; 
import com.techi.calco.util.ButtonCell; 
import java.net.URL; 
import java.util.Random; 
import java.util.ResourceBundle; 
import javafx.beans.property.IntegerProperty; 
import javafx.beans.property.SimpleBooleanProperty; 
import javafx.beans.property.SimpleIntegerProperty; 
import javafx.beans.value.ObservableValue; 
import javafx.collections.FXCollections; 
import javafx.collections.ObservableList; 
import javafx.event.ActionEvent; 
import javafx.fxml.FXML; 
import javafx.fxml.Initializable; 
import javafx.scene.control.Button; 
import javafx.scene.control.TableCell; 
import javafx.scene.control.TableColumn; 
import javafx.scene.control.TableView; 
import javafx.scene.control.TreeTableColumn.CellEditEvent; 
import javafx.scene.control.cell.PropertyValueFactory; 
import javafx.scene.control.cell.TextFieldTableCell; 
import javafx.util.Callback; 
import np.com.ngopal.control.AutoFillTextBox; 


/** 
* FXML Controller class 
* 
* @author Vipin Bhatt 
*/ 
public class SaleInvoiceController implements Initializable { 


    public static ObservableList<Record> data = FXCollections.observableArrayList(); 
//public static ObservableList<String> data = FXCollections.observableArrayList(); 



    // Implemented 25 6 
    ObservableList<String> data5; 
    private ObservableList<ItemGroup> data2 = FXCollections.observableArrayList(); 

    ItemService itemService = itemService=(ItemService)Main.applicationContext.getBean("itemService"); 


    private ObservableList<ItemGroup> vatData = FXCollections.observableArrayList(); 


    String[] smooth; 
    String[] items; 
    static int sk5; 

    @FXML 
    private TableView<Record> tableView ; 
    //private TableView<String> tableView ; 


    @FXML 
    private AutoFillTextBox autoFill; 

    @FXML 
    private Button addNew,btnNew; 

    static Random random = new Random(); 

    @FXML 
    //private TableColumn col_id,value_0,value_1,value_2,value_3,value_4 ,col_Action,sale_invoiceNo; 
    private TableColumn<Record, String> col_id,value_0,value_1,value_2,value_3,value_4 ,col_Action,sale_invoiceNo; 

     //index for delete Item 
    private IntegerProperty index = new SimpleIntegerProperty(); 

    /** 
    * Initializes the controller class. 
    */ 
    @Override 
    public void initialize(URL url, ResourceBundle rb) { 
     // TODO 

      System.out.println("Get text saleinvoice--->"+btnNew.getText()); 
      tableView.setEditable(true); 


     index.set(-1); 



      Callback<TableColumn, TableCell> cellFactory = 
       new Callback<TableColumn, TableCell>() 
       { 

        @Override 
        public TableCell call(TableColumn p) { 
         return new EditingCell(); 
        } 
       }; 


      // searchAction("a"); 



      col_id.setCellValueFactory(new PropertyValueFactory<Record, String>("id")); 
      //col_id.setCellValueFactory(new PropertyValueFactory<String, String>("id")); 

      value_0.setCellValueFactory(new PropertyValueFactory<Record, String>("value_0")); 
      //value_0.setCellValueFactory(new PropertyValueFactory<String, String>("value_0")); 

      //value_0.setCellValueFactory(new PropertyValueFactory<ItemService, String>("itemGroupName")); 


      //value_1.setCellValueFactory(new PropertyValueFactory<Record, Integer>("value_1")); 
      // value_2.setCellValueFactory(new PropertyValueFactory<Record, String>("value_2")); 
      //value_3.setCellValueFactory(new PropertyValueFactory<Record, String>("value_3")); 
      //value_4.setCellValueFactory(new PropertyValueFactory<Record, String>("value_4")); 


       System.out.println("\ngettiing Cell value factore-:" +value_0.getCellValueFactory()); 


     /* 
      col_Action.setCellValueFactory(
       new Callback<TableColumn.CellDataFeatures<Record, Boolean>, 
       ObservableValue<Boolean>>() { 

      @Override 
      public ObservableValue<Boolean> call(TableColumn.CellDataFeatures<Record, Boolean> p) { 
       return new SimpleBooleanProperty(p.getValue() != null); 
      } 


     }); 

     col_Action.setCellFactory(
       new Callback<TableColumn<Record, Boolean>, TableCell<Record, Boolean>>() { 

      @Override 
      public TableCell<Record, Boolean> call(TableColumn<Record, Boolean> p) { 
       return new ButtonCell(); 
      } 

     }); 

      */ 

      //value_0.setCellFactory(cellFactory); 
      //value_1.setCellFactory(cellFactory); 
      //value_2.setCellFactory(cellFactory); 
      //value_3.setCellFactory(cellFactory); 

      value_0.setCellFactory(TextFieldTableCell.forTableColumn()) ; 
      //value_1.setCellFactory(TextFieldTableCell.forTableColumn()) ; 
      // value_2.setCellFactory(TextFieldTableCell.forTableColumn()) ; 
      //value_3.setCellFactory(TextFieldTableCell.forTableColumn()) ; 


       tableView.setItems(data); 



     searchAction("a"); 
    }  



    //Implemented 25 6 

     public String searchAction(String value) 
    { 

     System.out.println("Inside searchAction() SaleInvoiceController inside transaction.controller->"+itemService); 
     //itemService = new ItemService(); 
     data2=itemService.searchAction(value); 


     String quick = data2.get(0).getItemGroupName(); 
     System.out.println("Checking quick ->"+quick); 

     String[] smooth = new String[data2.size()]; 

     for (int i=0;i<data2.size();i++){ 

     // smooth[i] = data2.get(i).getItemGroupName(); 
      smooth[i] = data2.get(i).getItemGroupName()+"-"+data2.get(i).getId(); 

     } 



     for(String str : smooth) 
     { 
     System.out.println("-------"+str); 
     } 

     data5 = FXCollections.observableArrayList(smooth); 

    autoFill.setData(data5); 


     // 

     return value; 


     /* 
      data2 = itemService.searchAction(value); 

     String quick = data2.get(0).getItemGroupName(); 
     System.out.println("Checking quick ->" + quick); 

     smooth = new String[data.size()]; 

     for (int i = 0; i < data.size(); i++) { 

      smooth[i] = data2.get(i).getItemGroupName()+"-"+data2.get(i).getId(); 

     } 

     for (String str : smooth) { 
      System.out.println("-------" + str); 
     } 

     data5 = FXCollections.observableArrayList(smooth); 

     autoFill.setData(data5); 

     return value; 
     */ 


    } 



    public void editStart_0() 
    { 

    String a = tableView.getSelectionModel().getSelectedItem().getValue_0(); 
    System.out.println("Getting Sales column data before Update -"+a); 

    } 


    public void editEnd_0() 
    { 

     String a = tableView.getSelectionModel().getSelectedItem().getValue_0(); 
    System.out.println("Getting Sales column data after Update -"+a); 
    } 


    public void editCommit_0(CellEditEvent<Record,String> event) 
    { 

     // System.out.println("Value edited: On edit new value is "+event.getNewValue()); 
    } 



    public void newRecord(ActionEvent event) 
    { 
     System.out.println("Hello Add NEw Record"); 
     //generate new Record with random number 
      int newId = data.size()+1; 


      /* 
      Record newRec = new Record(
        newId, 

        random.nextInt(100), 
        random.nextInt(100), 
        random.nextInt(100), 
        random.nextInt(100), 
        random.nextInt(100)); 

        data.add(newRec); 
        */ 


      Record newRec = new Record(
        newId,"ram1","ram2","ram3","ram4","ram5"); 



        data.add(newRec); 

      System.out.println("LIST SIZE---->"+SaleInvoiceController.data.size()); 
    } 




    public void addNew(ActionEvent event) 
    { 
     System.out.println("addNew"); 


    } 



} 

Record.java(吸氣setter方法)

private int id; 
     private String value_0; 
     private String value_1; 
     private String value_2; 
     private String value_3; 
     private String value_4; 



     public Record(int i,String a, String b, String c, String d, String e) 
     { 
      this.id = i; 
      this.value_0 = a; 
      this.value_1 = b; 
      this.value_2=c; 
      this.value_3=d; 
      this.value_4 = e; 
     } 

    /** 
    * @return the id 
    */ 
    public int getId() { 
     return id; 
    } 

    /** 
    * @param id the id to set 
    */ 
    public void setId(int id) { 
     this.id = id; 
    } 

    /** 
    * @return the value_0 
    */ 
    public String getValue_0() { 
     return value_0; 
    } 

    /** 
    * @param value_0 the value_0 to set 
    */ 
    public void setValue_0(String value_0) { 
     this.value_0 = value_0; 
    } 

    /** 
    * @return the value_1 
    */ 
    public String getValue_1() { 
     return value_1; 
    } 

    /** 
    * @param value_1 the value_1 to set 
    */ 
    public void setValue_1(String value_1) { 
     this.value_1 = value_1; 
    } 

    /** 
    * @return the value_2 
    */ 
    public String getValue_2() { 
     return value_2; 
    } 

    /** 
    * @param value_2 the value_2 to set 
    */ 
    public void setValue_2(String value_2) { 
     this.value_2 = value_2; 
    } 

    /** 
    * @return the value_3 
    */ 
    public String getValue_3() { 
     return value_3; 
    } 

    /** 
    * @param value_3 the value_3 to set 
    */ 
    public void setValue_3(String value_3) { 
     this.value_3 = value_3; 
    } 

    /** 
    * @return the value_4 
    */ 
    public String getValue_4() { 
     return value_4; 
    } 

    /** 
    * @param value_4 the value_4 to set 
    */ 
    public void setValue_4(String value_4) { 
     this.value_4 = value_4; 
    } 


} 

請幫我解決這個錯誤,我應該把什麼類型的onEditCommit事件的實現。 我已經印列單元格的值工廠

value_0.getCellValueFactory() 

,並得到

[email protected] 

EditingCell.java - :

/* 
* To change this license header, choose License Headers in Project Properties. 
* To change this template file, choose Tools | Templates 
* and open the template in the editor. 
*/ 

package com.techi.calco.util; 


import javafx.event.EventHandler; 
import javafx.scene.chart.XYChart; 
import javafx.scene.control.ContentDisplay; 
import javafx.scene.control.TableCell; 
import javafx.scene.control.TextField; 
import javafx.scene.input.KeyCode; 
import javafx.scene.input.KeyEvent; 

/** 
* 
* @author Vipin Bhatt 
*/ 
/* 
public class EditingCell extends TableCell<XYChart.Data, Number> { 


    private TextField textField; 

     public EditingCell() {} 

     @Override 
     public void startEdit() { 

      System.out.println("StarEdit Called when"); 

      super.startEdit(); 
       System.out.println("Editing cell"); 
      if (textField == null) { 
       createTextField(); 
      } 

      setGraphic(textField); 
      setContentDisplay(ContentDisplay.GRAPHIC_ONLY); 
      textField.selectAll(); 
     } 

     @Override 
     public void cancelEdit() { 
      super.cancelEdit(); 

      setText(String.valueOf(getItem())); 
      setContentDisplay(ContentDisplay.TEXT_ONLY); 
     } 

     @Override 
     public void updateItem(Number item, boolean empty) { 
      super.updateItem(item, empty); 

      if (empty) { 
       setText(null); 
       setGraphic(null); 
      } else { 
       if (isEditing()) { 
        if (textField != null) { 
         textField.setText(getString()); 
        } 
        setGraphic(textField); 
        setContentDisplay(ContentDisplay.GRAPHIC_ONLY); 
       } else { 
        setText(getString()); 
        setContentDisplay(ContentDisplay.TEXT_ONLY); 
       } 
      } 
     } 

     private void createTextField() { 
      textField = new TextField(getString()); 
      textField.setMinWidth(this.getWidth() - this.getGraphicTextGap()*2); 
      textField.setOnKeyPressed(new EventHandler<KeyEvent>() { 

       @Override 
       public void handle(KeyEvent t) { 
        if (t.getCode() == KeyCode.ENTER) { 
         commitEdit(Integer.parseInt(textField.getText())); 
        } else if (t.getCode() == KeyCode.ESCAPE) { 
         cancelEdit(); 
        } 
       } 
      }); 
     } 

     private String getString() { 
      return getItem() == null ? "" : getItem().toString(); 
     } 

} 
*/ 

public class EditingCell extends TableCell<XYChart.Data, Number> { 

     private TextField textField; 

     public EditingCell() {} 

     @Override 
     public void startEdit() { 

      super.startEdit(); 

      if (textField == null) { 
       createTextField(); 
      } 

      setGraphic(textField); 
      setContentDisplay(ContentDisplay.GRAPHIC_ONLY); 
      textField.selectAll(); 
     } 

     @Override 
     public void cancelEdit() { 
      super.cancelEdit(); 

      setText(String.valueOf(getItem())); 
      setContentDisplay(ContentDisplay.TEXT_ONLY); 
     } 

     @Override 
     public void updateItem(Number item, boolean empty) { 
      super.updateItem(item, empty); 

      if (empty) { 
       setText(null); 
       setGraphic(null); 
      } else { 
       if (isEditing()) { 
        if (textField != null) { 
         textField.setText(getString()); 
        } 
        setGraphic(textField); 
        setContentDisplay(ContentDisplay.GRAPHIC_ONLY); 
       } else { 
        setText(getString()); 
        setContentDisplay(ContentDisplay.TEXT_ONLY); 
       } 
      } 
     } 

     private void createTextField() { 
      textField = new TextField(getString()); 
      textField.setMinWidth(this.getWidth() - this.getGraphicTextGap()*2); 
      textField.setOnKeyPressed(new EventHandler<KeyEvent>() { 

       @Override 
       public void handle(KeyEvent t) { 
        if (t.getCode() == KeyCode.ENTER) { 
         commitEdit(Integer.parseInt(textField.getText())); 
        } else if (t.getCode() == KeyCode.ESCAPE) { 
         cancelEdit(); 
        } 
       } 
      }); 
     } 

     private String getString() { 
      return getItem() == null ? "" : getItem().toString(); 
     } 
    } 
+0

你能告訴你的EditCell類的實現,也許有些不妥。 – Patrick

+0

好的,你正在尋找EditCell類完整的代碼 - :我編輯 – user3675069

+1

在我看來,錯誤在這裏:'公共類EditingCell擴展TableCell '和val_0'TableColumn'你想編輯是鍵入到'TableColumn ',以便將類型從'String'變爲'Number'。否則,你可以使用@jewelsea的解決方案,這將工作! – Patrick

回答

2

事件處理程序類型看起來好像沒什麼問題。我的猜測是類型不匹配發生在其他地方。

樣品

這裏是一個演示了使用FXML時設置提交事件處理程序的樣品。冗長的道歉,這就是FXML的方式。

編輯提交樣品中的處理程序是:

@FXML 
void commitValue(TableColumn.CellEditEvent<Singular, String> event) { 
    System.out.println("Commit: " + event.getNewValue()); 
} 

其中Singluar是TableView中用於樣品備案只是類的名稱。

提交/ CommitController.java

import javafx.beans.property.SimpleStringProperty; 
import javafx.beans.property.StringProperty; 
import javafx.fxml.FXML; 
import javafx.scene.control.TableColumn; 
import javafx.scene.control.TableView; 
import javafx.scene.control.cell.PropertyValueFactory; 
import javafx.scene.control.cell.TextFieldTableCell; 

public class CommitController { 

    @FXML 
    private TableView<Singular> table; 

    @FXML 
    private TableColumn<Singular, String> value; 

    @FXML 
    void commitValue(TableColumn.CellEditEvent<Singular, String> event) { 
     System.out.println("Commit: " + event.getNewValue()); 
    } 

    public void initialize() { 
     value.setCellFactory(TextFieldTableCell.forTableColumn()); 
     value.setCellValueFactory(new PropertyValueFactory<>("value")); 
     value.setEditable(true); 

     table.getItems().setAll(
       new Singular("enie"), 
       new Singular("meenie"), 
       new Singular("minie"), 
       new Singular("moe"), 
       new Singular("just commit!") 
     ); 
     table.setEditable(true); 
    } 

    public static class Singular { 
     private StringProperty value = new SimpleStringProperty(); 

     public Singular(String value) { 
      this.value.setValue(value); 
     } 

     public StringProperty valueProperty() { 
      return value; 
     } 
    } 
} 

提交/ CommitmentApp.java

import javafx.application.Application; 
import javafx.fxml.FXMLLoader; 
import javafx.scene.Parent; 
import javafx.scene.Scene; 
import javafx.stage.Stage; 

import java.io.IOException; 

public class CommitmentApp extends Application { 

    @Override 
    public void start(Stage stage) throws IOException { 
     stage.setScene(new Scene(createContent())); 
     stage.show(); 
    } 

    private Parent createContent() throws IOException { 
     FXMLLoader loader = new FXMLLoader(); 

     return loader.load(
      getClass().getResourceAsStream("commit.fxml") 
     ); 
    } 

    public static void main(String[] args) { 
     launch(args); 
    } 
} 

commit.fxml

<?import javafx.scene.control.TableColumn?> 
<?import javafx.scene.control.TableView?> 
<TableView fx:id="table" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="130.0" prefWidth="113.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="commit.CommitController"> 
    <columns> 
    <TableColumn fx:id="value" onEditCommit="#commitValue" prefWidth="85.0" text="C1" /> 
    </columns> 
</TableView> 
+0

,所以你建議改進我的代碼...我認爲..根據你沒有需要改進 – user3675069

+0

Thankyou非常。 – user3675069

0

我做了這些更改。 在EditingCell.java

public class EditingCell extends TableCell<Record, String> { 
在EditController

。JVA 剛剛添加的TableColumn

public void columnEdit(TableColumn.CellEditEvent<Record,String> event)