Giter Club home page Giter Club logo

beanfabrics's People

Contributors

adrodoc avatar gensth avatar karneimm avatar mkarneim avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

beanfabrics's Issues

BnModelObserver does not work with named PropertyChangeEvents

A PropertyChangeListener added by the method addPropertyChangeListener(String, PropertyChangeListener) does not recieve named events fired by the PropertyChangeSupport.
The following test shows the expected behaviour:

@Test
    public void test_BnModelObserver_recieves_named_property_change_events() {
      // given:
      final AbstractPM pm = new AbstractPM() {};

      ModelProvider prov = new ModelProvider();
      prov.setPresentationModel(pm);

      BnModelObserver observer = new BnModelObserver();
      observer.setModelProvider(prov);
      observer.setPath(new Path());

      final List<PropertyChangeEvent> events = new LinkedList<PropertyChangeEvent>();
      observer.addPropertyChangeListener("my property change", new PropertyChangeListener() {
        public void propertyChange(PropertyChangeEvent evt) {
          events.add(evt);
        }
      });
      // when:
      pm.getPropertyChangeSupport().firePropertyChange("my property change", null, null);
      // then
      assertEquals("events.size()", events.size(), 1);
    }

IntegerPM: large numbers lead to invalidNumber

I have in IntegerPM set up with max value 9999999999.

A higher number, like 10000000000, will bring up a "value too big" validation message - which is fine.

A LARGE number however (9999999999999999999999) will lead to a validation message of type "invalid number" (the same message I would receive for a string like "abc").

Is there a possibility to change this behaviour, so that I would receive "value too big" for any (whole positive) number, however large?

(Currently I'm using beanfabrics 1.4.2.)

Custom Class-level annotations are (always) not processed by PMManager

Beanfabrics supports custom annotations to enhance PM objects.
These annotations can be placed on the PM class, its fields and its methods.
While this works fine for fields and methods, there is a bug when processing class-level annotations: they are only evaluated for the first instance of a given PM class but not for further instances.

SupportUtil.sortMembers sometimes causes "Comparison method violates its general contract"

See stack trace:

java.lang.IllegalArgumentException: Comparison method violates its general contract!
    at java.util.TimSort.mergeLo(TimSort.java:747)
    at java.util.TimSort.mergeAt(TimSort.java:483)
    at java.util.TimSort.mergeCollapse(TimSort.java:410)
    at java.util.TimSort.sort(TimSort.java:214)
    at java.util.TimSort.sort(TimSort.java:173)
    at java.util.Arrays.sort(Arrays.java:659)
    at java.util.Collections.sort(Collections.java:217)
    at org.beanfabrics.support.SupportUtil.sortMembers(SupportUtil.java:114)
    at org.beanfabrics.model.PMManager.processPresentationModel(PMManager.java:66)
    at org.beanfabrics.model.PMManager.setup(PMManager.java:35)
    ...

TableView / ListView: Selektion wird nicht korrekt initialisiert

Wenn eine TableView oder ListView an ein IListPM gebunden wird, das bereits eine Selektion besitzt, dann wird die Selektion zwar korrekt angezeigt, aber nicht richtig verwaltet, wenn der Anwender über die GUI die Selektion ändert: das IListPM bekommt die Änderungen nicht mit.

BnList does not refresh after updating to beanfabrics 1.2.0

Hi Michael,

I noticed while upgrading an older project of mine that my BnLists are not being refreshed anymore. Other fields like BnLabels backed by an IntegerPM still work flawlessly. The last working version of beanfabrics was 1.1.0.

I read through the changelog but couldn't find anything which would explain the change of behaviour, so here I am ;)

I've reduced the problematic code to a small test project consisting of just a View and PM. You can find it at https://github.com/fkleon/beanfabrics-test

Note that with beanfabrics 1.1.0 the list gets rendered as expected, with all 50 entries. But when you change the dependencies to beanfabrics 1.2.0, the list stops rendering, but the backing ListPM contains the correct entries and the BnLabel still gets updated:

Beanfabrics 1.1.0:
testview_1 1 0

Beanfabrics 1.2.0 and 1.3.0:
testview_1 2 0

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.