Adding datasource to XPage fails validation in complete refreshMode

61 Views Asked by At

I have a button with refreshMode set to complete. However, it doesn't seem to work when there's dataSource in place (no submission occurs)

Here's what I mean

The button:

<xp:button id="sendButton"
            style="float: right; margin-right:20px;"
            value="Send">

            <xp:eventHandler event="onclick" refreshMode="complete"
                  submit="true">

                <xp:this.action><![CDATA[#{javascript:
                print("I will never get this message printed with complete refreshMode and dataSource in place");

            }]]>
                </xp:this.action>

            </xp:eventHandler>

</xp:button>

And here's the dataSource:

<xp:dominoDocument var="requestDocument" action="openDocument"
    databaseName="${javascript: return database.getFilePath();}"
    ignoreRequestParams="true"
    documentId="${javascript:
       var conclusion = database.getDocumentByUNID(doc_source.getDocument().getParentDocumentUNID());
       var oConclusion = new OsnovaUI_document(conclusion);
       var requestDoc = oConclusion.getMainDocument(); 
       return requestDoc.getUniversalID();
       }">

</xp:dominoDocument>

Could somebody please tell me why this happens?

1

There are 1 best solutions below

4
stwissel On

The most likely cause is a failing validation formula in the classic notes form. Add a display errors ( the one with the plural) custom control to your form. It will show the error.