本文介绍了如何在从XPage调用的Java Bean中使用SessionAsSigner?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据Phillip Riand(请参阅:关于openNTF的讨论 ),这是不可能的.他们需要知道设计元素,才能找到签名的人.因此,它仅在SSJS中可用.

According to Phillip Riand (see: discussion on openNTF) this is not possible... They need to know the design element to find out who signed it. Therefore, it is only available in SSJS.

推荐答案

我知道有两种方法可以在Java bean中使用 sessionAsSigner 对象:

There are 2 ways that I know of to use the sessionAsSigner object in Java beans:

1通过解决sessionAsSigner对象:

1 By resolving the sessionAsSigner object:

FacesContext context = FacesContext.getCurrentInstance();
Session sessionAsSigner = context.getApplication().getVariableResolver().
        resolveVariable(context, "sessionAsSigner");

2通过使用扩展库中 com.ibm.xsp.extlib.util.ExtLibUtil 类中的 getCurrentSessionAsSigner()函数.

2 By using the getCurrentSessionAsSigner() function from the com.ibm.xsp.extlib.util.ExtLibUtil class in the Extension Library.

要能够使用它(在Java中像SSJS一样),您需要确保所有设计元素均由相同的用户ID签名.如果不是这种情况,sessionAsSigner对象将不可用(未定义").

To be able to use it (in Java as wel as SSJS) you'll want to make sure that all design elements were signed by the same user ID. If that's not the case, the sessionAsSigner object will not be available ('undefined').

这篇关于如何在从XPage调用的Java Bean中使用SessionAsSigner?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-26 22:51