1 Reply Latest reply on Jun 10, 2018 1:42 PM by Pierre Yotti

    cellValueFactory unable to coerce a custom Property

    Pierre Yotti

      Hello,

      Somebody has already have that issue with cellValueFactory?

      Bildschirmfoto 2018-06-01 um 09.57.52.png

       

       

       

      That is my  DatePropertyValueFactory

       

       

      public class DatePropertyValueFactory extends PropertyValueFactory<TodoItem,String> {

       

         public DatePropertyValueFactory(@NamedArg("property") String property) {

         super(property);

        }

       

         /**
        * Aufruf erfolgt, wenn Zelleinhalt zu String konvertiert wird.
        */
         @Override
         public ObservableValue<String> call(TableColumn.CellDataFeatures<TodoItem, String> todoItem) {

        String localDateAsString = TodoListViewController.DATE_TIME_FORMATTER.format((todoItem.getValue()).getLatestFinishDate());

        SimpleStringProperty simpleStringProperty = new SimpleStringProperty();

        simpleStringProperty.setValue(localDateAsString);

         return simpleStringProperty;

        }

      }

       

       

      Thanks

       

      Pierre