Hey William,

I think the presence of datacombobox doesn't mean we abandon combobox. I've got several bugs to fix in combobox for our 3.2 release that cover most of what you list below.

To be clear, the primary reason to use datacombobox is performance. By limiting datacombobox to  be just data-driven, it's possible to optimize instantiation of the pulldown menu. Our experience has been that plain combobox is just too slow in many situations, and the overwhelming cause is premature/unnecessary instantiation of the menu.

jim

On Jan 25, 2006, at 1:16 PM, William Krick wrote:

Isn't there some way to fix the problems with the current combo box...
 
Why does using listitem not show anything in the list?
 
Why does using textlistitem fix the above problem but break selectItemAt()?
 
 
Additionally, why isn't there an "ondata" event (or some other event) fired when a combobox finishes populating the list?
 
In my code below, I use the ondata event of the dataset but that's really not optimal as events can easily fire out of sequence.
 
 
-----Original Message-----
From: Jim Grandy [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 24, 2006 7:15 PM
To: William Krick
Cc: [email protected]
Subject: Re: [Laszlo-user] back to square one -- help!

I was going to ask you to wait about a day until I had a chance to check in the newcombobox integration. But then I tried your test case below, and an optimization in newcombobox is causing really weird behavior with your code.

But don't give up! I'm going to check the integrated component in, and then try another optimization that should work much better.

Basically, one thing newcombobox does is that it shares a single floatinglist between all the newcombobox instances on the canvas. This is to save the time required to instantiate all those floatinglists at startup time. However, sharing requires careful coordination so that change notifications, etc. only go to the currently attached combobox, and not to all of them.

I'm going to try an alternative technique in which we defer instantiating the floatinglist until you actually click on the component. This should have the same startup performance as the existing optimization, but not have the accompanying fragility and complexity.

jim

On Jan 24, 2006, at 3:25 PM, William Krick wrote:

<canvas width="600" height="400">

<dataset name="dsyear" request="true"
src=""http://www.eio-online.com/symbols/getyear">http://www.eio-online.com/symbols/getyear"/>

<dataset name="dsmake" request="true"
src=""http://www.eio-online.com/symbols/getmake">http://www.eio-online.com/symbols/getmake"/>

<dataset name="dsmodel" request="true"
src=""http://www.eio-online.com/symbols/getmodel">http://www.eio-online.com/symbols/getmodel"/>

<dataset name="dsbody" request="true"
src=""http://www.eio-online.com/symbols/getbody">http://www.eio-online.com/symbols/getbody"/>

<dataset name="dsvin" request="true"
src=""http://www.eio-online.com/symbols/getvin">http://www.eio-online.com/symbols/getvin"/>


<view x="25" y="25" layout="axis:y">

<combobox id="cbyear" editable="false" width="200">
<method event="onselect">
dsmake.setQueryParam('yearid', cbyear.getValue());
dsmake.doRequest();
</method>
<listitem datapath="dsyear:/resultset/result"
text="$path{'@modelyear'}" value="$path{'@id'}"/>
</combobox>

<combobox id="cbmake" editable="false" width="200">
<method event="onselect">
dsmodel.setQueryParam('yearid', cbyear.getValue());
dsmodel.setQueryParam('makeid', cbmake.getValue());
dsmodel.doRequest();
</method>
<listitem datapath="dsmake:/resultset/result"
text="$path{'@make'}" value="$path{'@id'}"/>
</combobox>

<combobox id="cbmodel" editable="false" width="200">
<method event="onselect">
dsbody.setQueryParam('yearid', cbyear.getValue());
dsbody.setQueryParam('makeid', cbmake.getValue());
dsbody.setQueryParam('modelid', cbmodel.getValue());
dsbody.doRequest();
</method>
<listitem datapath="dsmodel:/resultset/result"
text="$path{'@model'}" value="$path{'@id'}"/>
</combobox>

<combobox id="cbbody" editable="false" width="200">
<method event="onselect">
dsvin.setQueryParam('yearid', cbyear.getValue());
dsvin.setQueryParam('makeid', cbmake.getValue());
dsvin.setQueryParam('modelid', cbmodel.getValue());
dsvin.setQueryParam('bodyid', cbbody.getValue());
dsvin.doRequest();
</method>
<listitem datapath="dsbody:/resultset/result"
text="$path{'@body'}" value="$path{'@id'}"/>
</combobox>

<combobox id="cbvin" editable="false" width="200">
<method event="onselect">
symbol.setAttribute('text', cbvin.getValue());
</method>
<listitem datapath="dsvin:/resultset/result"
text="$path{'@vin'}" value="$path{'@symbol'}"/>
</combobox>

<text id="symbol" bgcolor="silver" width="200"/>

</view>

</canvas>


_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to