Giter VIP home page Giter VIP logo

hexa.tools's People

Contributors

bendol avatar gitter-badger avatar grebesche avatar ltearno 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

Watchers

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

hexa.tools's Issues

Binder.bind(PropertyAdapter source).to(HasValue<?> widget)

Hey!

I've been messing around a bit with GWT and Hexa Binding. I noticed one thing. If you have a model that already has data in it and you bind it to a Widget (HasValue<?>), the Widget won't take the models current value.

Maybe it's not always what you want, but in my case I'd like it.

In my case, I have a simple HashMap as my model. I create a one-way property adapter for it (implementing PropertyAdapter). This of course means that if I make changes to my Map, it won't be reflected to the bound component, but that is fine.

The Map has default values set on them, and when I bind each key to a GWT component, I want that GWT component to immediately get the models value.

Can we work this out, you think? Maybe a new overload, to(HasValue<?> widget, boolean useExistingModelValue);

Some classes can generate Malformed ClassInfo

Some super classes create malformed class info files and I don't have time to resolve the use case but its in this case:

ViewImpl.java

    protected void bindSlot(IsSingleSlot<?> slot, Object container) { ... }

    protected void bindSlot(Slot<?> slot, HasWidgets container) { ... }

    protected <T extends HasWidgets & InsertPanel> void bindSlot(OrderedSlot<?> slot, T container) { ... }

The generator attempts to create the invoke for these methods but can't assure that the 3rd bindSlot is unique to the others since its using a T container the generator chooses HasWidgets to cast to which then creates an ambiguous method call operation.

So this is a workaround for me.

Show more examples of GWT UI Bindings

I have seen the Sample 2 project that has some really cool examples, but I would really like to see how many of the other GWT (or even custom libraries) components are bound. For example the popular ListBox isn't an obvious situation for this data binding tool (for me at least).

Some more examples would be awesome!

Observable ClazzBundle 'undefined' ClassCastException

Mon Aug 10 01:35:28 GMT+1200 2015 nz.co.doltech.wayhome.client.Application$PreApplicationImpl
SEVERE: undefinedjava.lang.ClassCastException
    at Unknown.fillInStackTrace(Throwable.java:116)
    at Unknown.Throwable(Throwable.java:55)
    at Unknown.Exception(Exception.java:25)
    at Unknown.RuntimeException(RuntimeException.java:25)
    at Unknown.ClassCastException(ClassCastException.java:23)
    at Unknown.dynamicCast(Cast.java:59)
    at Unknown.$clinit_ObservableSetting(ObservableSetting.java:33)
    at Unknown.ObservableSetting_0(ObservableSetting.java:46)
    at Unknown.setSetting_0(SettingForm.java:44)
    at Unknown.bindSettingForm(HomeView.java:101)
    at Unknown.setSetting(HomePresenter.java:203)
    at Unknown.onSuccess_28(HomePresenter.java:193)
    at Unknown.onSuccess_29(HomePresenter.java:189)
    at Unknown.onExecuteSuccess(DispatchCall.java:134)
    at Unknown.onExecuteSuccess_0(DispatchCall.java:144)
    at Unknown.onExecuteSuccess_1(RestDispatchCall.java:108)
    at Unknown.onResponseReceived(RestDispatchCall.java:148)
    at Unknown.onResponseReceived_0(RestDispatchCall.java:132)
    at Unknown.fireOnResponseReceived(Request.java:250)
    at Unknown.onReadyStateChange(RequestBuilder.java:412)
    at Unknown.anonymous(XMLHttpRequest.java:329)
    at Unknown.apply_0(Impl.java:247)
    at Unknown.entry0(Impl.java:299)
    at Unknown.anonymous(Impl.java:72)

Everything works fine until I recompiling in SuperDevMode when I make changes

It seems to be failing when calling:

    static
    {
        GWT.<ClassBundle>create( ClassBundle.class ).register();
    }

inside the Observable generated class, not sure why this happens sometimes. I implemented it this way:

    public void setSetting(Setting setting) {
        this.setting = new ObservableSetting(setting);

        Binder.bindObject(this.setting).mapTo(this);
        Binder.bind(this.setting, "type")
            .withConverter(new EnumConverter(SettingType.values()))
            .to(typeBox);
    }

    public Setting getSetting() {
        return setting;
    }

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.