I have a simple application with one class and one xPage with one computedField, bound to that class. I want to show result from class getter as a bean. Doesn’t work.
My class looks like this:
package test.test;
public class Test {
public Test() {
}
public String getTest() {
return "Test";
}
}
SSJS in the computedField:
var test = new test.test.Test();
return test.getTest();
an error is like this:
Error while executing JavaScript computed expression
Script interpreter error, line=1, col=17: 'test' is undefined
1: var test = new test.test.Test();
Am I missing any settings or what?
Thanks in advance, JiKra
EDIT: If I use a managed bean, the issue is absolutely identical. There must be problem with my Designer/Eclipse IDE. I’ll try to reinstall it tomorow.
EDIT2: Today, I tried to do the same thing in my colleges’s computer and it’s the same error. So, the problem is not with my IDE. I must be missing something. Do I need any external libraries to be installed on the server or in the IDE?
Ok I did the following.
1) Created a new Java Class.
2) Put in the following code into the class.
3) Created an XPage with the following source:
Opened it in a browser and got the word “Test” appearing.
Changed variable “t” to “test” and then it failed. So it appears the variable name is the issue.
[EDIT]
Based on your comment of using 8.5.2, the code/Java functionality didn’t arrive until Notes/Domino 8.5.3. Which is why it is not working for you.