Giter Site home page Giter Site logo

tessell's People

Contributors

cwinzenburg avatar gitter-badger avatar jcarver989 avatar payne avatar stephenh 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tessell's Issues

Getting started (Maven, WAB)

Hey! I really like the looks of this library and would like to try it out in our GWT-project. However, I'm having some problems getting started. I have a few questions:

  1. I'm using GWT 2.7. Is this supported? I'm using tessell-user-3.0.10 and I see that it requires a dependency gwt-servlet-0.0.0-230c633. I'm using Maven, and it gets omitted for conflict with 2.7, but I assume that's no problem.
  2. How are the three libraries related to eachother? I assume only tessell-user is actually required at runtime? tessel-dev handles the interface-generation from *.ui.xml files and tessell-apt handles annotation processing at development time? Which versions should you use? Only dev and user seem to follow the same versioning.
  3. We're deploying our GWT-application in an OSGi container. This means that we build our GWT-application as a WAB (web archive bundle) instead of a WAR. maven-bundle-plugin handles this. However, as soon as I add tessell-user 3.0.10 to the pom.xml, maven-bundle-plugin fails with an ArrayIndexOutOfBoundsException (never seen this before). Any idea about this? It gives me errors for pretty much every single class:
    Invalid class file: org/tessell/model/dsl/AttachBinder.class
    Invalid class file: org/tessell/model/dsl/Binder.class

    ...
  4. When adding the builder in Eclipse to allow it to generate the interfaces, it's added to the .classpath file if I'm not mistaken. It's a common best-practice to have Git/SVN-ignore on this file. m2e in Eclipse generates this file anyway. Instead, we would need something in the pom.xml that tells m2e to create this builder when importing the project. Do you know if this is possible? It could be done with the old maven-eclipse-plugin, but that doesn't work well with m2e (which is the successor).

Any help on this is much appreciated!

EDIT: See answers below

Custom Bindings

I want to write a custom binding to a Widget I've created. I'm not sure if I've got it right. Do you mind taking a look? The question I have is whether I need to call binder.Add() -- I can't in this code since the method is protected.

    private <T> void bind(final ListProperty<String> property, final IsMultiselectListBox listbox, Iterable<T> options, Func<T, String> nameConverter, Func<T, String> valueConverter) {

        listbox.clear();
        for(T item : options) {
            String name = nameConverter.call(item);
            String val = valueConverter.call(item);
            listbox.addItem(name, val);
        }


        final BooleanWrapper isFiring = new BooleanWrapper(false);

        binder.onChange(property).execute(new UiCommand() {

            @Override
            protected void doExecute() {
                if (!isFiring.get()) {
                    isFiring.set(true);
                    for(int i = 0; i < listbox.getItemCount(); i++) {

                        if (property.contains(listbox.getValue(i)).isTrue()) {
                            listbox.setItemSelected(i, true);
                        } else {
                            listbox.setItemSelected(i, false);
                        }
                    }
                    isFiring.set(false);
                }
            }

        });

        // Can I call binder.Add() here?
        listbox.addChangeHandler(new ChangedEventHandler() {

            @Override
            public void onChanged(ChangedEvent event) {

                if (!isFiring.get()) {
                    isFiring.set(true);
                    List<String> vals = new ArrayList<String>();
                    for(int i = 0; i < listbox.getItemCount(); i++) {
                        if (listbox.isItemSelected(i)) {
                            vals.add(listbox.getValue(i));
                        }
                    }


                    property.set(vals);
                    isFiring.set(false);
                }
            }
        });
    }

Please update GWT dependency to 2.6.1

I use Tessell via Maven, and I'm not familiar with Ivy! Otherwise I would do it myself and create a pull request … I'm not sure if it's as simple as altering the gwt version in your top-level ivysettings.xml to be 2.6.1, or if more is required!

Thanks …

-strict GWT compliation errors

When compiling Tessell GWT apps with -strict, it errors saying the Stub* super class can't be found. (StubView for example)

One option is to generate the stubs in another folder so that GWT compiler can ignore them.

No generation of AppViews.java & Co.

When generating views using tessell, we always get atleast 4 files (in addition to all generated view-files):

  • AppViews.java
  • AppViewsProvider.java
  • GwtViewsProvider.java
  • StubViewsProvider.java

In one way, I like these classes. Easy to stub the views in unit tests, etc. But personally, I rather bind the views in a IOC-container, such as GIN, to inject the "real" views into my presenters (constructor injection). And in my unit tests, I would manually mock the view.

Could we have some setting to the generator that determines if these classes should be generated or not?

Incorrect call of com.google.gwt.user.client.ui.FlowPanel constructor?

I may well be doing something wrong (this is likely :)

At the moment when building some GWT client code in a very simple test project, in which I've added to the module, using maven, I see the following error:

[INFO]    Validating units:
[INFO]       [ERROR] Errors in 'jar:file:/Users/williamg/.m2/repository/org/tessell/tessell-user/2.16.1/tessell-user-2.16.1.jar!/org/tessell/gwt/user/client/ui/FlowPanel.java'
[INFO]          [ERROR] Line 15: The constructor FlowPanel(String) is undefined
[INFO]    [ERROR] Aborting compile due to errors in some input files

On that source line, we call super(tag) where tag is a String … but com.google.gwt.user.client.ui.FlowPanel has no constructor taking a string, as far as I can see: http://www.gwtproject.org/javadoc/latest/com/google/gwt/user/client/ui/FlowPanel.html

What am I doing wrong, I wonder … or is this a bug in Tessell?

Support resource files with the same name/extension but different directories

Not sure how to handle this nicely; e.g. if you have subA/foo.png and subB/foo.png, then generating:

interface AppResource {
  subAFoo();
  subBFoo();
}

Is not to bad, but only because subA/subB are short names. If the directory was someLongerName/andThenAnotherLongName/foo.png, then:

interface AppResources {
  someLongerNameAndThenAnotherLongNameFoo();
  theOtherFoo();
}

Would be less than great.

Something shorter would be:

interface AppResoruces {
  foo1();
  foo2();
}

But the "1" and "2" are arbitrary and could actually change if the directories were renamed/moved, and you'd have old callers to "foo2" now actually pulling in foo1 (if it were to suddenly be resolved as "the new foo2").

Support for FontAwesome

When we put fontawesome, http://fortawesome.github.io/Font-Awesome/, in our resources folder, the @source() attributes are incorrect: @source("css\font-awesome.gen.css") for example -- ie the backslash is not escaped.
Even if this were correct, you get the following error when running the app (super dev mode)
[ERROR] Could not find no-arg method named fontawesomeWebfontEotV43Data in type project.client.resources.AppResources

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.