我想知道如何在我的视图中的tableView的同一列中插入不同的元素(FXML)我有一个包含“person”的组合框,一个输入人员编号的文本字段和一个按钮,并在表格中添加这些元素视图

FXML文件

<SplitPane dividerPositions="0.3002754820936639" focusTraversable="true" prefHeight="160.0" prefWidth="200.0">
 <items>
    <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
       <children>
            <TableView fx:id="personnes" minWidth="0.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
                 <columns>
                    <TableColumn prefWidth="200.0" text="Peronnes" fx:id="column">
                      <cellValueFactory>
                                        <PropertyValueFactory property="nom" />
                                    </cellValueFactory>
                                </TableColumn>
                              </columns>
                            </TableView>
                          </children>
                        </AnchorPane>
                        <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
                          <children>
                            <ComboBox fx:id="listPeronnes"  layoutX="25.0" layoutY="40.0" prefWidth="148.0">
                            </ComboBox>
                            <TextField fx:id="num" layoutX="25.0" layoutY="95.0" prefWidth="149.0" />
                            <Label layoutX="25.0" layoutY="78.0" prefWidth="66.0" text="numero" />
                            <Label layoutX="25.0" layoutY="14.0" prefWidth="66.0" text="Personnes" />
                            <Button onAction="#handleAdd"  layoutX="25.0" layoutY="121.0" mnemonicParsing="false" text="Ajouter" />
                          </children>
                        </AnchorPane>
                      </items>
                    </SplitPane>

所以我想要做的是,当用户启动应用程序时 . 他在textfield中输入了一个数字,我必须在tableview中插入这个数字,然后如果用户想要插入另一个persone,但是通过使用组合框,他在组合框中选择了一个人并将这个persone的名称添加到tableView中(所以我的表视图将包含数字和名称(两个字符串)

import java.net.URL;
import java.util.ResourceBundle;
import javafx.application.Platform;
import javafx.beans.property.ListProperty;
import javafx.beans.property.SimpleListProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.ComboBox;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.TextField;
import javafx.stage.Stage;




public class SampleController implements Initializable {

    private Stage stage;

    @FXML
    protected ComboBox<Personnes> listPeronnes;
    @FXML
    protected TableView personnes;

    @FXML
    protected TableColumn column;

    @FXML
    protected TextField num;
    ObservableList<Personnes> liste = 
    FXCollections.observableArrayList(new Personnes("personne 1", 1),new Personnes("Personne 2",2));
    protected ListProperty<String> prs=new SimpleListProperty<>(FXCollections.<String>observableArrayList());



    @FXML
    protected void handleAdd()
    {       prs.add(num.getText());
        prs.add(listPeronnes.getSelectionModel().getSelectedItem().getNom());
        personnes.getItems().setAll(prs);
    }
    @Override
    public void initialize(URL url, ResourceBundle rb) {
        listPeronnes.getItems().setAll(liste);
    }   
}