Results 1 to 8 of 8

Thread: [2.0.3] ClassCastException selectionChanged ComboBox with BeanModel

  1. #1
    Ext GWT Premium Member
    Join Date
    Sep 2009
    Posts
    131

    Exclamation [2.0.3] ClassCastException selectionChanged ComboBox with BeanModel

    I get a ClassCastException when i try to get the selectedItem from ComboBox, the combobox is loaded with a BeanModel, but it appears that the combo return a diferent class with underscores in the package name, like mi_package_name_MiClass

    I uploaded the complete source code (netbeans project) in this URL:
    www.preparatorianos.com/GXTBugs.rar

    And you can see the error running, here:
    www.preparatorianos.com/GXTBugs
    Attached Images Attached Images

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    THe issue is in that code. When directly using BaseModelData, you cannot implement BeanModelTag. Moving this to the help forum.

  3. #3
    Ext GWT Premium Member
    Join Date
    Sep 2009
    Posts
    131

    Question BaseModelData with BeanModelTag

    Quote Originally Posted by sven View Post
    THe issue is in that code. When directly using BaseModelData, you cannot implement BeanModelTag. Moving this to the help forum.
    And how mi class should be?

    i have:
    public class DataBaseProperty extends BaseModelData implements BeanModelTag{
    }

    I want to use mi beans, you say i cannot implement BeanModelTag when i use BaseModelData

  4. #4
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    You dont need to do that as baseModelData is already a ModelData. Just do
    Code:
    public class DataBaseProperty extends BaseModelData {
    }

  5. #5
    Ext GWT Premium Member
    Join Date
    Sep 2009
    Posts
    131

    Exclamation DataBaseProperty

    Quote Originally Posted by sven View Post
    You dont need to do that as baseModelData is already a ModelData. Just do
    Code:
    public class DataBaseProperty extends BaseModelData {
    }
    If i dont implement BeanModelTag like you say: public class DataBaseProperty extends BaseModelData the combo box stay in Loading.... and never load the data, help

  6. #6
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    You also need to remove the reader as it is not required anymore. I suggest to setup a brakepoint in the app the actually see why nothing happens. I guess the loader fires a loadexception event because an exception occured somewhere.

  7. #7
    Ext GWT Premium Member
    Join Date
    Sep 2009
    Posts
    131

    Thumbs up ComboBox with BeanModel

    Quote Originally Posted by sven View Post
    You also need to remove the reader as it is not required anymore. I suggest to setup a brakepoint in the app the actually see why nothing happens. I guess the loader fires a loadexception event because an exception occured somewhere.

    Thank you so much, now it's working!!!

  8. #8
    Sencha User
    Join Date
    May 2017
    Location
    MEXICO
    Posts
    2

    Default

    I had the same problem a long time ago in a web application and I solved it following the recommendation of the partner.

    You also need to remove the reader as it is not required anymore. I suggest to setup a brakep...
    I had the same problem a long time ago in a web application and I solved it following the recommendation of the partner.
    Me dedico a impartir cursos de admisión a a universidades como la UNAM, UADY,UNISON,UABC y en general cualquier curso de ingreso como el IPN. Para que guste asesorarse bien pueden consultarme en http://proyectoimpulsa.mx

Posting Permissions

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