xpages-ssjs

xpages on click event from view panel column - pop up dialog forms from views

柔情痞子 提交于 2019-12-11 10:08:20
问题 There are 2 datasources: Cdoc ( the doc. content ) and the Pdoc ( inside a dialog ). These 2 datasources are linked together based on the Cdoc'UNID . My main view panel is like this: [_A_common_field] from Cdoc1 and all Pdocs from Cdoc1 ( this column is categorized ) Cdoc1 Pdoc 1 from Cdoc1 Pdoc 2 from Cdoc1 [_A_common_field] from Cdoc2 and all Pdocs from Cdoc2 ( this column is categorized ) Cdoc2 Pdoc 1 from Cdoc2 How can I compute the target property from my viewPanel1 considering the fact

XPage Custom Controls: calling an action defined in a custom controll

故事扮演 提交于 2019-12-11 08:33:33
问题 I am using Domino 9.0.1 and I am developing an XPage application to act as a time sheet. In an entry page, I have a repeater where I have one custom control repeated 10+ times. Each control has its own Java Object (stored in an ArrayList on the page) and its own NotesXspDocument data source. I am using a custom control in order to 1) maintain a constant look and feel throughout the entire application, 2) if changes need to be made to functionality or to design they should be made in one

Xpages how to get CSJS confirmation in SSJS

半城伤御伤魂 提交于 2019-12-11 08:32:44
问题 I have a repeat control that contains a button that will process documents that a user selects. My first use case is for deletions. I detect whether or not the user selects at least one document and post an error message if they do not, using view.postScript. I want to add a confirmation dialog box, confirming that the user wants to take the action on the documents (like delete them) but cannot find a way to do it. Ideally I want to do this all in my current SSJS. My code is below, with a

checkboxgroup returning only last selected value

倖福魔咒の 提交于 2019-12-11 08:00:00
问题 I have a repeat control and populating a checkboxgroup with items from a viewScope array. Sample code is : <xp:repeat id="repeat4" rows="100" value="#{viewScope.choices}" indexVar="rownumber" var="row" first="0"> <xp:checkBoxGroup id="checkBoxGroup2" layout="lineDirection"> <xp:selectItems> <xp:this.value><![CDATA[#{javascript:if (viewScope.choices[rownumber].get(1)==viewScope.line){ return viewScope.choices[rownumber].get(0) }}]]></xp:this.value> </xp:selectItems> </xp:checkBoxGroup> <xe

XPages get Value selected from combo box

别等时光非礼了梦想. 提交于 2019-12-11 07:18:57
问题 I want to display the selected value from the comboBox into a label. <xp:label id="label4"> <xp:this.value><![CDATA[#{javascript:var componenta = Contr.getItemValueString("txt_tipcontractcv"); if (componenta == "") { return "void";} if (componenta !="") { return "My value is "+componenta}}]]></xp:this.value> </xp:label> The label is on a panel, and I did a partial refresh to the respective panel. My comboBox is binded to a data element. label4 is always void . Why? Thank you, Florin 回答1: I

XSP Partial Refresh

我的未来我决定 提交于 2019-12-11 05:57:56
问题 I am trying to send a value to server from anchor link and I call following code from a function which is called from the anchor link. Although I am able to trigger partial refresh,I get an error...any pointers please..... var refreshId=dojo.query('[id$="testPanel"]')[0]; alert(refreshId.innerHTML) alert(refreshId.id) var mySubmitValue='whatYouWantToSendHere'; XSP.partialRefreshGet(refreshId, { params: { '$$xspsubmitvalue': mySubmitValue }, onStart: function () { alert('starting'); },

Show only Unread document current View?

别来无恙 提交于 2019-12-11 05:26:39
问题 anyone have a suggest to realize @Command([ViewShowOnlyUnread]) in XPages ViewPanel? And is possibile realize the function "Next Unread" and "Previus Unread"? 回答1: Instead of binding the view panel to a standard view data source, try setting its value attribute to the following expression: importPackage(com.ibm.xsp.model.domino); var targetView = database.getView("Some View"); var unreadEntries = targetView.getAllUnreadEntries(); var unreadModel = new DominoViewEntryCollectionDataModel

How to get display text of combobox and not the alias?

房东的猫 提交于 2019-12-11 04:52:42
问题 I have a combobox with some display values and alias, In SSJS when I do getComponent("comboboxName").getValue() it returns alias value, which is fine. But now I want the display text of the combobox and not the alias value, is there any way to get it? 回答1: Define a SSJS function getComponentLabel() : function getComponentLabel(componentId) { var select = getComponent(componentId); var value = select.getValue(); if (value) { try { var list = select.getChildren(); for (var i = 0; i < list

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

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