Giter Site home page Giter Site logo

fxform2's People

Contributors

agonist avatar amischler avatar christophe-dooapp avatar dependabot[bot] avatar garzy avatar jlleitschuh avatar kevinsdooapp avatar lanouettea avatar pjean avatar pratimavk avatar rahmanusta avatar realthanhpv avatar rizen59 avatar stelk avatar xylo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fxform2's Issues

String properties turn into NULL values

In ToStringConverter the following code can be found:

@Override
public Object adaptFrom(String to) {
    return null;
}

That seems to null out every String in my beans. It seems to work much better if I replace the "null" with "to".

No documentation on how to trigger validation

Hi!

I have created a form from your example, and the form displays nicely. But what do I do now? Is there any way to trigger validation behaviour from a save button or something? How do I get the nice yellow triangle and error messages that are displayed in the demo pictures on your page?

Thanks :)
Inge

java.lang.NoClassDefFoundError: javax/validation/ValidationException thrown when creating a form

Hi There

When creating a form the exception below is thrown when I do not have the hibernate bean validator on my classpath. In the wiki under bean validation it states that this is not necessary and no validation will take place if it is not found.

Many Thanks

java.lang.NoClassDefFoundError: javax/validation/ValidationException
    at com.dooapp.fxform.FXForm.createControllers(FXForm.java:173)
    at com.dooapp.fxform.FXForm.access$100(FXForm.java:46)
    at com.dooapp.fxform.FXForm$4.changed(FXForm.java:124)
    at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:196)
    at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:100)
    at javafx.beans.property.ObjectPropertyBase.fireValueChangedEvent(ObjectPropertyBase.java:123)
    at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:130)
    at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:163)
    at com.dooapp.fxform.FXForm.setSource(FXForm.java:247)
    at com.dooapp.fxform.FXForm.<init>(FXForm.java:136)
    at com.dooapp.fxform.FXForm.<init>(FXForm.java:89)
    at com.dooapp.fxform.FXForm.<init>(FXForm.java:81)
Caused by: java.lang.ClassNotFoundException: javax.validation.ValidationException
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    ... 65 more

FXForm does not handle LongProperty

Just add this simple line into MyBean.java

private final LongProperty justALong = new SimpleLongProperty();

and run the demo to see this:

Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
at javafx.beans.property.StringProperty.setValue(StringProperty.java:76)
at com.dooapp.fxform.controller.PropertyEditorController.bind(PropertyEditorController.java:91)
at com.dooapp.fxform.controller.NodeController$1.changed(NodeController.java:47)
at com.dooapp.fxform.controller.NodeController$1.changed(NodeController.java:1)
at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:196)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:100)
at javafx.beans.property.ObjectPropertyBase.fireValueChangedEvent(ObjectPropertyBase.java:123)
at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:130)
at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:163)
at com.dooapp.fxform.controller.NodeController.setNode(NodeController.java:69)
at com.dooapp.fxform.controller.ElementController.updateSkin(ElementController.java:64)
at com.dooapp.fxform.controller.PropertyElementController.updateSkin(PropertyElementController.java:76)
at com.dooapp.fxform.controller.ElementController.(ElementController.java:56)
at com.dooapp.fxform.controller.PropertyElementController.(PropertyElementController.java:38)
at com.dooapp.fxform.FXForm.createControllers(FXForm.java:228)
at com.dooapp.fxform.FXForm.access$1(FXForm.java:204)
at com.dooapp.fxform.FXForm$6.changed(FXForm.java:168)
at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:196)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:100)
at javafx.beans.property.ObjectPropertyBase.fireValueChangedEvent(ObjectPropertyBase.java:123)
at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:130)
at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:163)
at com.dooapp.fxform.FXForm.setSource(FXForm.java:295)
at com.dooapp.fxform.Demo.setup(Demo.java:63)
at com.dooapp.fxform.Demo.start(Demo.java:127)
at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:206)
at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:173)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)

Validation after "click on a button"

Hi

I am playing around with the FXForm 2 library and it works really good, especially the Bean Validation integration. Unfortunately, I do not know how to properly validate my data after a "click on a button" because if a validation violation occurs the model is not updated, so manual validation would fail. Do you have any suggetions how to implement this? I would like to check if all constraints are fullfilled when submitting my form.

Thank you very much
Oliver

FXForm fails to create a Form with generic type properties

FXForm fails to build a form for a bean containing an ObjectProperty property.

