xpages-ssjs

Making a viewEntryCollection an objectDataSource

佐手、 提交于 2019-12-25 01:21:50
问题 I have some SSJS that does a FTSearch on a view and I get a viewEntryCollection returned: var veCol:NotesViewEntryCollection = thisAppDB.getView("vwFTSearch").getAllEntries() veCol.FTSearch(queryString); viewScope.vsColCount = veCol.getCount(); I know that veCol contains the viewEntries that I want and they are in the correct order. Now I would like to define a dataSource that I will use as the dataSource for a repeat control. I think the answer involves creating an Object Data Source but I

ViewPanel filter by StartKeys…but pager don't Update

邮差的信 提交于 2019-12-24 18:21:50
问题 I use attribute StartKeys into ViewPanel control..but the pager are not refreshed for go to the correct Page by SartKey. Have you any suggest? My pager is inside ViewPanel <xp:viewPanel rows="30" id="viewPanel1" var="rowData" showUnreadMarks="true"> ......column value.... <xp:pager partialRefresh="true" layout="Previous Group Next" id="pager1" styleClass="vhead3" for="viewPanel1" alwaysCalculateLast="true" partialExecute="true"> </xp:pager> </xp:viewPanel> 回答1: There is not a bug here. If you

Xpages get component value in extlib dialog box

陌路散爱 提交于 2019-12-24 16:35:16
问题 I defined a document datasource(called document1) in a panel in my extlib dialog box. Within this panel, it contains dialog content and dialog butotn bar. Within the dialog content, in contains a custom control that has all the components likes dojo edit box, list box, radio butotn etc. Within the dialog button bar, it contains a Save button. On save, I could not get the value from any component by the following getComponent, document.getDocument.getxxx: print (getComponent.getValue("control"

Is there Java/SSJS equivalent of @AttachmentModifiedTimes?

谁说我不能喝 提交于 2019-12-24 14:46:18
问题 I want to show list of attachments and FileDownload control is not an option (need custom actions for every file). To get name and size of attachments there are properties of EmbeddedObject . AFAIK, to get modified time of attachment there is only one option: to use pure @Formula, either via session.evaluate or view containing column with @AttachmentModifiedTimes. Is there a way (Java/SSJS) to get attachment's modified (and created) time without native @Formulas? That means date stored with

XPages - Dojo Filtering Select - save both label and value

喜夏-厌秋 提交于 2019-12-24 14:28:34
问题 I'm using a Dojo Filtering Select control on an XPage and would like to save both the label and value when the XPage is saved. Is it possible for me to save both values to either the same or separate fields? 回答1: You'd like to set a document's field to the corresponding label of currently selected value. The code below works for defined xp:selectItem items and all kinds of computed xp:selectItems definitions based on a property, a view, a bean or other source. Server Side JavaScript Solution

erratic failure of sessionAsSignerWithFullAccess

三世轮回 提交于 2019-12-24 13:33:22
问题 The code below is a some test code that I have in an action button on an XPage. I need to get a handle on the current database with FullAccess in the code WFSUtils.sysOut just formats a printed message to the server console. Periodically the error message in the catch returns 2015-01-09 12:49:11 PM HTTP JVM: WFS ~~~ Error in Update Demo 'sessionAsSignerWithFullAccess' not found I am the signer of the XPage and the database is signed by the server ID. Sometimes it runs through just fine other

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

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

xpages error when trying to access edit mode in client notes

无人久伴 提交于 2019-12-24 03:16:26
问题 I'm trying to open some doc. from a viewPanel inside the client notes. The application also runs on web. When I open the doc. in read mode, and then click the Edit button: <xp:button value=" Editare" id="buttonEdit" rendered="#{javascript:!currentDocument.isEditable()}" > <xp:eventHandler event="onclick" submit="true" refreshMode="complete"> <xp:this.action> <xp:changeDocumentMode mode="edit" var="Contr"></xp:changeDocumentMode> </xp:this.action> </xp:eventHandler> </xp:button> I get the