9

I FUCKING HATE JAVA
Wee need to do a schoolproject with JavaFX and TableViews. The editing of the tables works grate and is also displayed after commiting. But wen i take the data from the TableViews there is still the old one...

Comments
  • 0
    Are your backing properties mutable?
  • 0
    @sSam how should i do that?
    Maybe you find the issue (its in editcontroller)
    https://github.com/d4rkmindz/...
    Please be kind. I ignored every solid convention because i have to be finished quickly...
  • 0
    Data binding will probably help you. Its something like ${ myValue } in fxml.
  • 1
    I'm on phone and going to sleep, but basically a TableView displays a list of model items, let's say it displays a list of Persons. Now if there's editable column "Name" the Person class has to have a field that's JavaFX property and can be accessed. Something like:
    class Person {
    private StringProperty name = new SimpleStringProperty();

    public nameProperty() {
    return name;
    }
    }
    and that column has cellValueFactory pointing to that property:
    nameColumn.setCellValueFactory(column -> column.getValue().nameProperty());
    Not sure about syntax as I'm on the phone.
  • 2
    I upvoted after reading only the first line. Then I read the rest of the rant.
  • 2
    my dude, i'm currently taking a java course and we are using motherfucking swing. jtables my dude, jtables.
  • 0
    You hate java? Try in c++ todo exactly the same thing...
  • 0
    @rim01 i ra5her prefer C#. But the school makes the rules...
  • 0
    I ❤️ ☕
    But seriously hating a language only because you don't understand it is lame 😉
Add Comment