Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Sep 2009
    Posts
    13
    Vote Rating
    0
    nomad is on a distinguished road

      0  

    Default Does TreeStore leaks @UiConstructor?

    Does TreeStore leaks @UiConstructor?


    I'm playing with the code borrowed from http://www.sencha.com/examples-dev/#...tree(uibinder) and I cannot resolve the following issue:
    Code:
    ERROR: com.sencha.gxt.data.shared.TreeStore has no default (zero args) constructor. To fix this, you can define a @UiFactory method on the UiBinder's owner, or annotate a constructor of TreeStore with @UiConstructor..
    It looks like the generator ignores "provided = true" for "store" annotation. I tried to create @UiFactory method but it didn't help.
    Is this a TreeStore code bug or did I forget to make some specific configuration actions?
    (GWT 2.4, GXT 3.0d5, uibinder-bridge 2.4.0-SNAPSHOT)

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,640
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      0  

    Default


    The code in that example is the actual code that compiles to produce the uibinder tree sample.

    Code:
    @UiField(provided = true)
    TreeStore<BaseDto> store = new TreeStore<BaseDto>(new KeyProvider());
    Code:
    <ui:with type="com.sencha.gxt.data.shared.TreeStore" field="store" />
    Are the two relevant pieces of code. If provided=true is set for that field (make sure the fields have the same name!), UiBinder should not attempt to look for an alternate way of building the TreeStore. This is how this example and several others are working. This works with standard GWT 2.4.0 behavior, the uibinder-bridge jar is not required.

    There is no plan to provide a @UiConstructor for TreeStore, as there is no good way to allow for a ModelKeyProvider instance that wouldn't make it just as easy to expose the store via a field. If you have suggestions in this area, we are open to them.

  3. #3
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Vote Rating
    130
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Also a Store is not really UI related and so should more be provided from the java code than getting create through the XML file.

  4. #4
    Sencha User
    Join Date
    Sep 2009
    Posts
    13
    Vote Rating
    0
    nomad is on a distinguished road

      0  

    Default


    Thank you for the quick answer. The code was copied to a blank GWTP view with provided=true. I think the cause of this issue is somewhere outside the pasted code fragments. But I don't know where...

  5. #5
    Sencha User
    Join Date
    Sep 2009
    Posts
    13
    Vote Rating
    0
    nomad is on a distinguished road

      0  

    Default


    I've found the what was caused the mistake:
    Code:
    public interface Binder extends UiBinder<Widget, MainView> {}
    should be
    Code:
    public interface Binder extends UiBinder<Widget, MainViewImpl> {}
    and uibinder-bridge dependency is required.
    Thanks guys for your attention.

  6. #6
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,640
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      0  

    Default


    Yes, uibinder-bridge will be required until the next version of GWT, which the changes in http://gwt-code-reviews.appspot.com/1524803/ should be included in.

  7. #7
    Sencha User
    Join Date
    May 2012
    Posts
    12
    Vote Rating
    0
    lmcadory is on a distinguished road

      0  

    Default


    I'm still having this problem. I have everything right, but I still get the

    Code:
    ERROR: com.sencha.gxt.data.shared.TreeStore has no default (zero args) constructor. To fix this, you can define a @UiFactory method on the UiBinder's owner, or annotate a constructor of TreeStore with @UiConstructor..
    I'm also trying to use the BoarderLayout UiBinder example with the BasicTree example. I'm using the @UiTemplate annotation, but that shouldn't effect anything right?

  8. #8
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,640
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      0  

    Default


    TreeStore shouldn't have a @UiConstructor, as it requires a ModelKeyProvider instance. Create it in your java code before the createAndBind call, and set up the @UiField annotation on the TreeStore as provided = true as I mentioned in this post: http://www.sencha.com/forum/showthre...l=1#post663265

  9. #9
    Sencha User
    Join Date
    May 2012
    Posts
    12
    Vote Rating
    0
    lmcadory is on a distinguished road

      0  

    Default


    I did that. I copied it straight from the example:

    Code:
    classKeyProvider implementsModelKeyProvider<BaseDto> {
    @Override public String getKey(BaseDto item) { return (item instanceof FolderDto ? "f-" : "m-") + item.getId().toString(); }
    }

  10. #10
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,640
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      0  

    Default


    This isn't an issue of how you define the model key provider, it is how you _create_ the treestore. The @UiField needs to look like this so UiBinder doesnt need to look for a @UiConstructor:

    Code:
    @UiField(provided = true)
    TreeStore<BaseDto> store = new TreeStore<BaseDto>(new KeyProvider());
    Bolded parts are important, both creating the TreeStore instance in code and marking the TreeStore as being created in Java, not xml.

    TreeStore should not be created in UiBinder XML, because it isn't a UI component.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar