xpages

SSJS to call a method in java class (in java library)

僤鯓⒐⒋嵵緔 提交于 2019-12-19 10:48:15
问题 I've created a java library (named: invoke) with a java class (Invoke). Its seen when expanding Script libraries under code in the designer navigation pane. The code is: package com.kkm.vijay; public class Invoke { public static void main(String[] args) { Runtime r = Runtime.getRuntime(); Process p = r.exec("C://some.exe"); } } Used the following ssjs to an onclick event of a button shows Error:500 when previewed in browser. importPackage(com.kkmsoft.vijay); var v=new Invoke(); v.main(); Even

I want my Domino Servlet to get an authenticated user session

血红的双手。 提交于 2019-12-19 10:25:37
问题 It seems a like a pretty fundamental question, in a running Servlet hosted on Domino I want to access Domino resources that I have wisely protected using the the very fine security of IBM Notes and Domino. I want the Servlet to be able to read and write data to Domino whilst keeping that data from the client that called the Servlet (or xAgent) and preventing the client from writing directly. I'd be happy to be able to get a session that represented the signer of the application. I can get a

How to use XPages Java code to set valid method of input control inside a custom control?

▼魔方 西西 提交于 2019-12-19 08:54:01
问题 Ok, this is a weird one. In XPages my dataSource is a Java Object. A Managed bean or PageController. I'm using bootstrap via the Ext. Library. What I'd like to do is keep all my validation code inside my Java Object rather then attaching anything to the control on the XPage. Inside the java object I can add any error messages via: FacesContext.getCurrentInstance().addMessage So any errors can by showed via an control. BUT what I don't know how to do is to target an individual control if I

How to disable Client-side Validation for an XPage?

前提是你 提交于 2019-12-18 17:55:09
问题 I know i can disable for the server or application in the xsp.properties via: xsp.client.validation=false And at the control level via: disableClientSideValidation="true" Short of setting disableClientSideValidation for each control, is there any way to disable at the XPage level? 回答1: Please try the following: <?xml version="1.0" encoding="UTF-8"?> <xp:view xmlns:xp="http://www.ibm.com/xsp/core"> <xp:this.properties> <xp:parameter name="xsp.client.validation" value="false" /> </xp:this

What is the best way to recycle Domino objects in Java Beans

雨燕双飞 提交于 2019-12-18 16:28:00
问题 I use a function to get access to a configuration document: private Document lookupDoc(String key1) { try { Session sess = ExtLibUtil.getCurrentSession(); Database wDb = sess.getDatabase(sess.getServerName(), this.dbname1); View wView = wDb.getView(this.viewname1); Document wDoc = wView.getDocumentByKey(key1, true); this.debug("Got a doc for key: [" + key1 + "]"); return wDoc; } catch (NotesException ne) { if (this.DispLookupErrors) ne.printStackTrace(); this.lastErrorMsg = ne.text; this

basic REST service for my xpage application

无人久伴 提交于 2019-12-18 13:34:11
问题 I want to set up some basic REST services for my XPage application. So I added the xe:restService control on an xpage and choose the xe:customRestService where I refer to a Java class: <xe:restService id="restService1" pathInfo="json" state="false"> <xe:this.service> <xe:customRestService contentType="application/json" serviceBean="se.banking.desk.CustomSearchHelper"> </xe:customRestService> </xe:this.service> </xe:restService> The CustomSearchHelper class it self is still pretty empty but I

XPage Java Object Recycle in SSJS

两盒软妹~` 提交于 2019-12-18 13:23:07
问题 I have read this suggestion about recycle of Domino objects: What is the best way to recycle Domino objects in Java Beans What is best practice if I have a datasource named document and in a function that is called several times this code exists: var doc=document.getDocument(true) and doing stuff to the backend document. Before I exit the function should I recycle doc or is my backend document to the datasource recycled then ? 回答1: This is an excellent question, because this is one of the

How to clean SSJS in Domino server after someone used javascript prototype in a nsf?

感情迁移 提交于 2019-12-18 13:07:46
问题 How to clean SSJS (Server Side Javascript) in Domino server after someone used javascript prototype in a nsf? Mark Roden discovered a huge weakness in XPages SSJS: (thanks to David Leedy for tell me about this and show me the article). If you have the following SSJS code: var dummyObj = {} dummyObj.prototype.NAME = "Johann" XPages SSJS doesn't care that you uses var (var means the variable must be local) and it makes dummyObj.NAME visible in the whole server with the value Johann . So if

xpages hiding/showing fields based on a combobox value

我只是一个虾纸丫 提交于 2019-12-18 09:21:07
问题 I'm using a <xe:djTabContainer> with 10 <xe:djTabPane> containing numerous fields components. There is a principal combobox whose value will determine which fields to be showed or not and in this way the document structure will be achieved. If I will use this approach, then for all my >50 fields which I want to show/hide, I will use only the onChange event of the combobox? Considering the fact that there are >50 fields which enter in this category < showing&hiding them >, should I use another

How do I close my window in Xpage?

偶尔善良 提交于 2019-12-18 09:07:19
问题 Actually I am using the following code for closing my current window: window.close() The thing is, it is working fine in IE, but it is not working in FF and Chrome. Is their any great solution for doing this? 回答1: window.close() works in 8.5.3 but only if parent contains an object and it will not do this if you have i.e an xpage that is opened inside an ordinary Notes application or a ordinary view. you need a window.open to get this. I have investigated alot about this a while ago but no