user1358852
user1358852

Reputation:

XPages - saved computed fields on Notes form

On saving an XPage I would like to save all values of computed fields in the underlying Notes form. The reason is that when opening the document in the Notes client I want to have the values of this computed fields already saved in the document. Is it possible to do this?

Upvotes: 0

Views: 945

Answers (1)

Paul Stephen Withers
Paul Stephen Withers

Reputation: 15729

There are a few options.

  1. Set the fields via SSJS / Java when the document is created and use the Computed Field bound to the underlying field.
  2. Use additional HiddenInput fields, set accordingly.
  3. Add code to store the values on save using getComponent("myText1").getValue(). If they need to be another data type than text, you'll need to convert them.
  4. Use Computed Text on your Notes Client form, computed to the same as you have on your XPage.
  5. Using an Edit Box with readonly="true" may work, I can't remember if that stores the value back or not.

The Computed Field control is really more analagous to Computed Text in the Notes Client world rather than a field that's computed. It allows setting various tags like h2, span etc, to allow a single control that's not a Label to display calculated content and have controlling properties like styleClass, loaded, rendered etc.

Upvotes: 7

Related Questions