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

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -