我从一些SSJS代码创建一个新数据库,然后将选定的设计元素复制到其中,设置ACL和其他一些东西。我想设置Notes和Web客户端的启动以打开特定的XPage,而不是让用户在Designer中打开它并手动设置它(它们可能没有设计者权限)。我可以在应用程序属性/数据库属性中找到它们,但我没有在SSJS中看到能够设置它们的方法。我查看了Notes数据库的方法和函数,但没有看到它会看起来会这样做。
答案 0 :(得分:7)
据我所知,这不是你“应该”做的事情 - API中没有真正的切入点。
但是,我希望通过修改存储此类信息的数据库的图标注释来实现此目的。您可以通过ID“FFFF0010”获取文档来获取任何数据库中的图标注释(它在数据库中是一致的)。在那里,您可以调查调整标志和字段以实现此目的。
从我刚才的问题来看,似乎网络的“启动指定XPage”增加了“!”到图标注释的$ Flags字段,而XPinC变体是(恰当地)“?”。然后将XPage名称分别存储在“$ DefaultXPage”和“$ DefaultClientXPage”中。所以你可以尝试(我没有这样做,所以我不知道它是否真的有效):
var iconNote = someDB.getDocumentByID("FFFF0010");
iconNote.replaceItemValue("$Flags", iconNote.getItemValueString("$Flags") + "?!");
iconNote.replaceItemValue("$DefaultXPage", "SomePage.xsp");
iconNote.replaceItemValue("$DefaultClientXPage", "SomeOtherPage.xsp");
iconNote.save();
你可能需要一个“iconNote.sign()”;老实说,我不确定是否需要或做任何事情,但这是我在不久前编辑设计笔记时习惯使用的习惯。
答案 1 :(得分:4)
我在论坛中发现了这一点:所有标志都解释了:
Flag = Meaning / Action
4 = Allow Soft Deletes
Z = Enable LZ1 Compression
f = Do Not Allow Stored Forms
z = Do Not Maintain Unread Marks
h = Mark Parent Document on Reply or Forward
J = Use JavaScript when generating Web Pages
F = Launch Designated Frameset
n = Never Show Policy (ie. Never show About Database when first opened)
7 = Large UNK Table (ie. allow more fields in database)
6 = Allow Design Locking
K = Restore as lasted viewed by user
c = Show About Database if Modified
Q = Replicate Unread Marks to Clustered Servers Only
U = Replicate Unread Marks to All Servers (appears with Q set)
2 = Optimise Document Table Bitmap
3 = Maintain LastAccessed Property
1 = Don't Support Specialised Response Hierarchy
M = Multilingual Database
X = Web Access Requires SSL Connection
8 = Web Access Don't Allow URL Open
i = Display Images After Loading
5 = Allow Document Locking
g = Database Type = Library
j = Database Type = Personal Journal
b = Database Type = Domino Directory
B = Database Type = Directory Catalog
m = Database Type = Multi DB Search
u = Database Type = Portfolio
A = Database Type = Mailbox
r = Database Type = Mailfile
p = Always Show About Database Document (ie. When Opened in the Client Property)
l = Launch Designated Navigator
s = Launch Designated Navigator in Own Window (used in conjuction with l above)
a = Launch First Attachment in About Database Document
d = Launch First DocLink in About Database Document
P = Web Launch = Show About Database Document
S = Web Launch = Open Designated Frameset
E = Web Launch = Open Designated Page
L = Web Launch = Open Designated Navigator in its Own Window
D = Web Launch = Open First DocLink in About Database Document
T = Web Launch = Open Designated DocLink
V = Web Launch = Open First Document in Designated View
虽然
缺少XPage的“新”启动选项编辑(Sven Hasselbach):
e = Refresh on Admin Server
G = Copy profile documents
H = Support response thread history
I = Inherit OS theme
k = Launch composite application
N = Compress data docs
o = Launch outline
O = OOS Enabled
q = Compress design
t = -> marked as obsolete
v = No show view
W = Launch Webpage
9 = Is a web application
Y = DAOS enabled
w = Preview Pane Big Folder
x = Preview Pane Small View
y = Preview Pane Maximized
0 = Disable Automatic view update
其他字段
$TITLE: Array: 1. Title of the Database, an entry for every Category, "#1Name of the inheriting Template", "#2Master template name".
$DefaultLanguage: Default DB language
$DefaultCollation: Default sort order
$AllowPost8HTML: "1" = Enabled enhanced HTML generation
$CollationType: "@UCA" = Unicode sorting
$LaunchXPageRunOnServer: "1" = yes / "0" = no
$AllowRESTDbAPI: "0" = disabled / "1" = views / "2" = Views and documents
$DefaultClientXPage: Name of the XPage to open in the client
$DisableExport: "1" = disables export of view data
$Daos: "0" = disabled / "1" = enabled
$UpdatedByLimit: Limit of updated by entries
$RevisionsLimit: Limit of revision entries
$DefaultXPage: Name of the XPage when opened in browser