1
votes

How can I use a custom control datasource (named doc) in XPage Application layout? I need to control read mode and edit mode through the basic node of the place bar. When I put the code doc.isEditable() in the rendered property, the following error is display in the browser:

Error while executing JavaScript computed expression
Script interpreter error, line=1, col=6: [ReferenceError] 'doc' not found

JavaScript code

doc.isEditable();

I am new to Xpage.

1

1 Answers

0
votes

Can you post some code? not entirely sure what you mean.

Generally the best place to define a data source is at the top of the XPage so that every control beneath it has access to it. If your defining a data source after your trying to query it you would get an error like this