xpages

How can I know if a viewScope variable has been initialized

耗尽温柔 提交于 2019-12-10 16:19:04
问题 In an application I need to know if a viewScope variable has been initialized. When the viewScope variable is created the value might be null. So viewScope.isEmpty("SomeName") does not tell me that it has been intialized and the answer is null or it has not been initialized yet. None of the viewScope properties seem to answer the question "dose the viewScope exist". 回答1: You can get the information whether a viewScope variable does exist or not with if (viewScope.containsKey("SomeName")) ...

How to avoid the 64k limit when retrieving data from a view column?

我只是一个虾纸丫 提交于 2019-12-10 15:33:07
问题 I'm aware that the SSJS version of @DbColumn() has the same 64k limitiation as the original Formula language version. So up until now I used NotesView.getColumnValues() instead, believing that here I wouldn't face such a limitation. Which obviously is wrong as an urgent support call yesterday tells me, as well as this crash report by IBM. The code in question is used to populate the selectItems control in a comboBox; opening the page hosting the comboBox crashes the server's http task and

How to pass the Document context in Xpages while calling an Agent?

微笑、不失礼 提交于 2019-12-10 11:46:43
问题 How to pass the Document context in Xpages while calling an Agent? In Xpage, I am in need of calling a java agent with documentcontext from my Xpage, And also I am in need of passing my current document as a parameter... In Lotuscript we can do it as easily without saving the current document, but in Xpage I am using the following code., document1 is a current document. var agent=database.getAgent("AgentName"); agent.runWithDocumentContext(currentDocument.getDocument()); This code I am not

POI for XPages - save Word document as attachment in rich text field

倖福魔咒の 提交于 2019-12-10 11:28:49
问题 I'm using the OpenNTF POI 4 XPages plugin. This works very well for generating Word Documents. Now, after generating the Word document, I would like to create a new response document and store the word document as an attachment in a rich text field in this response document. Here is my code (in the poi postGenerationProcess property of the POI 4 XPages widget): var doc:NotesDocument = currentDocument.getDocument(); var rdoc:NotesDocument = database.createDocument(); rdoc.appendItemValue("Form

Re-Initialize JQuery have XPages Partial Refresh updates DOM

我的未来我决定 提交于 2019-12-10 11:24:39
问题 I have a tabbed panel from the core controls and inside it is an <xp:inputText> which has a hook for some jQuery used to limit the field length. It works great if I have this tab on the screen when I change the page to edit mode. If however I am not on that tab and switch to edit mode and THEN change to the tab I want, it does not work. I assume it's because these controls did not exist when jQuery fired up. Anyone know a way to have jQuery refresh itself to pick up the new DOM additions that

Notes 9, rewriting URLs

余生颓废 提交于 2019-12-10 11:18:40
问题 How do you rewrite a URL in Notes 9 XPages. Let's say I have: www.example.com/myapp.nsf/page-name How do I get rid of that .nsf part: www.example.com/page-name I don't want to do lots of manual re-direct because my pages are dynamically formed like wordpress. I've read this: http://www.ibm.com/developerworks/lotus/library/ls-Web_site_rules/ It does not address the issue. 回答1: If you use substitution rules like the following, you can get rid of the db.nsf part and call your XPages directly as

Xpages ObjectData Custom Control: Mixing compositeData with text

孤街浪徒 提交于 2019-12-10 11:10:47
问题 Would like to make a custom control for my DataObjects which would have two properties, the javaClass and the javaModel. So if I have a java class names acme.com.model.Person, the javaClass property would be acme.com.model.Person and the javaModel property would be Person. I started to build my custom control but only got a few things put in before I ran into syntactical problems. The real problem is createObject. I don't understand how I can replace the presently hard-coded "Person" in the

XPages HTTP Threads hanging

孤者浪人 提交于 2019-12-10 10:41:20
问题 I've had a question open on here about improving the performance of my 30gb workflow application in XPages. There were lots of suggestions but most involve recycling, improving code etc. and what actually fixed the issues with speed are not often talked about - the advanced tab in the application properties (see my last post) Now I have an application that runs really well, it is fast and people are happy BUT the server still periodically crashes. Or I should say, HTTP becomes unresponsive

When I save a document from an extension library dialog box some values are blank

两盒软妹~` 提交于 2019-12-10 09:56:06
问题 Using 8.5.3 UP1 When I save my document from a dialog box certain fields are not being populated. If I save the document from within the xpage it saves these fields just fine. Here is a simple example to illustrate the issue: <xp:link text="Save Document By Dialog" id="link21"> <xp:eventHandler event="onclick" submit="false"> <xp:this.script><![CDATA[XSP.openDialog("#{id:dialog1}");]]></xp:this.script> </xp:eventHandler> </xp:link> <br/> <xp:button value="Save By Button" id="button1"> <xp

XPages - onkeypress event not triggering click properly

强颜欢笑 提交于 2019-12-10 05:18:38
问题 I created a search field (id:searchField) and a search button (id:searchButton) using Xpages Custom Controls. I added an onkeypress event on the search field such that it will trigger a click to the searchButton. The searchButton will then reload the page but with url parameters coming from the search field. The problem is that the page reloads but the search parameters are not added to the URL when I press ENTER in the search field , but works properly when I press searchButton. Here are the