java - Custom Object converter JavaFx FXML -
i new javafx 8 , have been jsf/primefaces programmer time now. working on javafx application fxml , mvc pattern. have problem making converters of jpa 2.1 entities in fxml gui , how use them. in jsf/primefaces simple , straight forward , easy integrate special tag converters. wonder if there similar solution javafx fxml. please need help.
the closest equivalent describing stringconverter
class. built-in cell implementations virtualized controls (e.g. listview
, tableview
, etc) can configured appropriate instance of stringconverter
. additionally, example, textfield
(or other text input control) can have textformatter
set on it, in turn can instantiated specifying stringconverter
instance.
so if have entity class myentity
, can create string converter:
public class myentitystringconverter extends stringconverter<myentity> { @override public string tostring(myentity myentity) { return ... ; } @override public myentity fromstring(string textspecification) { return ... ; } }
which able use in many parts of api.
Comments
Post a Comment