Note that there are some explanatory texts on larger screens.

plurals
  1. POxpages: data binding to fields is not updated when dynamically changing the datasource
    text
    copied!<p>Up to now I have been able to solve all XPages related problems by searching the net, but this one keeps driving me crazy and I could really use some help:</p> <p>On my XPage I have a panel with a dynamic datasource (documentid and action are computed (values from <code>sessionScope</code>)). In this panel I have multiple edit boxes that are bound to the datasource via "simple binding". Outside of the panel I have a combo box where the user can choose a document to show and a button to create a new document. When the combo box value changes, I put documentid and action to <code>sessionScope</code> and perform a partial update of the panel. Everything works fine and the documents are shown the right way. When I press the button to create a new document (documentid="",action="newDocument") I get a new document and the edit boxes in the panel are empty, just the way it should be. </p> <p>However, if I pick an existing document from the combo box after creating a new one, the edit boxes are not updated but stay the same as in the document I just created. I figured out that the partial refresh worked for the datasource (documentid is correct) but it seems that the data binding didn't work, meaning that the values from the document are not written to the edit boxes. Afterwards, if I pick another document from the combo box or perform another partial refresh, the data binding suddenly works again.</p> <p>Does anyone have an idea how to solve this? Why do I need 2 partial refreshes here?</p> <p>What i tried to solve this problem but didn't work:</p> <ol> <li>Changing scope of datasource to request</li> <li>Performing full update instead of just a partial update of the panel</li> <li>Setting <code>ignorerequestparameter</code> to <code>true</code></li> <li>All possible settings of <code>computewithform</code></li> </ol> <p>I know I could manually write the data from the document to the edit boxes, but I think it should be possible to solve this without a workaround.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload