在 Xpage 上使用 SessionAsSigner 是否有任何先决条件? [英] Are there any preconditions for using SessionAsSigner on Xpage?

查看:28
本文介绍了在 Xpage 上使用 SessionAsSigner 是否有任何先决条件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Xpage 上使用 SessionAsSigner 有什么先决条件吗?我的情况很简单.在 beforePageLoad 事件上,我在需要 sessionAsSigner 的地方调用我的 java 代码.我正在尝试使用ExtLibUtil.getCurrentSessionAsSigner() 但它返回 null .我尝试使用具有相同结果的其他技术来解析 sessionAsSigner 变量.它始终为空.我可能在这里错过了一些东西......

Are there any preconditions for using SessionAsSigner on Xpage? My case is quite simple. On beforePageLoad event I call my java code where I require sessionAsSigner. I'm trying to use ExtLibUtil.getCurrentSessionAsSigner() but it returns null . I tried to resolve the sessionAsSigner variable with other techniques with same same result. Its always null. I have missed something here probably ...

推荐答案

正如上面评论中的Per Henrik Lausten"指出的那样,SessionAsSigner 仅在所有设计元素都由相同的 ID 签名时才返回正确的对象.然而,我无法想象如何在现实生活中使用此功能,因为我无法确保所有设计元素在未来几年内都由相同的 ID 签名......

As 'Per Henrik Lausten' pointed in above comment, the SessionAsSigner returns proper object only and only when all design elements are signed by the same ID. I can't however imagine how this feature can be used in real life because I cant assure that all design elements are signed by the same id for next several years ...

像下面提到的那样的任何数据库操作只会破坏我的应用程序(或至少 sessionAsSigner 依赖的功能):

Any database action like those mentioned below will simply break my app (or at least the sessionAsSigner relied feature):

a) 管理员在启用自动构建的设计器中打开应用程序(DDE 中的默认设置,我无法确定所有管理员都手动禁用了此功能)这会导致应用程序重新编译并在某些 xpages 上进行潜在的签名更新

a) administrator opens the app in designer with automatic build enabled(default in DDE, I cant really be sure that all admins disabled this feature manualy) which causes recompilation of app and potential signature update on some xpages

...或...

b) 我的同事会简单地更新任何应用程序部分,而不知道所有签名必须相同才能不破坏任何东西.

b) my collegue will simply update any application part with no knowledge that all signatures must be the same to not break anything.

任何此类操作都会导致我的应用程序停止工作:-(这很愚蠢.

Any such action will cause my application stop working :-( which is rather stupid.

...或者我在这里错过了什么??

... or do I miss something here??

这篇关于在 Xpage 上使用 SessionAsSigner 是否有任何先决条件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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