Caused by: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.Class
at com.dooapp.fxform.reflection.ReflectionUtils.getObjectPropertyGeneric(ReflectionUtils.java:38)
at com.dooapp.fxform.model.impl.ReadOnlyPropertyFieldElement.getWrappedType(ReadOnlyPropertyFieldElement.java:42)
at com.dooapp.fxform.view.factory.DefaultFactoryProvider$1.handle(DefaultFactoryProvider.java:58)
at com.dooapp.fxform.view.factory.DefaultFactoryProvider.getDelegate(DefaultFactoryProvider.java:65)
at com.dooapp.fxform.view.factory.DefaultFactoryProvider.getFactory(DefaultFactoryProvider.java:96)
at com.dooapp.fxform.view.FXFormSkin.createFXFormNode(FXFormSkin.java:139)
at com.dooapp.fxform.view.FXFormSkin.createEditor(FXFormSkin.java:159)
at com.dooapp.fxform.view.skin.DefaultSkin.createElementNodes(DefaultSkin.java:56)
at com.dooapp.fxform.view.FXFormSkin.getEditor(FXFormSkin.java:124)
at com.dooapp.fxform.controller.ElementController.updateSkin(ElementController.java:64)
at com.dooapp.fxform.controller.PropertyElementController.updateSkin(PropertyElementController.java:85)
at com.dooapp.fxform.controller.ElementController.<init>(ElementController.java:56)
at com.dooapp.fxform.controller.PropertyElementController.<init>(PropertyElementController.java:38)
at com.dooapp.fxform.FXForm.createPropertyElementController(FXForm.java:238)
at com.dooapp.fxform.FXForm.createControllers(FXForm.java:227)
at com.dooapp.fxform.FXForm.access$100(FXForm.java:62)
at com.dooapp.fxform.FXForm$4.changed(FXForm.java:164)
at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:196)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:100)
at javafx.beans.property.ObjectPropertyBase.fireValueChangedEvent(ObjectPropertyBase.java:123)
at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:130)
at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:163)
at com.dooapp.fxform.FXForm.setSource(FXForm.java:296)
at com.dooapp.fxform.Demo.setup(Demo.java:72)
at com.dooapp.fxform.Demo.start(Demo.java:169)
at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:206)
at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:173)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)

is this project still active?

have you tested on fx 2.2?? I made a little try but didn´t work, I would like to contribute also if this projects is moving forward

Add FXML support

The user should be able to build its form in FXML. FXForm will load the given FXML and bind the model to the view according to the node ids.

NoSuchElementException in InlineSkin when settings source to null

Can be reproduced with the following code.

    FXForm fxForm = new FXForm();
    fxForm.setSkin(FXFormSkinFactory.INLINE_FACTORY.createSkin(fxForm));
    fxForm.setSource(new TestBean());
    fxForm.getFilters().add(new ExcludeFilter("stringProperty", "objectProperty"));
    fxForm.setSource(null);

It looks like the problem happens only if the number of controllers is < 4

Default CSS loading uses FXForm package, not caller's package

In FXForm.initBundle() the following code is used to load the default CSS file:

URL css = FXForm.class.getResource(element.getFileName().substring(0, element.getFileName().indexOf(".")) + ".css");

This uses the stack trace to find the caller's class name, but it uses the relative class loading based on the FXForm package -- i.e. the CSS file has to be com/dooapp/fxform/${MyClass}.css instead of ${myPackage}/${MyClass}.css. You should be using something starting with a slash and then using the value of element.getDeclaringClass() (possibly with a dot -> slash replacement).

BTW: I don't think you actually need to throw the Exception you create to get the stacktrace, just calling

StackTraceElement[] stackTrace = new Throwable().getStackTrace();

should be fine.

Using entity classes as beans for fxforms

Hello, this is not an issue but a question. I have some entity classes (POJO with JPA annotations), and I'd like to use them as beans for fxforms, but fxforms does not generate anything. When using a bean with javafx style properties as illustrated in the get started wiki page fxforms does works correctly. So questions:

1- Does fxforms requires javafx style properties to work ?
2- If answer to 1 is yes, does anyone know of any docs on how to mix entity classes with javafx style properties ?
3- If answer to 1 is no, is there any docs out there i could follow. The get-started page on the wiki does not work with regular java beans.

I'm new to javafx and fxform, so I'm probably just missing something very obvious here.
Thanks in advance for your time.

NPE in FXForm.java (line 204) when running from Java Web Start

Trying to deploy an application using the resources generated by the jfxdeploy ant task. Form work fine when running from Eclipse.


