Alex Back wrote:
> Hello Jonis,
>
> I didn't manage to reproduce your problem.
>
> However it seems to be that you try to set a padding in your code. What
> version of qooxdoo do you use? In versions prior to 0.7 the padding property
> group is not supported. You have to set paddingTop, paddingBottom,
> paddingLeft and paddingRight seperately.
Version 0.6.6
>
> At what point of your application did this error occur?
When i try to add listview to my GroupBox
re2.add(lv2); // re2 is a groupbox
And all this code is EXACTLY what i use on first function....i have 2
tab's on my application.....the second is working very fine with this code.
For my 'base', i'm using "showcase" demo (without a lot of TAB's).
And i don't remember to setup padding...i just have this code:
var ld2 = [];
var lc2 = {
id : { label : "ID", width : 50, type : "html" },
url: { label : "URL", width : 170, type : "html" }
}
var lv2 = new qx.ui.listview.ListView(ld2, lc2);
lv2.set({ height:"100%", width:"100%" });
re2.add(lv2);
lv2.setBorder(qx.renderer.border.BorderPresets.getInstance().shadow);
lv2.setBackgroundColor("white");
lv2.setWidth("100%");
lv2.setHeight("100%");
>
> cheers,
> Alex
>
> On Monday 07 May 2007 Jonis Maurin Ceara wrote:
>> 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
>
>>
>>
>> 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
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel