xpages

How to read a server file and output that as a downloadable file in users web browser in XPages

◇◆丶佛笑我妖孽 提交于 2019-12-11 04:29:45
问题 I need to read a file (that is not available on web) on the server and output it to the user as a downloadable file. The scenario is The user click a link from an XPage The request is sent to the server which reads a predefined file in the server file system The file is brought back to the user as a downloadable file in the webbrowser. The file on the server can be in any format, e.g .pdf, .exe, .doc etc It does not matter if this is done on SSJS or in java. I would really appreicate some

Retrieve Xpages Scoped Variable based on String

时间秒杀一切 提交于 2019-12-11 04:27:18
问题 I am modifiyng exisiting code which currently does currentDocument.setValue("field", requestScope.variable); This works well, but I now need to make it a little more dynamic so, I have the requestScope.variable stored as a string. I know I can do: requestScope["variable"] but this relies on me knowing which scope it is in. Given that the string could be requestScope.variable or even applicationScope.variable I think this route is closed to me. I had also thought of splitting the string based

XPages ratio between 2 column totals in view

送分小仙女□ 提交于 2019-12-11 04:17:31
问题 I have a view with 2 columns. Both number types. I want to add a button to the page, which will calculate the ration between total of column 1 and total of column 2. For example: Column 1 | Column 2 5 | 5 10 | 10 4 | 3 3 | 4 It should be (5+10+4+3)/(5+10+3+4) = 1.. Thank you, Florin 回答1: I would probably go into the view properties and turn on the totals for both those columns. Then in SSJS I'd get a NotesNavigator for that view and then create a NotesViewEntry object. Then I'd set that

Error 500: Command not handled exception on ALL XPages

白昼怎懂夜的黑 提交于 2019-12-11 04:09:31
问题 We have an issue where no XPages work on our server any longer. I am not aware of any server changes; however, I am sure something had to have been done. I have no clue where to look. We cannot get any XPages to work through any browser - tested with IE, Firefox, and Chrome. We just get " Error 500: Command Not Handled Exception ". I just created a blank db and added an XPage with " Hello World " and built the project. This error appears when I try to access that xpage through the browser. 04

Image URL when previewed in Notes and in Web Browser

主宰稳场 提交于 2019-12-11 04:07:25
问题 Lets say we have a XPage with following code snippet which displays an image using javascript formula: <xp:image id="image1"><xp:this.url><![CDATA[#{javascript:"actn005.gif"}]]></xp:this.url></xp:image> actn005.gif is present in the current database as image resource. When I click on the "Preview in Notes" and get the source it displays something like this for Image: <img id="view:_id1:image1" src="/xsp/Naveen/Experiments.nsf/xsp/actn005.gif" alt="" class="xspImage"> When I click on the

faces-config.xml in JAR file behaves differently on two Dominos

£可爱£侵袭症+ 提交于 2019-12-11 03:59:07
问题 I have distribution package for beans. To save some work to developers it contains faces-config.xml declaring beans used by the JAR - inside META-INF directory of JAR. JAR is inside WebContent\WEB-INF\lib and referenced in build path of NSF. Development server works with this setup and does not require any change to faces-config.xml inside NSF. But database made as copy or refreshed via template from development server does not work - web page fails with error: Error while executing

Check if scheduled local agents can run in Notes client

风格不统一 提交于 2019-12-11 03:49:27
问题 I there a way in XPiNC (Per can you add that tag) to check if "scheduled local agent" is enabled in a Notes client? Alternatively how to do that in a LotusScript agent. Checking if an agent is active is easy, but that's only one part of the equation 回答1: See the Trigger and IsEnabled properties of the NotesAgent class: TRIGGER_AFTER_MAIL_DELIVERY (2) means "After new mail has arrived" TRIGGER_BEFORE_MAIL_DELIVERY (6) means "Before new mail arrives" TRIGGER_DOC_PASTED (3) means "When documents

XPages - Client side code to set viewScope value?

瘦欲@ 提交于 2019-12-11 03:42:34
问题 I have one button and on click of that button i have client side code to set viewScope value: var val = 'TEST_VALUE'; "#{javascript: viewScope.testVal = " + val + "}" and on server side of that button I am trying to get viewScope value: print("ViewScope val " + viewScope.testVal); Instead of variable value, variable name is getting stored in ViewScope . 回答1: SSJS in a CSJS is computed on the server when the page is being rendered and the SSJS replaced with the result. So you're CSJS is not

How can you use SessionAsSigner in a Java Bean called from an XPage?

风格不统一 提交于 2019-12-11 03:33:10
问题 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. 回答1: There are 2 ways that I know of to use the sessionAsSigner object in Java beans: 1 By resolving the sessionAsSigner object: FacesContext context = FacesContext.getCurrentInstance(); Session sessionAsSigner = context.getApplication().getVariableResolver(). resolveVariable(context, "sessionAsSigner"); 2 By

How do I access SQL from XPages

ぐ巨炮叔叔 提交于 2019-12-11 03:28:30
问题 What is the process to access data from a SQL data source and have it fill in a list box control so that the user may select one of the values? I have been given the name of the database and server, the login ID and password. Code samples would really be appreciated as I have never done any SQL coding. 回答1: I've created a video showing JDBC access from XPages: http://www.youtube.com/watch?v=p6oRCsTsVqc 回答2: The latest Extension Library on OpenNTF ( extlib.openntf.org ) has a whole bunch of