Reputation: 40
I was pointed to this site for my issue below.
I have borrowed the checkbox code from OpenNTF.org. The project is - http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&documentId=CDD107F4006F7D5C8625775F001B8C61
I have integrated it into a xPage and it works fine when run in the notes client on local, in the web browser and on handheld devices. But when run on a replica on a domino server, the value for the number of columns comes into the is null. The domino server is 8.5.3 FP1.
Not sure why is only errors when on the domino server via the notes client when it works just fine in the client locally.
Thanks, Walt
Here is the error
Unexpected runtime error The runtime has encountered an unexpected error. Error source Page Name:/Company.xsp Control Id: rowRepeat
Exception Error while executing JavaScript computed expression Script interpreter error, line=1, col=37: 'compositeData.FieldValues' is null
JavaScript code
Math.ceil(compositeData.FieldValues.length / compositeData.numberOfColumns);
Stack Trace
com.ibm.xsp.exception.EvaluationExceptionEx: Error while executing JavaScript computed expression
com.ibm.xsp.binding.javascript.JavaScriptValueBinding.getValue(Unknown Source)
com.ibm.xsp.component.UIDataIterator.getValue(Unknown Source)
com.ibm.xsp.component.UIDataIterator.createDataModel(Unknown Source)
com.ibm.xsp.component.UIDataIterator.getDataModel(Unknown Source)
com.ibm.xsp.component.UIDataIterator.setRowIndex(Unknown Source)
com.ibm.xsp.renderkit.html_extended.IteratorRenderer.encodeRows(Unknown Source)
com.ibm.xsp.renderkit.html_extended.IteratorRenderer.encodeChildren (Unknown Source)
com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeChildren(Unknown Source)
javax.faces.component.UIComponentBase.encodeChildren(Unknown Source)
com.ibm.xsp.component.UIDataIterator.encodeChildren(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderChildren(Unknown Source)
com.ibm.xsp.renderkit.html_extended.HtmlBasicRenderer.encodeChildren (Unknown Source)
com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeChildren(Unknown Source)
javax.faces.component.UIComponentBase.encodeChildren(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderChildren(Unknown Source)
com.ibm.xsp.renderkit.html_extended.HtmlBasicRenderer.encodeChildren (Unknown Source)
com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeChildren(Unknown Source)
javax.faces.component.UIComponentBase.encodeChildren(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderChildren(Unknown Source)
com.ibm.xsp.renderkit.html_extended.HtmlBasicRenderer.encodeChildren (Unknown Source)
com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeChildren(Unknown Source)
javax.faces.component.UIComponentBase.encodeChildren(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderChildren(Unknown Source)
com.ibm.xsp.renderkit.html_extended.HtmlBasicRenderer.encodeChildren (Unknown Source)
com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeChildren(Unknown Source)
javax.faces.component.UIComponentBase.encodeChildren(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.component.UIViewRootEx._renderView(Unknown Source)
com.ibm.xsp.component.UIViewRootEx.renderView(Unknown Source)
com.ibm.xsp.application.ViewHandlerExImpl.doRender(Unknown Source)
com.ibm.xsp.application.ViewHandlerExImpl._renderView(Unknown Source)
com.ibm.xsp.application.ViewHandlerExImpl.renderView(Unknown Source)
com.sun.faces.lifecycle.RenderResponsePhase.execute(Unknown Source)
com.sun.faces.lifecycle.LifecycleImpl.phase(Unknown Source)
com.sun.faces.lifecycle.LifecycleImpl.render(Unknown Source)
com.ibm.xsp.controller.FacesControllerImpl.render(Unknown Source)
com.ibm.xsp.webapp.FacesServlet.serviceView(Unknown Source)
com.ibm.xsp.webapp.FacesServletEx.serviceView(Unknown Source)
com.ibm.xsp.webapp.FacesServlet.service(Unknown Source)
com.ibm.xsp.webapp.FacesServletEx.service(Unknown Source)
com.ibm.xsp.webapp.DesignerFacesServlet.service(Unknown Source)
com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet (Unknown Source)
com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(Unknown Source)
com.ibm.designer.runtime.domino.adapter.ComponentModule $AdapterInvoker.invokeServlet(Unknown Source)
com.ibm.designer.runtime.domino.adapter.ComponentModule $ServletInvoker.doService(Unknown Source)
com.ibm.designer.runtime.domino.adapter.ComponentModule.doService (Unknown Source)
com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(Unknown Source)
com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(Unknown Source)
com.ibm.domino.xsp.module.nsf.NSFService.access$0(Unknown Source)
com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
java.util.concurrent.FutureTask.run(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceThread.run(Unknown Source)
.
com.ibm.jscript.InterpretException: Script interpreter error, line=1, col=37: compositeData.FieldValues' is null
com.ibm.jscript.ASTTree.ASTMember.interpret(Unknown Source)
com.ibm.jscript.ASTTree.binaryop.ASTBinaryDefaultOp.interpret(Unknown Source)
com.ibm.jscript.ASTTree.ASTArgumentList.interpretArguments(Unknown Source)
com.ibm.jscript.types.FBSObject.call(Unknown Source)
com.ibm.jscript.ASTTree.ASTCall.interpret(Unknown Source)
com.ibm.jscript.ASTTree.ASTProgram.interpret(Unknown Source)
com.ibm.jscript.ASTTree.ASTProgram.interpretEx(Unknown Source)
com.ibm.jscript.JSExpression._interpretExpression(Unknown Source)
com.ibm.jscript.JSExpression.access$1(Unknown Source)
com.ibm.jscript.JSExpression$2.run(Unknown Source)
java.security.AccessController.doPrivileged(Unknown Source)
com.ibm.jscript.JSExpression.interpretExpression(Unknown Source)
com.ibm.jscript.JSExpression.evaluateValue(Unknown Source)
com.ibm.jscript.JSExpression.evaluateValue(Unknown Source)
com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(Unknown Source)
com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(Unknown Source)
com.ibm.xsp.binding.javascript.JavaScriptValueBinding.getValue(Unknown Source)
com.ibm.xsp.component.UIDataIterator.getValue(Unknown Source)
com.ibm.xsp.component.UIDataIterator.createDataModel(Unknown Source)
com.ibm.xsp.component.UIDataIterator.getDataModel(Unknown Source)
com.ibm.xsp.component.UIDataIterator.setRowIndex(Unknown Source)
com.ibm.xsp.renderkit.html_extended.IteratorRenderer.encodeRows(Unknown Source)
com.ibm.xsp.renderkit.html_extended.IteratorRenderer.encodeChildren (Unknown Source)
com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeChildren(Unknown Source)
javax.faces.component.UIComponentBase.encodeChildren(Unknown Source)
com.ibm.xsp.component.UIDataIterator.encodeChildren(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderChildren(Unknown Source)
com.ibm.xsp.renderkit.html_extended.HtmlBasicRenderer.encodeChildren (Unknown Source)
com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeChildren(Unknown Source)
javax.faces.component.UIComponentBase.encodeChildren(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderChildren(Unknown Source)
com.ibm.xsp.renderkit.html_extended.HtmlBasicRenderer.encodeChildren (Unknown Source)
com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeChildren(Unknown Source)
javax.faces.component.UIComponentBase.encodeChildren(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderChildren(Unknown Source)
com.ibm.xsp.renderkit.html_extended.HtmlBasicRenderer.encodeChildren (Unknown Source)
com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeChildren(Unknown Source)
javax.faces.component.UIComponentBase.encodeChildren(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderChildren(Unknown Source)
com.ibm.xsp.renderkit.html_extended.HtmlBasicRenderer.encodeChildren (Unknown Source)
com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeChildren(Unknown Source)
javax.faces.component.UIComponentBase.encodeChildren(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.util.FacesUtil.renderComponent(Unknown Source)
com.ibm.xsp.component.UIViewRootEx._renderView(Unknown Source)
com.ibm.xsp.component.UIViewRootEx.renderView(Unknown Source)
com.ibm.xsp.application.ViewHandlerExImpl.doRender(Unknown Source)
com.ibm.xsp.application.ViewHandlerExImpl._renderView(Unknown Source)
com.ibm.xsp.application.ViewHandlerExImpl.renderView(Unknown Source)
com.sun.faces.lifecycle.RenderResponsePhase.execute(Unknown Source)
com.sun.faces.lifecycle.LifecycleImpl.phase(Unknown Source)
com.sun.faces.lifecycle.LifecycleImpl.render(Unknown Source)
com.ibm.xsp.controller.FacesControllerImpl.render(Unknown Source)
com.ibm.xsp.webapp.FacesServlet.serviceView(Unknown Source)
com.ibm.xsp.webapp.FacesServletEx.serviceView(Unknown Source)
com.ibm.xsp.webapp.FacesServlet.service(Unknown Source)
com.ibm.xsp.webapp.FacesServletEx.service(Unknown Source)
com.ibm.xsp.webapp.DesignerFacesServlet.service(Unknown Source)
com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet (Unknown Source)
com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(Unknown Source)
com.ibm.designer.runtime.domino.adapter.ComponentModule $AdapterInvoker.invokeServlet(Unknown Source)
com.ibm.designer.runtime.domino.adapter.ComponentModule
$ServletInvoker.doService(Unknown Source)
com.ibm.designer.runtime.domino.adapter.ComponentModule.doService (Unknown Source)
com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(Unknown Source)
com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(Unknown Source)
com.ibm.domino.xsp.module.nsf.NSFService.access$0(Unknown Source)
com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
java.util.concurrent.FutureTask.run(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceThread.run(Unknown Source)
Upvotes: 0
Views: 319
Reputation: 8086
The script interpreter error is "'compositeData.FieldValues' is null". As is true in the context of any Custom Control, compositeData
is the variable that refers to the map of properties passed into the Custom Control. Hence, if compositeData.FieldValues
is null
, then whatever expression is assigned to the FieldValues
property of the Custom Control, that expression is evaluating to null
.
In your case, the expression compositeData.FieldValues.length
throws an error, because null
does not have a length (...or any other properties or methods, for that matter).
You've indicated that this works fine in the following scenarios:
What all three scenarios have in common is that the code is running on local. When you access an XPage via the browser (including mobile), you're accessing some server, but the code that executes is local to itself... it doesn't have to make an NRPC call to another Domino server to run the code.
So the one scenario where it's failing is the one scenario where that's not true: accessing a server replica from the Notes client. I'm guessing that the expression you're passing to FieldValues
is using @DbLookup()
or a similar operation but not properly accounting for what server the code is running on, causing it to pass null
to the Custom Control.
Upvotes: 1