1 Reply Latest reply: Oct 29, 2012 5:32 PM by Doug89 RSS

    Table view with combo box

    Doug89
      hi guys, i am trying implement a combo box inside the table view using FXML, but i have a next error

      *Unable to coerce TableView[id=tableView, styleClass=table-view] to interface javafx.util.Callback.
      file:/C:/Documents%20and%20Settings/bc11736/Mis%20documentos/NetBeansProjects/JavaFXApplication16/dist/JavaFXApplication16.jar!/javafxapplication16/Sample.fxml:19*

      Sample.fxml

      <?xml version="1.0" encoding="UTF-8"?>

      <?import java.lang.*?>
      <?import java.util.*?>
      <?import javafx.scene.*?>
      <?import javafx.scene.control.cell.PropertyValueFactory?>
      <?import javafx.scene.control.Pagination?>
      <?import javafx.scene.control.*?>
      <?import javafx.scene.layout.*?>

      <AnchorPane id="AnchorPane" prefHeight="200" prefWidth="320" xmlns:fx="http://javafx.com/fxml" fx:controller="javafxapplication16.SampleController">
      <children>
      <Button layoutX="126" layoutY="90" text="Click Me!" onAction="#handleButtonAction" fx:id="button" />
      <Label layoutX="126" layoutY="120" minHeight="16" minWidth="69" fx:id="label" />
      <Pagination prefHeight="40" prefWidth="150" >
      <pageFactory>
      <TableView fx:id="tableView" GridPane.columnIndex="0"
      GridPane.rowIndex="1">
      <columns>
      <TableColumn fx:id="firstNameColumn" text="First Name" prefWidth="100">
      <cellValueFactory>
      <PropertyValueFactory property="name" />
      </cellValueFactory>
      </TableColumn>
      </columns>
      </TableView>
      </pageFactory>
      </Pagination>
      </children>
      </AnchorPane>