문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top