[CLOSED] [#615] When use X.StoreForModel() a few times, then an error occurs

  1. #1

    [CLOSED] [#615] When use X.StoreForModel() a few times, then an error occurs

    Hi, ext.net team.
    I have upgread ext.net 2.5 to ext.net 3.0. But now , when i use X.StoreForModel() in the view 2 or more times, there an error:

    [E] Ext.data.schema.Schema.addEntity(): Duplicate entity name "PrivateMessage": PrivateMessage and PrivateMessage

    And if there is a window which have a grid, grid set store to StoreForModel, when you open the window first time, it's ok. But if you close the window and open it again, the exception will throw too.

    How can I do? Thank you.

    BTW: I used ModelAttribute like this:

      [Ext.Net.MVC.Model(Name = "PrivateMessage")]
      public class PrivateMessageModel
     {
        //....... 
     }
    Last edited by Daniil; Dec 21, 2014 at 10:39 AM. Reason: [CLOSED] [#615]
  2. #2
    Hi @macroe,

    Thank you for the report.

    I am investigating how to fix it.

    By the way, could you, please, provide some details about your scenario? I mean why do you need a few Stores with the same Model?
  3. #3
    Done in the revisions #6228 and #6229 (trunk).


    To create a few Stores using StoreForModel, please use:

    @Html.X().StoreForModel()
    @Html.X().StoreForModel(false)
    @Html.X().StoreForModel(false)
    Passing false as the first parameter means that a Model instance will no be created, but referred by its name only.

Similar Threads

  1. [CLOSED] Ajax request times out
    By Sowjanya in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Mar 12, 2014, 4:08 AM
  2. [CLOSED] SortChange event calling two times
    By shaileshsakaria in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 22, 2013, 3:17 PM
  3. MessageBusListener Why is triggered two times?
    By samsaertug in forum 2.x Help
    Replies: 10
    Last Post: Mar 13, 2013, 8:18 PM
  4. [CLOSED] Event firing several times.
    By stoque in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 07, 2013, 8:05 AM
  5. Replies: 6
    Last Post: Apr 05, 2012, 4:23 PM

Posting Permissions