1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    7
    Vote Rating
    0
    navandres is on a distinguished road

      0  

    Default ListField selection problem...

    ListField selection problem...


    Hi there. I've found some odd behavior and I think that it's a bug. I'm working with gxt-2.2.5-gwt22. I'm trying to select some BaseModel elements from a ListField, using setSelection method. The store is loaded and everything seems to be OK. When I invoke the setSelection method, I've got an error on ListViewSelectionModel.onLastFocusChanged method. The problem is that listStore attribute is not set, so I get an error in the following line:

    i = listStore.indexOf(newFocused);

    I wonder why, if I set the ListField with a storelist through the setStore, shoulden't that set the inner ListView object with this store?

    I did that to save the problem. Is that a bug?

    Cheers,
    Andres

  2. #2
    Sencha User
    Join Date
    Dec 2011
    Posts
    7
    Vote Rating
    0
    navandres is on a distinguished road

      0  

    Default


    java.lang.NullPointerException
    at com.extjs.gxt.ui.client.widget.ListViewSelectionModel.onLastFocusChanged(ListViewSelectionModel.java:318)
    at com.extjs.gxt.ui.client.widget.selection.AbstractStoreSelectionModel.setLastFocused(AbstractStoreSelectionModel.java:422)
    at com.extjs.gxt.ui.client.widget.selection.AbstractStoreSelectionModel.doMultiSelect(AbstractStoreSelectionModel.java:304)
    at com.extjs.gxt.ui.client.widget.selection.AbstractStoreSelectionModel.doSelect(AbstractStoreSelectionModel.java:322)
    at com.extjs.gxt.ui.client.widget.selection.AbstractStoreSelectionModel.select(AbstractStoreSelectionModel.java:233)
    at com.extjs.gxt.ui.client.widget.selection.AbstractStoreSelectionModel.setSelection(AbstractStoreSelectionModel.java:255)
    at com.extjs.gxt.ui.client.widget.form.ListField.setSelection(ListField.java:200)


    Quote Originally Posted by navandres View Post
    Hi there. I've found some odd behavior and I think that it's a bug. I'm working with gxt-2.2.5-gwt22. I'm trying to select some BaseModel elements from a ListField, using setSelection method. The store is loaded and everything seems to be OK. When I invoke the setSelection method, I've got an error on ListViewSelectionModel.onLastFocusChanged method. The problem is that listStore attribute is not set, so I get an error in the following line:

    i = listStore.indexOf(newFocused);

    I wonder why, if I set the ListField with a storelist through the setStore, shoulden't that set the inner ListView object with this store?

    I did that to save the problem. Is that a bug?

    Cheers,
    Andres

  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


    Is it possible that you are using a selectionmodel that is not bound to the listview?

  4. #4
    Sencha User
    Join Date
    Dec 2011
    Posts
    7
    Vote Rating
    0
    navandres is on a distinguished road

      0  

    Default


    mmmm, I think I don't. But may be you can take a look at the code. It's not complicated.

    I can't attach a file. I don't understand why. Can I send you the file through skype?

    Thanks for your time.

    Cheers,
    Andres

  5. #5
    Sencha User
    Join Date
    Nov 2011
    Location
    Chennai
    Posts
    3
    Vote Rating
    0
    SurendarRaj is on a distinguished road

      0  

    Default Same problem

    Same problem


    Hi Andres,
    Even i am facing the same problem.Any Solution for this............

    Regards,
    Surendar Raj

  6. #6
    Sencha User
    Join Date
    Dec 2011
    Posts
    7
    Vote Rating
    0
    navandres is on a distinguished road

      0  

    Default Timing problem..

    Timing problem..


    Raj,
    As far as I remember, it was a problem of timing. I was loading the ListStore through an RPC and I was trying to select from that store before that. The confusion there was that debuging, I got there and the error had no sence because the time that takes to get you on debug, the thread that loads the ListStore did it's work. What I did was to do the setSelection on the callback. It really depends on your code and the way it is placed, but basically I have to synchronize to separate threads.

    Cheers,
    Andres

Thread Participants: 2

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