Java Plug-in 10.4.1.255
Using JRE version 1.7.0_04-b22 Java HotSpot(TM) Client VM

...


2189947 [JavaFX Application Thread] INFO com.dooapp.fxform.FXForm - Default resource bundle not found: sun.reflect.NativeConstructorAccessorImpl
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(Unknown Source)
    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
    at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
    at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
    at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
    at javafx.event.Event.fireEvent(Unknown Source)
    at javafx.scene.Node.fireEvent(Unknown Source)
    at javafx.scene.control.Button.fire(Unknown Source)
    at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(Unknown Source)
    at com.sun.javafx.scene.control.skin.SkinBase$4.handle(Unknown Source)
    at com.sun.javafx.scene.control.skin.SkinBase$4.handle(Unknown Source)
    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
    at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
    at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
    at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
    at javafx.event.Event.fireEvent(Unknown Source)
    at javafx.scene.Scene$MouseHandler.process(Unknown Source)
    at javafx.scene.Scene$MouseHandler.process(Unknown Source)
    at javafx.scene.Scene$MouseHandler.access$1300(Unknown Source)
    at javafx.scene.Scene.impl_processMouseEvent(Unknown Source)
    at javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
    at com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
    at com.sun.glass.ui.View.notifyMouse(Unknown Source)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
    at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    ... 42 more
Caused by: java.lang.NullPointerException
    at com.dooapp.fxform.FXForm$6.changed(FXForm.java:204)
    at com.dooapp.fxform.FXForm$6.changed(FXForm.java:202)
    at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(Unknown Source)
    at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
    at javafx.beans.property.ReadOnlyObjectWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(Unknown Source)
    at javafx.beans.property.ReadOnlyObjectWrapper.fireValueChangedEvent(Unknown Source)
    at javafx.beans.property.ObjectPropertyBase.markInvalid(Unknown Source)
    at javafx.beans.property.ObjectPropertyBase.set(Unknown Source)
    at javafx.scene.Node.setScene(Unknown Source)
    at javafx.scene.Parent.computeDirtyScene(Unknown Source)
    at javafx.scene.Parent.impl_sceneChanged(Unknown Source)
    at javafx.scene.Node$4.invalidated(Unknown Source)
    at javafx.beans.property.ObjectPropertyBase.markInvalid(Unknown Source)
    at javafx.beans.property.ObjectPropertyBase.set(Unknown Source)
    at javafx.scene.Node.setScene(Unknown Source)
    at javafx.scene.Scene$9.invalidated(Unknown Source)
    at javafx.beans.property.ObjectPropertyBase.markInvalid(Unknown Source)
    at javafx.beans.property.ObjectPropertyBase.set(Unknown Source)
    at javafx.scene.Scene.setRoot(Unknown Source)
    at javafx.scene.Scene.<init>(Unknown Source)
    at javafx.scene.Scene.<init>(Unknown Source)
    ... 46 more

Handling dynamic source objects

I'm dealing with a bean which has a map property like

Map<String, String> userMap

Showing this map with FXForm2 using an adaptor and a factory is not a problem, but the user should be able to add or remove entries to or from the map such that I need to update the form after each operation. I can do this partial re-generation of the form by

  1. using a lot of code in the factory class or by
  2. re-generating the entire form, by which I would probably lose any input values that were not stored in the data model (because they were invalid, for instance).

Is there a recommended way for doing this? Or is this maybe a use case that FXForm2 does not want to address?

Cheers,
Uwe

Problem in unconfiguration when we set the source before the skin

If we set the source before the skin, the unconfiguration try to unconfigure with the first skin and throw an NullPointerException

    FXForm fxForm = new FXForm();
    fxForm.setSource(myBean);
    fxForm.setSkin(FXFormSkinFactory.INLINE_FACTORY.createSkin(fxForm));
    fxForm.setSource(null);

How to include and/or reorder into a ListProperty

When I provide a bean (call it A) with a ListProperty

I can use the includeFilter (and the reorder filter) to to stuff on A fields.

But how can I include and/or reorder B fields that will be shown into the TableView?

Remove (or document) slf4j dependency

I am not using Maven, so after adding the core-0.1.7.jar dependency manually, the exception below was thrown. After adding the the slf4j simple and api jars it worked as expected.

Is it absolutely necessary to have the slf4j dependency? I would rather not have a library log anything at all unless I configured it to do so.

I really appreciate the work you have put into this, it would be great if FXForm2 could work straight out of the box for us non Maven users.

java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
    at com.dooapp.fxform.FXForm.<clinit>(FXForm.java:48)
