Question

Working on an XPage.

Have a button that when clicked sets the value of the "b_BugNum" field to "2" using SSJS:

document1.ReplaceItemValue("b_BugNum","2");

Keep receiving this error when run:

[TypeError] Error calling method 'ReplaceItemValue(string, string)' on an object of type 'NotesXspDocument [Static Java Wrapper, com.ibm.xsp.model.domino.wrapped.DominoDocument]'

The b_BugNum field is an edit box that was placed on form with no modification.

Changed the link to be:

currentDocument.ReplaceItemValue("b_BugNum","2");

and still gives error.

Have the data source set to be a Notes document and other fields are binding to fields on document and displaying the proper values.

Any ideas as to why the error?

Était-ce utile?

La solution

The error message indicates that the method you're calling doesn't exist or have wrong number of parameters/wrong parameter data type.

In your case, the error is that there is no method called ReplaceItemValue. The correct casing is replaceItemValue. Java is case sensitive.

All good Java APIs use camelCase when naming class methods. It might be confusing in the beginning, if you're used to LotusScript.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top