Results 1 to 8 of 8

Thread: com.sencha.gxt.data.shared.TreeStore bug

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Apr 2015
    Posts
    6

    Default com.sencha.gxt.data.shared.TreeStore bug

    Hi all
    I'm new to forum and new to GWT. Anyway i found a bug on com.sencha.gxt.data.shared.TreeStore. I use it to store more than 9000 items, and when i run the application in development mode (using eclipse and Jetty) i am able to retrieve all 9000 elements.
    When i compile the application and packaging it making a war file and deploy it on Tomcat I can retrieve only 4000 itemes.
    Solving this issue is very important to me!! some one is able to give some suggestion? I don't know if I give all informatione required to help me.
    Anyway:
    Eclipse: I use Juno Service Release 2;
    Jetty:org.mortbay.jetty 6.1.5
    Tomcat 6
    I repeat in devolepment enviroment everything works well, but after i compile a make a war and deploy it on tomcat it retrieve only 4000 items.
    Please help me!

    Francesco
    Italy

  2. #2
    Sencha User
    Join Date
    Jul 2011
    Location
    Germany
    Posts
    223

    Default

    It is helpful to use the bug template for reporting bugs:
    https://www.sencha.com/forum/showthr...T-Bug-Template

    Your post lacks of
    • GXT version
    • GWT version
    • Browser / BS you tested with / which shows the error
    Are there any errors in logs or console?

  3. #3
    Sencha User
    Join Date
    Apr 2015
    Posts
    6

    Default

    <gxt.version>3.0.1</gxt.version>
    <gwt.version>2.5.1</gwt.version>


    I've test it with:
    IE version 11.0.96
    Chrome: Versione 41.0.2272.118 m
    firefox: 35.0.1

    The result is the same, before compile it in development mode I can retrieve all 9000 items; after compiling it and deploy on Tomcat 6, when I try to retrieve theitems I only view 3000 items.

    No there aren't any error in console (i've also checked in chrome console, but there is not any error logged).

    I'm not able to use your template, please ask me if you need more information on this matter.
    Thanks a lot.
    Francesco
    Italy

  4. #4
    Sencha User
    Join Date
    Jul 2011
    Location
    Germany
    Posts
    223

    Default

    You probably know, so just for the record: there are newer versions of GXT (3.1.4; GPL 3.1.0) and GWT (2.7) available. I don't know if there have been fixes to TreeStore.

    Tough to debug a problem only occurring in deployed mode. How do these items get in TreeStore? Via RPC or are they generated on client side?
    I ask myself: Are there only 3000 items shown or does TreeStore only has 3000 itmes? Maybe you can put a button that triggers counting TreeStores items and show number somewhere. Goal is to know at which point we lose items.
    Are the 3000 shown items are always the same (first 3000; last 3000)?
    Is filtering involved in any manner?

  5. #5
    Sencha User
    Join Date
    Apr 2015
    Posts
    6

    Default

    Andreas Samjeske, thanks for your interesting.
    in treStore the items get with this call:
    ser.getCppvv(new AsyncCallback<List<CpvvDto>>() {
    @Override
    public void onSuccess(List<CpvvDto> arg0) {
    for (CpvvDto cpv : arg0) {
    try {
    if (cpv.getPadre() == null)
    view.getViewWidget().stockStoreCpvv.add(cpv);
    else
    view.getViewWidget().stockStoreCpvv.add(cpv.getPadre(), cpv);
    } catch (AssertionError e) {
    // e.printStackTrace();
    }
    }
    int c=view.getViewWidget().stockStoreCpvv.getAllItemsCount();
    System.out.println(c);
    }


    @Override
    public void onFailure(Throwable arg0) {
    AlertMessageBox alertMessageBox = new AlertMessageBox(GestoreMessaggi.ERROR_TITLE, GestoreMessaggi.getMessageErrorCaricamento("dei cpv"));
    alertMessageBox.show();
    }
    });


    where:
    stockStoreCpvv is a treeStore Object;

    ser is declared in this way:
    @Inject
    private OpereServiceAsync ser;
    and
    the method getCppvv has just an hibernete query that retrieve all items in a table.








  6. #6
    Sencha User
    Join Date
    Jul 2011
    Location
    Germany
    Posts
    223

    Default

    Your posted code is not well readable, since it lacks indentation. Did you use Code-tags like these [ CODE ] <your code here> [ /CODE ] (without spaces)?

    Looking at your code, two things came to my mind:
    1.) Are you sure the items in arg0 at onSuccess(List<CpvvDto> arg0) are in right order?
    Every item can only be added, if its parent is already present in store.

    2.) Does ModelKeyProvider.getKey(item) delivers a unique String for each item in treeStore? If not, behavior of store is unpredictable.

    Finally I would try to get some numbers. Try this instead of this System.out line:
    Code:
    new MessageBox("getCppvv delivered " + arg0.size() + " itmes.", 
        "treeStore has " + c + " visible items (leafes + folders).").show();
    "visible" means not filtered out. Items within collapsed folders are actually not visible, but they count as visible items.

  7. #7
    Sencha User
    Join Date
    Apr 2015
    Posts
    6

    Default

    the declaration of treStore is:

    Code:
    public TreeStore<CpvDto> stockStoreCpvV = new TreeStore<CpvDto>(  ((DataProperties) GWT.create(DataProperties.class)).key() );


    and
    Code:
      
    public interface DataProperties extends PropertyAccess<CpvDto> {
    
        @Path("codiceCpv")
        ModelKeyProvider<CpvDto> key();
        ValueProvider<CpvDto, String> codiceCpv();
        ValueProvider<CpvDto, String> descrizioneCpv();
        ValueProvider<CpvDto, String> controlloCpv();
        ValueProvider<CpvDto, CpvDto> padre();
        
      }


    I'm sure that
    codiceCpv is a primary key in the table;

    The message you ask to add tell: even if argo.size() are a little bit different from allItems in get store; the problem is not in the devlopment enviroment, the problem arise when i build a war and deploy it on tomcat:

    message.jpg

  8. #8
    Sencha User
    Join Date
    Jul 2011
    Location
    Germany
    Posts
    223

    Default

    Thanks for the provided info. Looks good to me. I guess someone at Sencha has to take a look at it.

    At this point it is just a guessing game to me. Just to make I get it right: The screenshot of the MessageBox was taken in DeployedMode? In DevMode those numbers matched each other?

Similar Threads

  1. Sencha Cmd Shared Images
    By MichaelOstrovsky in forum Sencha Cmd
    Replies: 4
    Last Post: 13 Mar 2014, 5:01 AM
  2. Help with Sencha Cmd - shared classes
    By al.todd in forum Sencha Ext JS Q&A
    Replies: 1
    Last Post: 5 Apr 2013, 2:48 AM
  3. Replies: 3
    Last Post: 7 Jun 2012, 4:41 PM
  4. Replies: 2
    Last Post: 22 Mar 2012, 2:13 PM
  5. Shared data between Tree and Grid
    By toconnor in forum Sencha Ext JS Q&A
    Replies: 4
    Last Post: 30 Aug 2009, 12:07 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •