1. #1
    Sencha User
    Join Date
    Sep 2009
    Posts
    289
    Vote Rating
    0
    diegolovison is on a distinguished road

      0  

    Default filter, dataIndex, entity and model

    filter, dataIndex, entity and model


    hello,

    I have one model that represent my entity...
    Code:
    private class MyModel {
      private String productName;
      private String customerName;
    }
    so my filter should be
    Code:
    new StringFilter("productName");
    new StringFilter("customerName");
    my entity is
    Code:
    @Entity
    private MyEntity {
      private Customer customer;
      private Product product;
    }
    but I have one method that return a generic filter and will return
    Code:
    productName
    customerName
    its appreciate if I can set for the Filter one attribute that represent the real attributes, for example:
    Code:
    new StringFilter("productName", "product.name");
    new StringFilter("customerName", "customer.name");
    so my generic filter will get
    Code:
    product.name
    customer.name

    thanks

  2. #2
    Software Architect
    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


    I dont understand what you try to explain. Please explain it again, with us much information you can give use.

  3. #3
    Sencha User
    Join Date
    Sep 2009
    Posts
    289
    Vote Rating
    0
    diegolovison is on a distinguished road

      0  

    Default


    AdressEntity
    Code:
    @Entity
    @Table
    public class AdressEntity {
     
      @Id
      @Column
      private Integer id;
    
      @Column
      private String name;
    
      // getters and setters...
    }
    PhoneEntity
    Code:
    @Entity
    @Table
    public class PhoneEntity {
    
      @Id
      @Column
      private Integer id;
    
      @Column
      private String name;
    
      // getters and setters...
    }
    CustomerEntity
    Code:
    @Entity
    @Table
    public class Customer {
    
      @Id
      @Column
      private Integer id;
    
      @Column
      private AdressEntity adress;
    
      @Column
      private PhoneEntity phone;
    
      // getters and setters...
    }
    If I dont use DTO to show my data I can use this....
    Code:
    List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
    
    ColumnConfig column = new ColumnConfig("id", "Id", 70);
    columns.add(column);
    
    column = new ColumnConfig("adress.name", "Adress", 70);
    columns.add(column);
    
    column = new ColumnConfig("phone.name", "Phone", 70);
    columns.add(column);
    
    RpcProxy rpcProxy = .....
    Loader loader = .....(rpcProxy, new BeanModelReader());
    ListStore store = ....(loader);
    
    
    Grid<BeanModel> grid = new Grid<BeanModel>(store, new ColumnModel(columns));
    this code work fine....
    I'll explain by parts to see if I can explain better ... okay? Once you respond, I keep posting...

  4. #4
    Sencha User
    Join Date
    Sep 2009
    Posts
    289
    Vote Rating
    0
    diegolovison is on a distinguished road

      0  

    Default


    anyone understand?

Similar Threads

  1. [GXT 2.0.1]: BeanModelMarker and equals() method from entity
    By stogi in forum Ext GWT: Discussion
    Replies: 9
    Last Post: 7 Aug 2009, 1:12 AM
  2. Replies: 0
    Last Post: 10 Apr 2009, 1:47 AM
  3. Access to inner json entity
    By TheItalianJob in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 31 Jan 2008, 2:51 AM
  4. How to reload column model in filter grid?
    By romanlutsk in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 29 Jan 2008, 11:07 PM

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi