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.
相关问题
- Unresponsive buttons after certain time
- Xpages “filter by category name” with two fields v
- Logout control not working
- Java Bean Specifications for boolean field
- How to stream file from xPages?
相关文章
- call partialRefreshGet from SSJS using view.PostSc
- Bootstrap4XPages plugin: how to catch a change eve
- How to add html stored in a richtext item to an HT
- Apache camel getbody as custom class
- Remove Dojo from XPages globally
- Complex Xpage takes long for partial refreshs
- Getting Application Layout to work with Bootstrap4
- How To Pass a JRBeanCollectionDataSource to iRepor
This is quite an old post that I just stumbled upon. Tried some of the solutions mentioned above:
resolveVariable
did not work for me, at least not forsessionAsSigner
as this throws a runtime error (I can resolve plain oldsession
, though...)to be honest I didn't quite understand the Controller.verify(sessionAsSigner) method; is Controller something specific to XAgents? If so, I don't have an XAgent here, so can't use it
didn't feel like importing extra ExtLib classes here...
So I came up with another solution that appears to be very simple:
created a method in my javaBean that takes a session object as argument; since sessionAsSigner belongs to the same class as session I don't have to import something new.
Javacode is:
This is called from SSJS as either
or
Maybe helps others, too
There are 2 ways that I know of to use the sessionAsSigner object in Java beans:
1 By resolving the sessionAsSigner object:
2 By using the getCurrentSessionAsSigner() function from the com.ibm.xsp.extlib.util.ExtLibUtil class in the Extension Library.
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').
I found that the solution is right at hand :-)
I changed my XPage (in this example an XAgent) to:
and in the bean I simply used the session in the argument when I needed to open a database/document as signer. Sometimes the solution is so simple :-)
/John