dooApp/FXForm2

[FEATURE REQUEST] FXTable2

Closed this issue · 2 comments

garzy commented

I need same features of FXForm2 but instead of in a form, I would lkike it to be a tableview.

I think that the methodology it's the same:

  1. Each bean attribute -> TableView Column
  2. CSS for edit column header and row properties.
  3. Row cell editor for each type of attribute (StringCellEditor, Boolean Editor, Integer Editor...

Logically it does not make sense for only one bean, buts works great for a collection of same beans.

¿What do you think about this?

garzy commented

OK, I've lookup in your proyect and samples and finally see that this ferature request are yet implemented. An example of this is com.dooapp.fxform.samples.ListPropertyForm

Requisite: Encapsulate the observable list property in a bean as I can see in the example:

public class MyBean { public ListProperty<User> users = new SimpleListProperty<>(FXCollections.observableArrayList()); }

After, set this bean as source of FXForm.

OK, I understand this behaviur, and it's valid for my needs. However it would be more intuitive If your API allow me to set the obsservable list directly to the FXMForm:

FXFORM.sources(myListOfBeans)

A simple approach would be, in the sources method, create that "bean wapper" on the fly, passing the collection, or something simillar.

Awesome project, I'm not surprised that this feature was already, but I think it's not clarified in the samples/documentation.

Thanks!. I'll close the resquest because at this momen, the current implementation it's valid for me :)

Thank you for your suggestion and feedback. You are right, we could think of adding a way to set directly a list of beans as source of the form in a similar fashion to the MultipleBeanSource (which allow to merge beans together in a single bean with properties of all the given beans).

Feel free to re-open this PR if you need.