........
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    ... 54 more

Custom adapter on model

It should be cool to be able to custom the Adapter directly on the model by an annotation

eg :

@adater(MyCustomAdapterClass.class)
private DoubleProperty myValue

Boolean Properties do not update properly on change.

Looks like there is a bug in the BooleanPropertyDelegate that is preventing Boolean fields in a Form from being updated properly when changed.

checkBox.selectedProperty().addListener(controllerListener);

should probably be changed to

checkBox.selectedProperty().addListener(checkBoxListenerr);

in the following code.

public class BooleanPropertyDelegate implements NodeFactory<PropertyElementController> {

public DisposableNode createNode(final PropertyElementController<Boolean> controller) {
    final CheckBox checkBox = new CheckBox();
    checkBox.setSelected(controller.getValue());
    final ChangeListener<Boolean> controllerListener = new ChangeListener<Boolean>() {
        public void changed(ObservableValue<? extends Boolean> observableValue, Boolean aBoolean, Boolean aBoolean1) {
            checkBox.setSelected(aBoolean1);
        }
    };
    controller.addListener(controllerListener);
    final ChangeListener<Boolean> checkBoxListener = new ChangeListener<Boolean>() {
        public void changed(ObservableValue<? extends Boolean> observableValue, Boolean aBoolean, Boolean aBoolean1) {
            controller.setValue(aBoolean1);
        }
    };
    checkBox.selectedProperty().addListener(controllerListener);
    return new DisposableNodeWrapper(checkBox, new Callback<Node, Void>() {
        public Void call(Node node) {
            checkBox.selectedProperty().removeListener(checkBoxListener);
            controller.removeListener(controllerListener);
            return null;
        }
    });
}

}

Add more granularity to constraint validation

Strict constraint -> The model is not updated by FXForm with the input value and an error message is shown to the user (this is the current behavior)
Warning constraint -> The model is updated by FXForm and a warning message is shown to the user
This could be implemented using constraint groups.

Internationalization for messages?

Hi is it possible internationalize the messages?? the warning messages that you put for validation
like @min > 5 the display message is in english I would like to know if I can translate it and use them in other languages,

Example

More of a request actually. For the Demo showing an example of a more involved (composite) NodeFactory that updates the associated bean. Such as below. This is simply the first way that worked for me and am interested to know if there is something in the framework that makes this simpler.

public static class FileSelectorFactory implements NodeFactory<PropertyElementController<String>> {
    public DisposableNode createNode(final PropertyElementController<String> controller) throws NodeCreationException {

        final TextField textField   = new TextField ();
        final Button button         = new Button();
        final HBox panel            = new HBox();
        panel.getChildren().addAll(textField, button);
        button.setText("Choose");
        textField.setEditable(false);

        button.setOnAction(new EventHandler<ActionEvent>() {
          @Override 
          public void handle(ActionEvent a) {
             FileChooser chooser = null;
             if (PropertyManager.getInstance().getLastDirectory() != null){
                File lastDir = new File(PropertyManager.getInstance().getLastDirectory());
                chooser = FileChooserBuilder.create().title("Open File").initialDirectory(lastDir).build();                   
            } else {
                chooser = FileChooserBuilder.create().title("Open File").build();   
            }
            File file = chooser.showOpenDialog(panel.getScene().getWindow());
            if (file != null){
                PropertyManager.getInstance().setLastDirectory(file.getParent());
                textField.setText(file.toString());
                controller.setValue(file.toString());
            }
          }
        });

        return new DisposableNodeWrapper(panel, new Callback<Node, Void>() {
            public Void call(Node node) {
                return null;
            }
        });
    }
}

Allow to choose properties accessor to support lazy instantiated properties

It should be possible to choose how a Property is accessed, either directly through the field (this is the current state) or through a getter.
This is specially useful in case where properties are lazy instantiated :

private StringProperty nameProperty;

public StringProperty nameProperty() {
    if (name == null) {
        name = new SimpleStringProperty
    }
    return name;
}

Reflection field traversal doesn't work with Groovy beans

It is needed to change the ReflectionFieldProvider to ignore dynamically created fields when using Groovy and maybe other JVM languages.

As per http://docs.oracle.com/javase/specs/jls/se7/jls7.pdf, "Any constructs introduced by a Java compiler that do not have a correspondind construct in the source code must be marked as synthetic, except for default constructors, the class initialization method, and the values and valueOf methods of the Enum class".

So it is enough to check for field.isSyntethic() beforing adding the field to the result List on ReflectionFieldProvider:41.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.