1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    11
    Answers
    1
    Vote Rating
    0
    atlanta.peter is on a distinguished road

      0  

    Default Answered: Issue with Grid Data

    Answered: Issue with Grid Data


    I have a Grid in Accordian Layout.

    The Grid Cloumns are being displayed but the row data is not being diplayed.

    But again I have a event Listener added to the grid. and the event is working perfectly fine. I am able to get the Selected Model data from the event Object and pass it to the next Widget.

    Has someone experienced a similar problem. Appreciate any help

  2. Ok. I finally found the issue.

    For my Bean I was extending BeanModel like this

    public class PersonDTO extends BeanModel implements Serializable{

    which did not work.I thought this should work because I found this info from a lot of examples online and in may forums. What actually worked was the below

    public class PersonDTO implements BeanModelTag,Serializable{

    and in my view use this

    private BeanModelFactory factory = BeanModelLookup.get().getFactory( PersonDTO.class );

    ListStore<BeanModel> store = new ListStore<BeanModel>();

    store.add( factory.createModel( new PersonDTO(---- some data) );

    Thanks for the help. I was nice to know someone was looking at your request.

  3. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Answers
    60
    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


    Have you tried to reproduce this in a small standalone testcase?

    Are you sure that the grid does not contain any data or is it just not visible? You can check that easily with firebug

  4. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    11
    Answers
    1
    Vote Rating
    0
    atlanta.peter is on a distinguished road

      0  

    Default


    I havent checked it in firbug. But I am sure it is present in the grid and just not visible.

    I am saying that because the same data is being passed to the Event. But will check it in firebug anyways

    Do you have any idea how to make the data visible. I tried setting all kinds of sizes for both the ContentPanel and the Grid . Which dint work ofcourse

  5. #4
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Answers
    60
    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


    Can you verify the height of your grid? Sounds like you have not set any height on it or the parent and so it fails to display

  6. #5
    Sencha User
    Join Date
    Oct 2011
    Posts
    11
    Answers
    1
    Vote Rating
    0
    atlanta.peter is on a distinguished road

      0  

    Default


    Sven,

    I am sorry for being so sure abt the grid containing data. Turns our my Grid does not contain any data, but as weird as it gets the grind event works fine.

    Ok getting back to my concern , I realised that I missed out mentioning a very imp point.
    Actually I am using uibinder GXT Grid.

    So I went back and tried a sample first ( a simple test) just to make sure , and the sample also did not work for me. So my question is does the uibinder GXT Grid work at all.
    I did use Form and other panels in uibinder GXT which worked great for me. I am stuck with the Grid.

  7. #6
    Sencha User
    Join Date
    Oct 2011
    Posts
    11
    Answers
    1
    Vote Rating
    0
    atlanta.peter is on a distinguished road

      0  

    Default


    LayoutContainer c = new LayoutContainer();
    private ColumnModel cm;
    public SearchResultsViewImpl() {
    createView();
    initComponent(c);
    }
    private Presenter presenter;


    public void setPresenter(Presenter presenter) {
    this.presenter = presenter;
    }


    public void createView(){




    c.setLayout(new FlowLayout(10));

    List<ColumnConfig> configs = new ArrayList<ColumnConfig>();

    ColumnConfig column = new ColumnConfig();
    column.setId("id");
    column.setHeader("id");
    column.setWidth(200);
    configs.add(column);

    column = new ColumnConfig();
    column.setId("firstName");
    column.setHeader("firstName");
    column.setWidth(100);
    configs.add(column);

    ListStore<PersonDTO> store = new ListStore<PersonDTO>();
    store.add(new PersonDTO(new Integer(0),"test","test","test","test","test","test","test","test","test",
    new Integer(0),new Date(),new Integer(0),new Date(),"test","test","test","test","test","test","test"));

    cm = new ColumnModel(configs);

    ContentPanel cp = new ContentPanel();
    cp.setBodyBorder(true);
    cp.setHeading("Basic Grid");
    cp.setLayout(new FitLayout());
    cp.getHeader().setIconAltText("Grid Icon");
    cp.setSize(600, 300);

    final Grid<PersonDTO> grid = new Grid<PersonDTO>(store, cm);
    grid.setStyleAttribute("borderTop", "none");
    grid.setBorders(false);
    grid.setStripeRows(true);
    grid.setColumnLines(true);
    grid.setColumnReordering(true);
    cp.add(grid);

    c.add(cp);
    }


    public Widget asWidget() {
    return this;
    }


    and PersonDTO is as follows

    public class PersonDTO extends BeanModel implements Serializable {


    private static final long serialVersionUID = -634708820353723786L;
    private Integer id;
    private String firstName;

    ------------

    My actual DTO has more than 15 attributes but I want to diaply only 5 in my grid. Is that a problem.

    Can someone please tell me what I might be doing wrong

  8. #7
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Answers
    60
    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


    That is not a simple standalone testcase implementing EntryPoint. That are just code snippets. You really should take the time to reproduce your issue in a small standalone testcase that everyone can run, so your problem can get resolved.

  9. #8
    Sencha User
    Join Date
    Oct 2011
    Posts
    11
    Answers
    1
    Vote Rating
    0
    atlanta.peter is on a distinguished road

      0  

    Default


    Ok. I finally found the issue.

    For my Bean I was extending BeanModel like this

    public class PersonDTO extends BeanModel implements Serializable{

    which did not work.I thought this should work because I found this info from a lot of examples online and in may forums. What actually worked was the below

    public class PersonDTO implements BeanModelTag,Serializable{

    and in my view use this

    private BeanModelFactory factory = BeanModelLookup.get().getFactory( PersonDTO.class );

    ListStore<BeanModel> store = new ListStore<BeanModel>();

    store.add( factory.createModel( new PersonDTO(---- some data) );

    Thanks for the help. I was nice to know someone was looking at your request.

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