xpages

Sorting a HashMap by date

独自空忆成欢 提交于 2019-12-10 03:57:59
问题 In a Java class I have a method to reOrder an existing HashMap by date. The HashMap is of a type <String, Object> where the Object contains a field called expPayDate and the key string is a sequential number turned into a string.. So I need to loop through the items in the sourceMap and find the item with the newest date then copy it to a tempMap in the correct order. My issue is what is the best way to determine the item with the newest date. 回答1: Use a TreeMap instead of HashMap. it will be

POI 4 XPages installation (site.xml)

大憨熊 提交于 2019-12-10 00:50:16
问题 I find this website (http://poi4xpages.openntf.org/) for install POI 4 in domino designer. I download the zip file and follow the installation guide from https://my.webgate.biz/poi/documentation.nsf/viewdoc.xsp?docid=installguide In step 2: Import the update site from the ZIP file into the eclipse update site. I try to import the site.xml file but I get an error. The error is like this: Object variable not set(#91) dlgimportsite: click (line 9) I open site.xml and check line 9, the code is

Dojo DataGrid (8.5.3 UP1) Returning Blank Rows - based on Readers field

懵懂的女人 提交于 2019-12-09 23:37:35
问题 Trying out a Dojo DataGrid control on an alternate XPage (so as not to impact production) for an existing View, which utilizes Readers fields in the documents. I've got the REST service implemented (xe:viewItemFileService) and connected to the Dojo DataGrid just fine (from 8.5.3 UP1 controls). I have two scenarios of user visibility (via Roles in the Readers field, assigned by NAB Group definition): All documents visible (user A). User A can see all documents, everything works perfectly fine

Bootstrap4XPages plugin: how to catch a change event with Select2 Picker?

≯℡__Kan透↙ 提交于 2019-12-09 22:30:07
问题 I am using the BS4XSP plugin and the Select2 Picker/Combo for a Listbox. Unfortunately when using it I am not able to catch the change/click/keyup event of that Listbox to execute code. This is my code extract: <xp:div rendererType="bootstrap.Panel" title="Facets" id="facets"> <p> <xp:listBox id="searchFacets" multiple="true" value="#{sessionScope.searchFacets}"> <xp:selectItems> <xp:this.value> <![CDATA[#{javascript:search.getFacets()}]]> </xp:this.value> </xp:selectItems> </xp:listBox> <bx

Getting the clientId of an XPages button programmatically

牧云@^-^@ 提交于 2019-12-09 13:09:26
问题 When I create a submit button on the form the following is generated in the HTML XSP.attachEvent("view:_id1:_id2:_id38:_id55", "view:_id1:_id2:_id38:button1", "onclick", null, true, 2); }); "view:_id1:_id2:_id38:_id55" = the clientId of the eventHandler "view:_id1:_id2:_id38:button1" = the button clientID (not at all confusing) Much as I love the Portable Command Guide - I am unable to determine how I can programmatically get the eventHandler clientId. I need the clientID to submit the form

Which is the most efficient way to access the value of a control?

社会主义新天地 提交于 2019-12-09 12:33:28
问题 Of the two choices I have to access the value of a control which is the most efficient? getComponent("ControlName").getValue(); or dataSource.getItemValue("FieldName"); I find that on occasion the getComponent does not seem to return the current value, but accessing the dataSource seems to be more reliable. So does it make much difference from a performance perspective which one is used? The dataSource.getValue seems to work everywhere that I have tried it. However, when working with rowData

Binding a Xpage DominoDocument to a Bean

一笑奈何 提交于 2019-12-09 06:56:25
is it possible to bind a DominoDocument directly to a Managed Bean. So that I can have a property in my Bean which holds a reference to the DominoDocument all the time? Appreciating any suggestions/advices! As Per mentioned above, the simplest way to do what you want is instead of binding it to a property in your bean, just access it using a method in your bean. public DominoDocument getDominoDocument() { // Whatever the data source name is you want to get String documentName = "document1"; Object o = ExtLibUtil.resolveVariable(FacesContext.getCurrentInstance(), documentName); // Double check

Access Control with a multi database application

[亡魂溺海] 提交于 2019-12-09 03:56:22
问题 I have a mainDB.nsf that contains all of the XPages design, agents, script libraries etc. From this database the user selects an application. There may be one or more application databases. Each of the applications databases contain the actual data for the application, plus the views of that data that is accessed in custom controls in the mainDB. So when a person authenticates against the mainDB they get all their security rights and assume that there is a role in the mainDB called [Finance].

Can not attach debugger to HTTP JVM, AMGR JVM is attached instead

别等时光非礼了梦想. 提交于 2019-12-09 03:56:00
问题 Domino is configured to allow remote debugging by notes.ini param: JavaEnableDebug=1 JavaDebugOptions=transport=dt_socket,server=y,suspend=n,address=8703 Debug is tarted in Domino Designer/Eclipse to debug some XPages code. Debugger attaches to different JVM. As I discovered, it is JVM of AMGR which run Java agent previously. Disconnecting and reconnecting debugger does not help. Only workaround is to shutdown/restart AMGR to be able to attach to HTTP JVM. Is it possible to set different

Xpages document changing document mode?

烂漫一生 提交于 2019-12-09 01:49:15
问题 I have a strange thing occurring; as usual, I can't post code, unfortunately, so I'm describing the problem in case anyone can suggest a possible cause. I have an xpage with a custom control included on it; the custom control handles document locking and changing to edit/read-only modes via links. The document locking is done by setting an applicationScope variable based on the UNID. To make it more friendly for other users on the system, I run a function periodically on the page to check