Single Store Xpages 如何工作? [英] How Does the Single Store Xpages work?

查看:31
本文介绍了Single Store Xpages 如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在许多不同的数据库中使用了许多 XPages 设计元素.如果我正确阅读了维基,单一商店是一种全有或全无的情况.因此,我想在数据库中创建独特的设计,但使用来自单个商店位置的一组可重用 XPage 元素.维基说:除了每个实例应用程序中与默认 XPage 具有相同名称的虚拟或空白 XPage"之外,实例"是否包含 XPage 设计元素是否重要?

I have a number of XPAges design elements that I use in many different databases. If I read the wiki correctly the single store is an all or nothing situation. So I want to create unique design in a database but use the set of reusable XPages element from a single store location. the wiki says: Apart from the "dummy or blank XPage with the same name of the default XPage" in each instance application, does it matter if an 'instance' contains XPage design elements?

没有.如果在应用程序上设置了 SCXD,则数据库上的所有 XPage 设计元素都将被忽略,并且应用程序使用 SCXD 数据库上的设计元素.

No. If SCXD is set on an application all XPages design elements are ignored on the database and the application uses the design elements on the SCXD database.

如果是这种情况,那么我必须创建可能有 75% 的代码可重用的数据库,但我必须在数十个单独的数据库中重复(并维护)它.可惜了!

If this is the case then I have to create databases where probably 75% of the code is reusable but I would have to repeat it (and maintain it) in dozens of separate databases. pity!

推荐答案

XPages 和相关元素(自定义控件、SSJS 库、Java 代码)可以像其他设计元素一样从特定模板继承.因此,我会设置一个名为Core Components"(.ntf 或 .nsf)的数据库,模板名称为 CoreComponents".然后在目标数据库中的各个元素上,您可以将继承设置为专门来自 "CoreComponents" 模板.那么每个数据库唯一的元素不会从任何模板继承.然后,您可以使用 File-Application-Refresh 设计来更新具有特定继承的元素,并且该数据库中唯一的元素不会被覆盖.

XPages and related elements (Custom Controls, SSJS Libraries, Java Code) can be inherited from a specific template like other design elements. So, I would setup a database called, perhaps, "Core Components" (.ntf or .nsf) with a template name of "CoreComponents". Then on the individual elements in the target DB you would set inheritance to be specifically from the "CoreComponents" template. Then the elements that are unique to each database do not inherit from any template. You can then use File-Application-Refresh design to update the elements with specific inheritance and the one which are unique in that database will not get overwritten.

您确实需要在刷新后进行干净的构建,因此我建议您将核心组件数据库保存在本地或与其他服务器不同的服务器上,以便日常设计任务不会更新它们,从而导致 xsp 元素损坏.

You do need to do a clean build after the refresh, so I recommend that you keep the Core Components database locally or on a different server than the others so that the daily design task will not update them resulting in corrupted xsp elements.

这篇关于Single Store Xpages 如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