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:
On my XPage I have a panel with a dynamic datasource (documentid and action are computed (values from sessionScope)). 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 sessionScope 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.
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.
Does anyone have an idea how to solve this? Why do I need 2 partial refreshes here?
What i tried to solve this problem but didn’t work:
- Changing scope of datasource to request
- Performing full update instead of just a partial update of the panel
- Setting
ignorerequestparametertotrue - All possible settings of
computewithform
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.
by trying lots of possible parameter combinations for the datasource as well as the refresh options i found the solution:
when performing the partial refresh of the panel, i have to set “Process data without validation” to true in the “Server Options”. i can’t explain why it works now, especially as i don’t even use any validation of the fields. yet, it works!