xpages

Xpages, Inherited documents in view panel by using @Unique

老子叫甜甜 提交于 2019-12-24 10:39:15
问题 I have two forms project(Document) and comment(Response to Response) I want to create a view that displays all comments of selected Project Any help would be appreciated. 回答1: I love doing this type of stuff in xPages. For a moment, don't think about project and response. Think uniqueID. In order to make the project document reference the comment you add a unique ID to each of them that will reference each other. Don't use response docs in xPages, there is no need I see. When you save the

Binding an edit box within a custom control to a form field programatically

微笑、不失礼 提交于 2019-12-24 10:07:14
问题 I have a notes form with a series of fields such as city_1, city_2, city_3 etc. I have an XPage and on that XPage I have a repeat. The repeat is based on an array with ten values 1 - 10 var repArray = new Array() ; for (var i=1;i<=10;i++) { repArray.push(i) ; } return(repArray) ; Within the repeat I have a custom control which is used to surface the fields city_1 through city_10 The repeat has a custom property docdatasource which is passed in It also has a string custom property called

Unespected runtime Error when try to send document

三世轮回 提交于 2019-12-24 09:17:08
问题 I have new Lotus Domino Server 8.5.3 FP1 UP1 (Windows 2008 64bit). I have created an xpages sample copied from help that send mail. var doc:NotesDocument = database.createDocument(); doc.replaceItemValue("form", "Memo"); doc.replaceItemValue("sendTo", "daniel.recio@slug.es"); doc.replaceItemValue("subject", "hi there!"); doc.replaceItemValue("body", "content here"); doc.send(); But i have Unespected runtime Error Error while executing JavaScript action expression Script interpreter error,

How to set the pageTitle property for all pages that use a custom control?

落花浮王杯 提交于 2019-12-24 09:09:21
问题 Would like to automatically compute the pageTitle property on the XPage to simply show the XPage name. I want to code this once on the Application Layout custom control so every page where I add the control gets the benefit of the property calculation. So far, I have some SSJS on my CC to calculate the page title and assign to a viewScope variable: var path:String = context.getUrl().getPath(); var xpageName:String = @RightBack(path,"/"); viewScope.xpageName = xpageName; return xpageName On

Creating a ToolTip Managed bean

蹲街弑〆低调 提交于 2019-12-24 08:29:12
问题 This is a followup to my previous post at ToolTip Performance in XPages I have got the code to do it written (not tested) so I can't seem to get my Managed Bean to get called properly. My config contians the following: <managed-bean id="ToolTip"> <managed-bean-name>WFSToolTip</managed-bean-name> <managed-bean-class>ca.workflo.wfsToolTip.ToolTipText</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> and I have stripped my code down to the bare minimum:

Waiting icon / message in xpages

可紊 提交于 2019-12-24 08:23:16
问题 I want to use some waiting dialog / icon / image when code is running. Once code is finished want to stop that icon. I have gone through material available on web but failed to get or understand. I am using SSJS script which calls agent at back end. It tooks 20-30 seconds in processing. I have gone through but don't know the utilization? https://openntf.org/XSnippets.nsf/snippet.xsp?id=bootstrap-standby-dialog http://xpagesera.blogspot.com/2012/05/add-ajax-loading-control-in-xpages-for.html

How to handle localized numeric values in Xpage?

自闭症网瘾萝莉.ら 提交于 2019-12-24 07:58:18
问题 I have a Xpage with three fields, all Number declared; Nominal, Price and PaymentAmount. I want to calculate the PaymentAmount using Nominal * Price. In SSJS onChange I use the following code: var price = getComponent("Price").getValue(); to get the value from the field "Price". In Sweden we enter our numeric values as this #.###,## 1.234,56 If I enter the values Nominal=10 and Price=2,5 in my Xpage and try to calculate using the above mentioned formula the value stored in var "price" is

Error 500 in each xpage

删除回忆录丶 提交于 2019-12-24 07:58:01
问题 I am facing a strange error in xpages. Whenever i preview any xpage in internet explorer I get error 500. I've tried this with new nsf, I created only one blank xpage with no elements and tried to preview, I got the same error. I've also checked the "Display Xpages runtime error page" in xpages tab in Application Properties section but got the same 500 error. (I am working on my local machine) Url of my xpage: http://localhost/test/testdb.nsf/testxpage.xsp For every preview attempt log.nsf

richtext control doesn't store the input content

不羁的心 提交于 2019-12-24 07:39:02
问题 my XPage has a RT-control in which the user can fill with text snippets, plus complete the content with more text. The eventHandler of the "filling button": <xp:eventHandler event="onclick" submit="true" refreshMode="partial" refreshId="Body1"> <xp:this.action><![CDATA[#{javascript: var mykey = getComponent("Aufgabe1").getValue(); var bodytxt:string = @DbLookup(@DbName(), "lookupOrdertypes",mykey,4,"[FAILSILENT]"); if (checkContent(bodytxt)) getComponent("Body1").setValue(bodytxt); }]]></xp

xpages: refresh the view when different user login

南笙酒味 提交于 2019-12-24 07:14:59
问题 In a xpage, it requires user to login. After the user login, there is a view shows the information that belongs to the logged in user. Please find the xpage code below for your review: (please note, the view in Lotus Client contains various columns e.g. UserName, UserID, etc., but in xpage, due to the user needs to login, so I do not display the user name in the xpage) <?xml version="1.0" encoding="UTF-8"?> <xp:view xmlns:xp="http://www.ibm.com/xsp/core"> <xp:viewPanel rows="30" id=