@DBLookup Problem

I have an xpage that uses dblookup with 4 combo boxes after each selection the next combo box changes, this works fine when creating a new document, however when I go to edit the document to change my selections the combo boxes do not change.

I am using dblookup as computed in the values area of the field. I have also tried putting the same code in the onchange of the field in the server script editor but when I change the field it doesn’t stay on the current document it loads a new document. Just wondering if anyone had any suggestions?

Subject: Are the comboBoxes bound to a data source?

e.g.

<xp:this.data>

	<xp:dominoDocument var="document1" formName="formSelectCity"></xp:dominoDocument>

</xp:this.data>

<xp:table>

	<xp:tr>

		<xp:td valign="top" style="background-color:rgb(240,248,255)"

			id="docCell1">

			<xp:button value="Submit" id="button2">

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

					refreshMode="complete" immediate="false" save="true">

				</xp:eventHandler>

			</xp:button>

			<xp:button value="Cancel" id="button3">

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

					refreshMode="complete" immediate="true" save="false">

				</xp:eventHandler>

			</xp:button>

			<xp:button value="Edit" id="button4"

				rendered="#{javascript:!document1.isEditable()}">

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

					refreshMode="complete">

					<xp:this.action>

						<xp:changeDocumentMode mode="edit"></xp:changeDocumentMode>

					</xp:this.action>

				</xp:eventHandler>

			</xp:button>

			

			

			

			<xp:messages id="messages1"></xp:messages>

			<xp:br></xp:br>

			<xp:text escape="true" id="computedField1" value="#{javascript:@Unique()}" style="color:rgb(0,128,0);font-weight:bold"></xp:text>

			<xp:table id="refreshtable">

				<xp:tr>

					<xp:td>

						<xp:label id="label1" value="Subject: "></xp:label>

					</xp:td>

					<xp:td>

						<xp:inputText id="inputText1"

							value="#{document1.Subject}" required="true"

							style="width:200px">

						</xp:inputText>

					</xp:td>

				</xp:tr>

				<xp:tr>

					<xp:td>

						<xp:label value="Select a Country: "

							id="label2">

						</xp:label>

					</xp:td>

					<xp:td>

						<xp:comboBox id="comboBox1"

							value="#{document1.selectCountry}" style="width:200px">

							<xp:selectItem itemValue=""

								itemLabel="Please select">

							</xp:selectItem>





							<xp:eventHandler event="onchange"

								submit="true" refreshMode="partial" refreshId="refreshRow" immediate="true">

							</xp:eventHandler>



							<xp:selectItems>

								<xp:this.value><![CDATA[${javascript:@Unique(@DbColumn(@DbName(),"viewList",1))}]]></xp:this.value>

							</xp:selectItems>

						</xp:comboBox>

					</xp:td>

				</xp:tr>

				<xp:tr id="refreshRow">



					<xp:td valign="top">

						<xp:label value="Select a City: "

							id="label3">

						</xp:label>

						<xp:br></xp:br>

						<xp:text escape="true" id="computedField2"

							value="#{javascript:@Unique()}"

							style="color:rgb(0,64,0);font-weight:bold">

						</xp:text>

						<xp:br></xp:br>

						<xp:text escape="true"

							id="computedField3" style="color:rgb(64,128,128)">

						<xp:this.value><![CDATA[#{javascript:document1.getItemValueString("selectCountry")}]]></xp:this.value></xp:text>

					</xp:td>

					<xp:td valign="top">



						<xp:comboBox id="refreshComboBox"

							value="#{document1.selectCity}" style="width:200px">

							<xp:selectItem itemLabel="None"

								itemValue="">

							</xp:selectItem>

							<xp:selectItems>

								<xp:this.value><![CDATA[${javascript:var ctry = document1.getItemValueString("selectCountry");

var lst1 = @DbLookup(@DbName(),“viewList”,“ctry”,2);

@Explode(lst1,“,”)}]]></xp:this.value>

							</xp:selectItems>

						</xp:comboBox>





					</xp:td>

				</xp:tr>

			</xp:table>



		</xp:td>

	</xp:tr>

</xp:table>

Subject: Bound

yes, the combo boxes are bound to a data source.