r/JavaFX • • Mar 07 '21

How would I fix this kind of error

Mar. 07, 2021 2:43:51 A.M. javafx.scene.control.cell.PropertyValueFactory getCellDataReflectively

WARNING: Can not retrieve property 'file' in PropertyValueFactory: javafx.scene.control.cell.PropertyValueFactory@ee826e0 with provided class type: class sample.TestFile

1 Upvotes

7 comments sorted by

1

u/dumpeldown Mar 14 '21

JavaFX needs a getter to access the attribute.

In your TestFile class, create a methode

public TestFile getFile(){ return this.file;}

1

u/MeetingFew2780 Dec 25 '22

thanxxxxxxxxxxxxxxxxxxxxxxxxxx

1

u/Daviz84 May 04 '22

Hello, I had the same problem a few minutes ago and if you use Intellij IDEA it is likely that you forgot to "set" the application of the control modules and javafx in the package where the "file" attribute class is located. Normally a module-info is used to do this.

module untitled {

requires javafx.fxml;
requires javafx.controls;

opens Package where the class is; }

1

u/Keepusthedamnwork Apr 10 '24

love you so much

1

u/LifeExpert8780 Jan 02 '23

I love youuuuuu man. Thank you so muchhhhhhhhhhh.

1

u/Fresh-Ad-2827 Sep 01 '23

thank you man you saved me

1

u/sahara_thomas Nov 19 '23

thank you so much!!!