validation - JideFX validators don't work -
validation - JideFX validators don't work -
am newbie javafx. want create simple form out-of-the-box validation. library have chosen jidefx. tried repeat showcase (which poor taste) - http://www.jidesoft.com/jidefx/jidefx_validation_developer_guide.pdf. have stackoverflowerror result only. validator called. haven’t exception if validation ok.
using javafx-8, java 8, eclipse luna, jidefx 0.9.1 (tried 0.9.1-b128 too). have suggestions? code bellow.
simplevalidator.java
public class simplevalidator implements validator { @override public validationevent call(validationobject param) { if (param.getnewvalue() != null && !param.getnewvalue().tostring().isempty()) { homecoming validationevent.ok; } else { homecoming new validationevent(validationevent.validation_error, 1, "error"); } } }
logincontroller.java
public class logincontroller { private static final logger logger = loggerfactory .getlogger(logincontroller.class); @fxml private textfield idfield; //... @fxml private void initialize() { validationutils.install(idfield, new simplevalidator()); } public logincontroller() { super(); } //... }
you can seek fxform2 provide easy way build cool form quickly. also, have validation feature. check samples here
validation javafx javafx-8 jide
Comments
Post a Comment