Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Show Name by Id column tableview - Javafx

 
maurikius Fr
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
first of all I introduce myself, my name is Maurikius and I am a programmer, I'm currently trying to update some swing fx projects, I have a problem with a table view, I have a SALES model where I store among other things the id of the client, but in table view want the customer name is displayed, and I have a method that returns me the name through the ID, but being linked with model table not know how to do it manually.

Class Sale




impl DAO (Get Name by id)




Table View


 
Knute Snortum
Bartender
Pie
Posts: 2903
62
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From what I can see, this is what you need:

  • Setup getters for the properties of all your fields in the class Sales


  • Get this property for the CellValueFactory in TableView


  • Also, you can set your property values like this:
     
    maurikius Fr
    Greenhorn
    Posts: 2
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Knute Snortum wrote:From what I can see, this is what you need:

  • Setup getters for the properties of all your fields in the class Sales


  • Get this property for the CellValueFactory in TableView


  • Also, you can set your property values like this:



    My solution working

     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic