Thank you, it's working fine now! And also, VERY thank for the hint! :D

But...i'm having another problem.

I'm trying to add a second ListView on my application with this code:

        var re = new qx.ui.groupbox.GroupBox();
        re.set({ height:"66%", width:"100%" });
        main.add(re);
        
        // Cria uma lista e adiciona no grupo 'result'
        var ld2 = [];
        var lc2 = {
                id : { label : "ID", width : 50, type : "html" },
                url: { label : "URL", width : 170, type : "html" },
                horai : { label : "Hora Inicio", width : 120, type : "html" },
                horaf : { label : "Hora Fim", width : 120, type : "html" }
        }
        var lv2 = new qx.ui.listview.ListView(ld2, lc2);
        re.add(lv2);

        lv2.setBorder(qx.renderer.border.BorderPresets.getInstance().shadow);
        lv2.setBackgroundColor("white");
        lv2.setWidth("100%");
        lv2.setHeight("100%");


It's the same code i used on the first Listview, but i getting this 
error on debug:
004656 ERROR: qx.ui.listview.ListViewPane[196]: Could not apply padding 
to child [object qx.ui.listview.ContentCellHtml]: TypeError - 
this._style has no properties
   at 
http://192.168.0.14/squidmin/qooxdoo/frontend/framework/source/class/qx/ui/core/Widget.js:2265
   at 
http://192.168.0.14/squidmin/qooxdoo/frontend/framework/source/class/qx/ui/basic/Terminator.js:49
   at 
http://192.168.0.14/squidmin/qooxdoo/frontend/framework/source/class/qx/ui/core/Parent.js:977
   at 
http://192.168.0.14/squidmin/qooxdoo/frontend/framework/source/class/qx/renderer/layout/LayoutImpl.js:388
   at 
http://192.168.0.14/squidmin/qooxdoo/frontend/framework/source/class/qx/ui/core/Parent.js:922
   at 
http://192.168.0.14/squidmin/qooxdoo/frontend/framework/source/class/qx/ui/core/Widget.js:1011
   at 
http://192.168.0.14/squidmin/qooxdoo/frontend/framework/source/class/qx/ui/core/Widget.js:736
..............................
http://192.168.0.14/squidmin/qooxdoo/frontend/framework/source/class/qx/io/image/Preloader.js:139
008920 ERROR: qx.io.image.PreloaderSystem[387]: Could not dispatch event 
of type "completed": NS_ERROR_INVALID_POINTER - Component returned 
failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) 
[nsIDOMHTMLDivElement.appendChild]



What i'm doing wrong?

:(




Alex Back wrote:
> Hello Jonis,
> 
> On Saturday 05 May 2007 Jonis wrote:
>> Hi.
>>
>> How can i get data from selected item on listview (first colum)?
>>
>> i have this code:
>>
>> lv.getPane().addEventListener("dblclick", function(e) {
>>                  //this.getManager().getSelectedItems()
>>                  // or
>>                  alert(this.getManager().getSelectedItem());
>>    });
> Your approach is right. With "getSelectedItem" you get a data item back. For 
> example your defined your data like this:
> 
> var listColumns =
> {
>    name : { label : "Name", width : 100, type : "text" },
>    size: { label : "Size", width : 50, type : "text", align : "right" },
>    type : { label : "Type", width : 80, type : "text" },
>    modified : { label : "Last Modified", width : 150, type : "text" },
>    rights : { label : "Rights", width: 80, type : "text" }
> };
> 
> and pushed your data like this into the ListView:
> 
> listData.push(
> { 
>   name : { text : "File " + i }, 
>   size : { text : Math.round(Math.random()*100) + "kb" },                  
>   type : { text : lt[t] }, 
>   modified : { text : "Nov " + Math.round(Math.random() * 30 + 1) + " 2005" 
> }, 
>   rights: { text : "-rw-r--r--" }
> });
> 
> 
> Then "this.getManager().getSelectedItem().name.text" would get you the text 
> of 
> the first column.
> 
> A litte hint: You can use "qx.io.Json.stringify" for the debug output of this 
> data maps. 
> 
> this.debug(qx.io.Json.stringify(this.getManager().getSelectedItem()));
> 
> This should give you the content of the data item in a nice overview (defined 
> in the eventlistener code).
> 
> cheers,
>   Alex
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to