Reputation: 251
In one of my XPages I got a radio button. If I choose value of the radio button, a partial refresh is called.
Beneath this new fields there is a Dojo filtering select field to choose from a list of employees.
If I select value 1, the filtering select works fine. If I select value 2, the filtering select still starts at the "old" position, without recognizing the space, the new fields need
How can I update the position of the filtering select list? The partial refresh is for the complete content of the page, but does not seem to work here.
Here is the code of the radio group, which does the partial refresh on change:
<xp:radioGroup id="rbgSelectEducationType" layout="pageDirection"
value="#{docApplication.EducationType}">
<xp:this.readonly>
<![CDATA[#{javascript:docApplication.getItemValueString("ZwfStepName") != "Start"}]]></xp:this.readonly>
<xp:selectItem itemLabel="ESG Veranstaltung aus dem Katalog"
itemValue="ESG-Veranstaltung">
</xp:selectItem>
<xp:selectItem itemLabel="Externe Veranstaltung"
itemValue="Externe-Veranstaltung">
</xp:selectItem>
<xp:eventHandler event="onclick" submit="true"
refreshMode="partial" refreshId="wcEventDetails">
</xp:eventHandler>
</xp:radioGroup>
And here is the code of the filtering select dropdown:
<xe:djFilteringSelect id="Approver" value="#{docApplication.Approver}" ignoreCase="true">
<xe:this.rendered><![CDATA[#javascript:docApplication.getItemValueString("ZwfStepName")=="Start"}]]></xe:this.rendered>
<xp:selectItems id="selectItems2">
<xp:this.value><![CDATA[#{javascript:if(docApplication.isEditable()){
getComponent("AllUsersLastFirst").getValue().split("#");
}}]]></xp:this.value>
</xp:selectItems>
<xp:eventHandler event="onChange" submit="true" refreshMode="partial" refreshId="panelBody" id="eventHandler2">
<xp:this.action><![CDATA[#{javascript:var dbPR = new Array(applicationScope.srv, applicationScope.pathPR);
var Approver:com.ibm.xsp.extlib.component.dojo.form.UIDojoFilteringSelect = getComponent("Approver");
var lookup=@DbLookup(dbPR,applicationScope.xpPersonByLastNameFirstName,Approver.getValue(),2);
lookup=@If(@IsError(lookup),"error",lookup);
if (lookup=="error") {
errormsg = valstrings.getString("ccEsgDocWflContentApprover.lookup1");
globalScriptErrors.add(errormsg);
requestScope.put("scriptErrors", globalScriptErrors);
}
@SetField("NotesNameApprover", lookup);}]]></xp:this.action>
</xp:eventHandler>
</xe:djFilteringSelect>
Upvotes: 1
Views: 526
Reputation: 20384
The filtering select is composed of a number of HTML elements (Firebug is your friend here). When you do a partial refresh that doesn't include the select itself, it isn't drawn again, thus the dropdown stays at the same position. The short answer: include the dropdown in the partial refresh.
Upvotes: 1