[Laszlo-dev] RE: [Laszlo-user] Bug? -- comboboxe dropdown list with invisible items?

Jeff Freedman jeff.freedman at tpginc.com
Fri Dec 23 06:42:08 PST 2005


I think that's because the ReplicationManager hasn't finished populating the
floating list yet so there's nothing to select AND the comboBox ondata event
doesn't seem to fire.

I've gotten around that by the following:

<textlistitem datapath="listData:/results" text="$path{'@name'}"
value="$path{'@id'}">
	<method event="ondata">
		if (this.clonenumber == 0) {
			parent.selectItemAt(0);
		}
      </method>
</textlistitem>

Perhaps one of the dev guys can fix the combobox to fire an ondata event
when it's populated.

Jeff

-----Original Message-----
From: William Krick [mailto:wkrick at eio-online.com] 
Sent: Wednesday, December 21, 2005 4:45 PM
To: jeff.freedman at tpginc.com; laszlo-user at openlaszlo.org
Subject: RE: [Laszlo-user] Bug? -- comboboxe dropdown list with invisible
items?

That fixes the text in the list, however, now SelectItemAt(0) doesn't work.

Try this example comparing both listitem and textlistitem...

<?xml version="1.0" encoding="UTF-8" ?>
<canvas>

  <dataset name="ds1" src="http://eio-online.com/symbols/getyear"
           request="true" ondata="cb1.selectItemAt(0)"/>

  <dataset name="ds2" src="http://eio-online.com/symbols/getyear"
           request="true" ondata="cb2.selectItemAt(0)"/>

  <simplelayout/>

  <combobox id="cb1" editable="false">
    <listitem datapath="ds1:/resultset/result" text="$path{'@modelyear'}"/>
  </combobox>

  <combobox id="cb2" editable="false">
    <textlistitem datapath="ds2:/resultset/result"
text="$path{'@modelyear'}"/>
  </combobox>


</canvas>





-----Original Message-----
From: Jeff Freedman [mailto:jeff.freedman at tpginc.com]
Sent: Wednesday, December 21, 2005 4:12 PM
To: 'William Krick'; laszlo-user at openlaszlo.org
Subject: RE: [Laszlo-user] Bug? -- comboboxe dropdown list with
invisible items?


William,

Try using textlistitem instead of listitem.

Jeff

-----Original Message-----
From: laszlo-user-bounces at openlaszlo.org
[mailto:laszlo-user-bounces at openlaszlo.org] On Behalf Of William Krick
Sent: Wednesday, December 21, 2005 3:36 PM
To: laszlo-user at openlaszlo.org
Subject: [Laszlo-user] Bug? -- comboboxe dropdown list with invisible items?

Here's a much simpler, stripped down version of the code I posted earlier.

The combobox is filled with items pulled from the web.  The items are in the
dropdown list but the text isn't visible for some reason.  When you select
one of the invisible items in the list, the combobox is filled with that
item (the correct behaviour).

Why are the items in the list invisible? Is this a bug or am I doing
something wrong?


<?xml version="1.0" encoding="UTF-8" ?>
<canvas>
  <dataset name="ds" request="true"
src="http://eio-online.com/symbols/getyear"/>
  <combobox editable="false">
    <listitem datapath="ds:/resultset/result" text="$path{'@modelyear'}"/>
  </combobox>
</canvas>

_______________________________________________
Laszlo-user mailing list
Laszlo-user at openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-user












More information about the Laszlo-dev mailing list