Search code examples
xpagesxpages-ssjs

partial refresh is taking long time to refresh the component in lotus Xpages


I have enabled a partial refresh at the combo box change event.it refreshes other fields. but on change of combo box value the refresh is taking alot of time and it gives me popup alert"An error occured while updating some of the page, timeout exceed."

<xp:comboBox
    id="access_status"
    value="#{document1.access_status}"
    style="font-size:7pt;width:109.0px"
    defaultValue="New">
    <xp:selectItem
        itemLabel="New"
        itemValue="New"
        id="selectItem2">
    </xp:selectItem>
    <xp:selectItem
        itemLabel="Change required"
        itemValue="Change required"
        id="selectItem3">
    </xp:selectItem>
    <xp:eventHandler
        event="onchange"
        submit="true"
        refreshMode="partial"
        refreshId="access_type_email"
        disableValidators="true">
    </xp:eventHandler>
</xp:comboBox>

<xp:checkBox text="Email" id="access_type_email"
    checkedValue="Yes" value="#{document1.access_type_email}" style="font-size:7pt">
    <xp:eventHandler event="onclick" submit="true"
        refreshMode="partial" refreshId="panel_request_information"
        disableValidators="true" id="eventHandler1">
    </xp:eventHandler>
</xp:checkBox>

Solution

  • Add execMode="partial" execId="access_status" to your comboBox eventHandler:

    <xp:comboBox
        ...
        <xp:eventHandler
            event="onchange"
            submit="true"
            refreshMode="partial"
            refreshId="access_type_email"
            disableValidators="true" 
            execMode="partial" 
            execId="access_status">
        </xp:eventHandler>
    </xp:comboBox>
    

    It will send only the value of your combobox to server for partial refresh, not all other fields. Maybe the other fields in form need too much time for a full submit...