Hello,
I've tried the following code in two ways (1st way: I've added and invisible
"marker" column, 2nd way: without adding the invisible "marker" column).

But for both ways, it generates an exception in the rowData.push(marker).

I don't know how to add marker object and how to retrieve it.

I think marker object is pushed at the end of the array and it can be
retrieved simply by calling rowData.marker.

The code for adding markers was:

          var infowindow = null;

           var tm = this._bottomTable.getTableModel();

           for (var i = 0; i < tm.getRowCount(); i++) {

               var contentString = "some html info";
                                                                                
                                                       
);
               // Get the map for this row
               var rowData = tm.getRowDataAsMap(i); 

               var point = new google.maps.LatLng(rowData.LAT, rowData.LON);

               var marker =  new google.maps.Marker({
                               position: point,
                               map: _map_wf,
                               title : tm.getRowDataAsMap(i).LVEH,
                               html : contentString,
                               animation : null });

               google.maps.event.addListener(marker, 'click', function() {
                               infowindow.setContent(this.html);
                               infowindow.open(_map_wf,this);
                       });

               // Save the marker in the map
               rowData.push(marker);
           }

I'm setting my data with  tm.setData(result.values) when retrieved from
backend.

May be I need to set a renderer for the "marker" column? I don't know what's
wrong?

Thanks,


Derrell Lipman wrote:
> 
> On Tue, Apr 26, 2011 at 14:48, slah &lt;[email protected]&gt; wrote:
> 
>>
>> I'm sorry, I liked your idea but I was enable to implement it.
>>
>> First let me tell you that I'm creating my table model initially using:
>>
>>      tableModel.setColumns(["CVEH",  this.tr("Date et Heure"),  "Lon",
>> "Lat", this.tr("Lieu")] ,
>>                                            ["CVEH", "DT",   "LON", "LAT",
>> "LWP" ]);
>>
>>
>> then when I want to fill my table,  I'm using : 
>> tm.setData(result.values)
>> where values is [][] containing values and no Keys.
>>
>> When I tried using:    tm.setDataAsMapArray(result.values, true), my
>> table
>> becomes empty.
>>
>> I guess I've to use setDataAsMapArray or I won't get the expected
>> behavior
>> you explained before.
>>
> 
> If you are using the traditional array of arrays of row data, then you can
> also add an additional column to the row data (rowData.push(marker)) and
> access it that way. The map is a bit cleaner, but this works too.
> 
> Derrell
> 
> ------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network 
> management toolset available today.  Delivers lowest initial 
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 


--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/attaching-a-userdata-to-a-table-row-tp6306120p6307118.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to