java - Adding person.city.name to a TableView -
I have a TableView and some POJOs and want to pair with the property from one of them to TableView.
However, this property is also a POJO and should have a property to show it in the tableview.
Here's my code:
& lt; TableView fx: id = "ListaDeudores" layoutx = "85.0" layoutA = "7.0" preflight = "200.0" prefWidth = "200.0" & gt; & Lt; Columns & gt; & Lt; Table column prefWidth = "75.0" text = "archivo" & gt; & Lt; CellValueFactory & gt; & Lt; Property Valuation Property = "Archive" /> & Lt; / CellValueFactory & gt; & Lt; CellFactory & gt; & Lt; Formatted Tablesleachieur Alignment = "center" /> & Lt; / CellFactory & gt; & Lt; / TableColumn & gt; & Lt; Table column prefWidth = "299.0" text = "Nombres" & gt; & Lt; CellValueFactory & gt; & Lt; Property value factor = "number" /> & Lt; / CellValueFactory & gt; & Lt; CellFactory & gt; & Lt; Formatted Tablesleachieur Alignment = "center" /> & Lt; / CellFactory & gt; & Lt; / TableColumn & gt; & Lt; Tableclaim minwath = "0.0" prefWidth = "95.0" text = "real" & gt; & Lt; CellValueFactory & gt; & Lt; Property ValueFactor Property = "Dieda Saldo" /> & Lt; / CellValueFactory & gt; & Lt; CellFactory & gt; & Lt; Formatted Tablesleachieur Alignment = "center" /> & Lt; / CellFactory & gt; & Lt; / TableColumn & gt; & Lt; Table column prefWidth = "75.0" text = "neve" /> & Lt; Table column prefWidth = "75.0" text = "parcial" /> & Lt; / Column & gt; & Lt; / TableView & gt; `
and my personality
and devada
category:
public class Persona {Private Integer ID ; Private archive archive; Private string nomore; Private listing & lt; Receosy & gt; Recibos; Private Devda Devada; } Public Category Dauda {Private Date Fade; Private BigDecal Saldo; Private Big Dickel Nvevo; Private budiculous descent; }
I want to set Person.deuda.saldo in the fxml file, so I used to:
& lt; Table column minWidth = "0.0" prefWidth = "95.0" text = "real" & gt; & Lt; CellValueFactory & gt; & Lt; Property ValueFactor Property = "Dieda Saldo" /> & Lt; / CellValueFactory & gt; & Lt; CellFactory & gt; & Lt; Formatted Tablesleachieur Alignment = "center" /> & Lt; / CellFactory & gt; & Lt; / TableColumn & gt;
But this will not render anything in my table view. How can I fix this?
You can not use PropertyValueFactory
Do this: > Callback needs to be implemented.
Parsossata, Bigdesky & gt; Actual columns;
and in your controller's initialize ()
method, do the following:
actual column.SetelValifyFactine (celldata-> New redone object vapor & lt; BigDecimal & gt; (cellData.getValue () getDeuda () getSaldo () ..));
Comments
Post a Comment