1. #1
    Ext GWT Premium Member
    Join Date
    Sep 2009
    Posts
    131
    Vote Rating
    0
    edcon is on a distinguished road

      0  

    Exclamation [2.0.3] ClassCastException selectionChanged ComboBox with BeanModel

    [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
    by Cetin@

  2. #2
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    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


    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
    Vote Rating
    0
    edcon is on a distinguished road

      0  

    Question BaseModelData with BeanModelTag

    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
    by Cetin@

  4. #4
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    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


    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
    Vote Rating
    0
    edcon is on a distinguished road

      0  

    Exclamation DataBaseProperty

    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
    by Cetin@

  6. #6
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    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


    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
    Vote Rating
    0
    edcon is on a distinguished road

      0  

    Thumbs up ComboBox with BeanModel

    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!!!
    by Cetin@

Thread Participants: 1