Hello,
I create several dynamic comboBoxOptions, and I create one empty comboBoxOption, like this:
id = ' ';
name = ' ';
var btl = "http://www.backbase.com/2006/btl";
option = bb.document.createElementNS(btl,'b:comboBoxOption');
bb.command.setText(option,name);
ctrl.appendChild(option);
name = ' ';
var btl = "http://www.backbase.com/2006/btl";
option = bb.document.createElementNS(btl,'b:comboBoxOption');
bb.command.setText(option,name);
ctrl.appendChild(option);
It is well, but...when I see the comboBox, the empty comboBoxOption hardly be seen.
How can I resolve this?I tried with the attributes:"opacity,visibility,display,height,width" but nothing :(
Thanks.

Hi, If you want to have a
14 November, 2007 - 13:40 — gaoHi,
If you want to have a comboBoxOption with blank content, set the text to  .
Hi Gao
14 November, 2007 - 14:35 — AlyHi Gao,
I want to a comboBoxOption blank content but too I want to the empty comboBoxOption have the same size that the others comboBoxOption aren`t empty. The empty comboBoxOption is very little when I create it dynamically.
Thanks.
Hi, I saw your problem when
14 November, 2007 - 14:44 — gaoHi,
I saw your problem when I tried you code, which set an whitespace string as text.
Then I used   instead of whitespace string, and the blank option got the same height as others.
Hope it helps, and can you post your complete code if it still doesn't work for you?
Hi
14 November, 2007 - 16:26 — AlyMy code is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>ComboBox</title>
<script type="text/javascript" src="Backbase_4_1/engine/boot.js"></script>
</head>
<body>
<script type="text/backbase+xml" xmlns="http://www.w3.org/1999/xhtml" xmlns:b="http://www.backbase.com/2006/btl"
xmlns:c="http://www.backbase.com/2006/command"
xmlns:d="http://www.backbase.com/2006/tdl"
xmlns:e="http://www.backbase.com/2006/xel"
xmlns:smil="http://www.w3.org/2005/SMIL21/BasicAnimation"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xi:include href="Backbase_4_1/bindings/config.xml" />
<xi:include href="Backbase_4_1/tools/debugger/debugger.xml" />
<b:button >Add a blanck option
<e:handler event="click" type="application/javascript">
<![CDATA[
var cb= bb.document.getElementById('cb');
var option = bb.document.createElementNS('http://www.backbase.com/2006/btl','b:comboBoxOption');
bb.command.setText(option,' ');
cb.appendChild(option);
]]>
</e:handler>
</b:button>
<br/><br/>
<b:comboBox id="cb" width="200px">
</b:comboBox>
</script>
</body>
</html>
Hope that you find my error.
Thanks
Hi, I slightly changed your
14 November, 2007 - 16:59 — gaoHi,
I slightly changed your code, and it works for me. Hope it works for you too.
<e:handler event="click" type="application/javascript">
var cb= bb.document.getElementById('cb');
var option = bb.document.createElementNS('http://www.backbase.com/2006/btl','b:comboBoxOption');
bb.command.setText(option,'&#160;');
cb.appendChild(option);
</e:handler>
</b:button>
Thanks Gao
15 November, 2007 - 08:20 — AlyHi Gao,
Thanks for your help!Your code works when I write the code inside the one handler, but when I write the code inside the one function doesn't work.
Thankssss! :)
Is it possible to refresh a combobox dynamically?
20 June, 2008 - 09:44 — JbuzzerHi my combobox gets its possible options from a database. Is it possible to do like listgrid.refresh() to a combobox so that the user doesn't have to refresh the page when they add an option in the database? I need it to refresh off from the database rather than via javascript appendchild() in case the entry to the database failed.
Is it possible to refresh a combobox dynamically?
2 September, 2008 - 09:54 — yudiIt is not possible because comboBox does not have data source. However, you could try to use populator that load comboBox (type always) or XSLT tranform .
cheers,
Yudi
Is it possible to refresh a combobox dynamically?
3 September, 2008 - 17:35 — tordonaI'm currently doing this using a listGrid with a local dataSource. In the listGrid, for a pageRefreshed event, I fire a function that updates a comboBox accordingly. It's a one to one relationship with regards to the data, eg: one listGrid row is one comboBox option, so the data is doesn't have a complicated schema.
I then use combinations of btl.dataSource.getValue, btl.dataSource.setValue, and bb.command.load to manipulate the local dataSource. Afterwards, I fire listGrid.refresh() to show any changes for the comboBox.
There might be a better way to bind a comboBox to a dataSource, but for now, this works fine.