1
votes

I'm trying to do a partial update on an Edit Box ("Room") on the server onChange event of a dojo filteringselect control ("From_Name") on an xpage. So, I use a simple Modify Field action with the computed value:

nm = getComponent("From_Name").value;
@DbLookup("names.nsf", "Full Name", nm, 10);

The onChange event also does a Partial Update to the "Room" element.

The problem is that there are a couple of more filteringselect controls on the form, and as I try to do the partial update to do the lookup into the address book to get the person's room number, it gives me the yellow exclamation point error for the other filteringselects on the xpage. If all the other filteringselect controls on the page are filled out first, then the partial update works. How do I get around this and update the Room field when, the From_Name is changed?

The code for my control:

<xe:djFilteringSelect id="From_Name" value="#{document1.From_Name}"
    readOnly="# {javascript:!document1.isNewNote()}">
    <xe:this.defaultValue><![CDATA[#{javascript:
        @Name("[CN]", @UserName())}]]>
    </xe:this.defaultValue>
    <xp:selectItems>
        <xp:this.value><![CDATA[#{javascript:
            db = new Array("SERVER", "names.nsf"); 
            @Unique(@DbColumn(db, "Full Name", 1))
        }]]></xp:this.value>
    </xp:selectItems>
    <xp:eventHandler event="onChange" submit="true"
        refreshMode="partial" refreshId="Room">
        <xe:this.action>
            <xp:modifyField name="Room">
                <xp:this.value><![CDATA[#{javascript:
                    nm = getComponent("From_Name").value; 
                    @DbLookup("names.nsf", "Full Name", nm, 10);
                }]]></xp:this.value>
            </xp:modifyField>
        </xe:this.action>
    </xp:eventHandler>
</xe:djFilteringSelect>
1

1 Answers

2
votes

Add a Dojo attribute required with value false to the other djFilteringSelect controls:

  <xe:this.dojoAttributes>
     <xp:dojoAttribute
        name="required"
        value="false">
     </xp:dojoAttribute>
  </xe:this.dojoAttributes>

enter image description here

With this additional client side attribute you won't get the yellow exclamation point errors anymore.