Show/hide panel and default values

Hi,

I have a combobox which does a partial refresh with immediate set to true of a panel containing an inputText and a combobox. The panel contents are only rendered when the first combobox is changed to “Europe”. The fields in the panel have a default value (“France”). Show/hide works fine but the combobox is not set to its default value (but to the first selectItem value), whereas the inputText component shows “France” as expected. Can anyone explain why this happens?

Many thanks. Following an example:

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

<xp:view xmlns:xp=“http://www.ibm.com/xsp/core”>

<xp:comboBox id="comboBox1">

	<xp:selectItem itemLabel=""></xp:selectItem>

	<xp:selectItem itemLabel="North America"></xp:selectItem>

	<xp:selectItem itemLabel="Europe"></xp:selectItem>

	<xp:eventHandler event="onchange" submit="true"

		refreshMode="partial" refreshId="panelRefresh" immediate="true">

	</xp:eventHandler>

</xp:comboBox>

<xp:panel id="panelRefresh">

	<xp:panel>

		<xp:comboBox id="comboBox2" defaultValue="France">

			<xp:selectItem itemLabel="UK"></xp:selectItem>

			<xp:selectItem itemLabel="France"></xp:selectItem>

			<xp:selectItem itemLabel="Germany"></xp:selectItem>

		</xp:comboBox>

		<xp:inputText id="inputText1" defaultValue="France">

		</xp:inputText>

		<xp:this.rendered><![CDATA[#{javascript:var field = getComponent("comboBox1");

var value = field.getSubmittedValue();

value = (value == null) ? value = field.getValue() : value;

return value == “Europe”;}]]></xp:this.rendered>

	</xp:panel>

</xp:panel>

</xp:view>