In order to save values from an XPage in a form you use simple databinding. Setting the field on the Xpage to the value of the field on the form.
But I am using computed fields for parts of my XPage and calculate the value using a javascript. How do I bind these values to the fields on my form so that save in the docuemnt that is created when I click save on my XPage? If I use simple data binding it removes the javascript which I need to craete the value in the first place.
Do I need to simply add another line of code to my javascript in order to get the value I calculate in my computed field to transfer to the document/form on saving. If so what is it?
I have tried document.fieldvalue;
I have tried using replaceitemvalue
I might have done these in the wrong format.
I tried changing the xml so that it did the binding in the <xp: text tag and then I had my javascript in the xp:this value tag but it told me that I had already declared this value and gave me an error.