hgs1906 / smartgwt

Automatically exported from code.google.com/p/smartgwt
0 stars 0 forks source link

createRecordComponent(final ListGridRecord record, Integer colNum) {} never executed #450

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
createRecordComponent(final ListGridRecord record, Integer colNum) {}
Never executed

Proof: showcase sample
http://www.smartclient.com/smartgwt/showcase/#grid_cell_widgets doesn't
work if recompiled under smartGWT 2.1 and GWT 2.0.2, Java5, Eclipse 3.5

Grid displayed but no buttons shown, execution never reaches protected
Canvas createRecordComponent(final ListGridRecord record, Integer colNum) {}

smartGWT 2.1 and GWT 2.0.2, Java5, Eclipse 3.5

Original issue reported on code.google.com by lytvyn...@gmail.com on 21 Apr 2010 at 1:53

GoogleCodeExporter commented 9 years ago
Including complete Eclipse project to illustrate the problem

Original comment by lytvyn...@gmail.com on 21 Apr 2010 at 3:22

Attachments:

GoogleCodeExporter commented 9 years ago
The test case has to be minimal. Please remove all the unnecessary code like 
server integration and create a 
simplified testcase. The Showcase sample that uses the 
createRecordComponent(..) override works fine.

Original comment by sanjiv.j...@gmail.com on 25 Apr 2010 at 10:59

GoogleCodeExporter commented 9 years ago
I ran the GridCellWidgetsSample class and it ran fine and the 
createRecordComponent override point got called.

Original comment by sanjiv.j...@gmail.com on 25 Apr 2010 at 11:27

GoogleCodeExporter commented 9 years ago
Please delete the issue.

Original comment by lytvyn...@gmail.com on 26 Apr 2010 at 4:32

GoogleCodeExporter commented 9 years ago
Well, it doesn't work for me either. I use a RPC DataSource instead of static 
data. 
Could that be the difference?

Original comment by karel.brezina@gmail.com on 27 Apr 2010 at 10:31

GoogleCodeExporter commented 9 years ago
Including a class that behaves as lytvynyuk described. "createRecordComponent" 
method 
is never triggered.

Original comment by karel.brezina@gmail.com on 27 Apr 2010 at 11:40

Attachments:

GoogleCodeExporter commented 9 years ago
The behavior is really strange.
- when I call "listGrid.fetchData();", record components are never created.
- when I call "listGrid.addRecord(record);", record components are created for 
all 
records (not just for the new ones). Sometimes a record component is displayed 
even 
twice on a row. It should be displayed just in the last column, but sometimes 
it's 
displayed even in the first column.

Original comment by karel.brezina@gmail.com on 27 Apr 2010 at 12:41

GoogleCodeExporter commented 9 years ago
I have a problem too on createRecordComponent of ListGrid never called.

When I add a GridListRecord from local data (so I add on creation of the 
GridList),
everything is OK. However when I add from a service response (inside a onSuccess
function), it does not call createRecordComponent.

Example that does not call createRecordComponent:
[code]
           public void buildListGrid() {
        myService.getAllObjects(new AsyncCallback<Collection<Object>>() {
            public void onFailure(Throwable caught) {
                GWT.log("ERROR while buildListGrid !!!", caught);
            }
            public void onSuccess(Collection<Object> result) {
                GWT.log("Success to buildListGrid = "+result.size()+" resultat(s)");
                /* NOT WORKING */
                ListGridRecord r = new ListGridRecord();
                r.setAttribute("id", 1);
                r.setAttribute("title", "toutou");
                r.setAttribute("desc", "desc toutotu");
                r.setAttribute("indexUpDown", 1);
                r.setAttribute("active", true);
                addData(r);
            }
        });
    }
[/code]

Example that calls createRecordComponent: : 
[code]
                ListGridRecord r = new ListGridRecord();
        r.setAttribute("id", 1);
        r.setAttribute("title", "toutou");
        r.setAttribute("desc", "desc toutotu");
        r.setAttribute("indexUpDown", 1);
        r.setAttribute("active", true);
        addData(r);
[/code]

any idea ?

Original comment by casimire...@gmail.com on 27 May 2010 at 11:54

GoogleCodeExporter commented 9 years ago
I found a solution, a call a function for creating a component on adding each
ListGridRecord. This function makes the job of createRecordComponent, because I 
do a
loop on each Column, returning null when not special component needed.

Original comment by casimire...@gmail.com on 28 May 2010 at 8:20

GoogleCodeExporter commented 9 years ago
Casimire,

Could you detail your solution?

I face this problem:

- I feed the grid with asyncronous call, and CreateRecordComponent does not 
work for me.

- My intention is to have a cell with serveral, a list of links.

Thanks.

Best regards, Ignacio

Original comment by igna...@nubbius.com on 1 Mar 2011 at 1:51

GoogleCodeExporter commented 9 years ago
I have this problem too, I use  listGrid.setData(Records), but 
createRecordComponent() never executed;

Original comment by jianyan1...@gmail.com on 15 Jan 2014 at 6:15

GoogleCodeExporter commented 9 years ago
Just to reiterate - this subsystem is working fine in our tests, and many 
aspects of its behavior are covered by automated tests to ensure it's working 
properly.

To reopen this issue would require a minimal, standalone test case clearly 
demonstrating a framework bug.  This test case should also have been checked 
against the latest available patched builds from smartclient.com/builds.

Original comment by smartgwt...@gmail.com on 15 Jan 2014 at 9:06