Xpages Extension Library Name Picker Not working - xpages

I am not able to get the name picker in latest version of extension library to work. Here is my Xpage code. I have tried every name picker type available.
I deployed my code to another server and I get this error message: Syntax Error: Unexpected token "<"
No error on firebug or server console.
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex">
<xp:inputTextarea id="streamApprovers" value="" multipleSeparator=";" multipleTrim="true"></xp:inputTextarea>
<xe:namePicker id="namePicker1" for="streamApprovers" dialogTitle="Select approver(s)" listHeight="auto" listWidth="auto">
<xe:this.dataProvider>
<xe:dominoNABNamePicker groups="false" nameList="peopleByLastName" addressBookDb="names.nsf">
</xe:dominoNABNamePicker>
</xe:this.dataProvider>
</xe:namePicker>
</xp:view>

Sorry guys for wasting your valuable time. Name picker is working fine. My admin has removed web access to names.nsf by setting "Maximum internet name and password" to NO Access. Posting it here as it may help some wandering soul.

Related

How can I add a 'name' field in a custom control?

In forms, there is a 'name' field which upon clicking opens address book names through which I can select the list of users. I want to do the same thing through custom control but not getting how to achieve it as there is no option of 'name' field in Custom controls.
Use the Name Picker <xe:namePicker ...> from Extension Library with data provider "dominoNABNamePicker". It is part of Notes 9.
This is a simple example how to use it:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view
xmlns:xp="http://www.ibm.com/xsp/core"
xmlns:xe="http://www.ibm.com/xsp/coreex">
<xp:inputText
id="inputText1"
value="#{sessionScope.name}">
</xp:inputText>
<xe:namePicker
id="namePicker1"
for="inputText1">
<xe:this.dataProvider>
<xe:dominoNABNamePicker></xe:dominoNABNamePicker>
</xe:this.dataProvider>
</xe:namePicker>
</xp:view>
You can find more examples including multiselection or typeahead in XPages Extension Library Demo database in Domino_Pickers.xsp. You can find the demo database in download package on OpenNTF.

Date Picker Not Working - xPages Mobile Form Domino 9 / Domino 8.5.3 with Extension Library [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
Date picker not working properly in Domino 9 xPages Single page application. It shows 3 fields and display calendar in bottom of the form on mobile form on any device.
Please help
Hi, I have use this with the same code, Notes version and library but it is not showing correctly as specified in blue mix example. I will provide screen shot for the result. Is any "dojo" to be added on xpages?
I put up a test app on Bluemix using single page application, with one appPage containing a datePicker.
All works well in Android Firefox, Android Chrome & default HTC Android browser (using Android 5, aka Lollipop). That app is using the XPages runtime on Bluemix, which contains 901FP4 & Extlib r13.
XPage code (m_datePicker.xsp):
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xc="http://www.ibm.com/xsp/custom" xmlns:xe="http://www.ibm.com/xsp/coreex">
<xe:singlePageApp selectedPageName="dateTest" id="singlePageApp1">
<xe:appPage pageName="dateTest" resetContent="true" id="appPage1">
<xc:ccdateTest></xc:ccdateTest>
</xe:appPage>
</xe:singlePageApp>
</xp:view>
Custom control code (ccdateTest.xsp):
<?xml version="1.0" encoding="UTF-8"?>
<xp:view id="view1" xmlns:xe="http://www.ibm.com/xsp/coreex" xmlns:xp="http://www.ibm.com/xsp/core">
<xe:djxmHeading id="djxmHeading1" label="dateTest">
<xp:this.facets>
<xp:panel xp:key="actionFacet"/>
</xp:this.facets>
</xe:djxmHeading>
<xp:inputText id="inputText1">
<xp:dateTimeHelper id="dateTimeHelper1"></xp:dateTimeHelper>
<xp:this.converter>
<xp:convertDateTime type="date"></xp:convertDateTime>
</xp:this.converter>
</xp:inputText>
</xp:view>
And in the xsp properties of the application:
From your screenshot it looks like one of two things:
you are missing the mobile theme override in your xsp.properties (see my screenshot above)
or you've not set the mobile theme prefix correctly. It should be "m_" to match the name of your mobile xpages

Custom Property in Repeat control stopped working

I have a strange bug that is reproducible but i cant find out whats causing it.
If i call this xpage i get the following error message:
Error while executing JavaScript computed expression
'fieldname' not found
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"
xmlns:xe="http://www.ibm.com/xsp/coreex"
xmlns:xc="http://www.ibm.com/xsp/custom">
<xp:this.data>
<xp:dominoDocument var="Request"></xp:dominoDocument>
</xp:this.data>
<xp:repeat rows="999" var="fieldname">
<xp:this.value><![CDATA[#{javascript:"myfieldname"}]]></xp:this.value>
<xc:Widgets_Field
field_datasource="#{javascript:currentDocument}"
field_name="#{javascript:fieldname}">
</xc:Widgets_Field>
</xp:repeat>
I have tried to empty the cc but without any success. The only thing thats working is when i am either hardcoding the property field_name or when i set the repeat control to "create controls at page creation"
I am absolutely sure that code was working before but i cant find out whats causing the error message. Can you please give it a try and let me know if you also have the same problem.
Attached please see stack trace
com.ibm.xsp.exception.EvaluationExceptionEx: Error while executing JavaScript computed expression
com.ibm.xsp.binding.javascript.JavaScriptValueBinding.getValue(JavaScriptValueBinding.java:132)
com.ibm.xsp.page.compiled.ExpressionEvaluatorImpl.getBindingValue(ExpressionEvaluatorImpl.java:151)
xsp.Widgets_005fField$Widgets_005fFieldPage.createInputText4(Widgets_005fField.java:776)
xsp.Widgets_005fField$Widgets_005fFieldPage.createComponent(Widgets_005fField.java:142)
com.ibm.xsp.page.compiled.AbstractCompiledPage.buildComponent(AbstractCompiledPage.java:265)
com.ibm.xsp.page.compiled.CompiledComponentBuilder.buildChildren(CompiledComponentBuilder.java:115)
com.ibm.xsp.page.compiled.CompiledComponentBuilder.buildAll(CompiledComponentBuilder.java:84)
Within the custom control, if you use wrong binding that should be known at the page load, it throws such an error. For instance if your custom control contains a "loaded" attribute like:
<xp:text
loaded="${compositeData.field_name}">
That will throw such an error. That's why it works with "create controls at page creation" setting.
Update: If you are going to use dynamic binding within the custom control, see my answer at this question:
Dynamic Data Binding?

Links within XPage Mobile Controls opening in same tab on iPad

I have to create a simple XPages application for iOS devices so want to use the XPages Mobile Controls which come with the Extension Library in 8.5.3 UP1.
On one of the pages, I need the users to be able to open links in new tabs, but I've found that even with the link target set to _blank, the links are opening in the same tab when opened on the iPad. It works fine using Chrome on my laptop - opening in a new tab. If I just create a simple XPage (not using the Single Page App control) with the same link control on it, the link opens ok in a separate tab on the iPad.
Is there any way to try and force the link into a new tab if I use the Mobile controls?
This is code from a simple test xpage - which results in the link opening in the same tab when I test it on an iPad:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"
xmlns:xe="http://www.ibm.com/xsp/coreex" defaultLinkTarget="_blank">
<xe:singlePageApp id="singlePageApp1" selectedPageName="homePage">
<xe:appPage id="appPage1" pageName="homePage">
<xe:djxmRoundRectList id="djxmRoundRectList1">
<xp:label value="File Link:" id="FileLinkLabel"></xp:label>
<xp:br></xp:br>
<xp:link escape="true" text="Link" id="link1"
value="http://www.stackoverflow.com/" target="_blank">
</xp:link>
</xe:djxmRoundRectList>
<xe:djxmHeading id="djxmHeading1" label="Home">
</xe:djxmHeading>
</xe:appPage>
</xe:singlePageApp>
</xp:view>
I tried this out on an iPad with Domino v9.0.1 and on v8.5.3 (with ExtLib v853.20130315-0724 installed). In both cases the link opened in a new tab as expectedusing the code you posted.
Would you be able to upgrade to a newer version of the Extension Library, and try that?
http://extlib.openntf.org/?r=project/XPages%20Extension%20Library/releases/56832E9BD6A0615186257B4300349C59
The v853.20130315-0724 release was the final one released for 8.5.3, so I would try that.

XPages Extension Library: namepicker not working

Is there any issue with namepicker of Extension Library version 9.0.0.v00_01_20130415-0518?
It does not display popup window for address book, here is my code:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex">
<xp:panel>
<xp:panel>
<xe:namePicker id="namePicker1" for="djName">
<xe:this.dataProvider>
<xe:dominoNABNamePicker addressBookDb="names.nsf" addressBookSel="all">
</xe:dominoNABNamePicker>
</xe:this.dataProvider>
</xe:namePicker>
<xp:br></xp:br>
<xp:br></xp:br>
<xe:djextNameTextBox id="djName" multipleSeparator="," multipleTrim="true">
</xe:djextNameTextBox>
</xp:panel>
</xp:panel>
</xp:view>
And also, I have manager's rights on names.nsf database.
Edit:
strange behavior! I change <xe:djextNameTextBox control to <xp:inputText and its works fine. How to debug xe:djextNameTextBox control to figure out the problem?
Edit 2:
Following error display when xsp page load:
Uncaught Error: Could not load 'dijit.form._FormValueWidget'; last tried '../dijit/form/_FormValueWidget.js' dojo.js:14
dojo._loadModule.dojo.require dojo.js:14
(anonymous function) #Fi&#Ez&#EOf&#Ek.js:107
Uncaught Error: Could not load class 'extlib.dijit.NameTextBox #Fi&#Ez&#EOf&#Ek.js:20
(anonymous function) #Fi&#Ez&#EOf&#Ek.js:20
$DBrH_ dojo.js:14
$DBpd_ #Fi&#Ez&#EOf&#Ek.js:20
$DBpe_ #Fi&#Ez&#EOf&#Ek.js:20
_4c #Fi&#Ez&#EOf&#Ek.js:20
dojo.loaded dojo.js:14
dojo._callLoaded dojo.js:14
dojo._modulesLoaded dojo.js:14
dojo._loadInit
After page load, when I click on name picker button another error display:
Uncaught TypeError: Object # has no method 'selectValue'
Your xe:djextNameTextBox control is not bound to a value. Try binding to e.g. a viewScope variable or a field on a document datasource:
<xe:djextNameTextBox id="djName" value="#{viewScope.nameField}" multipleSeparator="," multipleTrim="true">
</xe:djextNameTextBox>
Notes/Domino 9 now comes with Extension Library built in as standard. You do not need to install the extlib from OpenNTF.
I tested your source code in a default install of Notes 9. I get the following output:
Clicking the icon gets me this (I added the Admin + clicked OK).
The output of the page is now this:
My observation are below:
I uninstall Extension Library version 9.0.0.v00_01_20130415-0518 and upgrade to 900v00_02.20130515-2200, but the problem did not resolved. Then I install 8.5.3.20130315-0724 after uninstalling version 900v00_02.20130515-2200 and it works.
One more thing is that, at first after installing version 8.5.3.20130315-0724 it did not work in chrome browser (which was already opened on my laptop) then I open firefox and surprisingly it shows the address book, I mean that xe:djextNameTextBox control works with name picker control as expected. Then I switch to Chrome and clear all the history and reload the page .....!!! yes its work here too.
I repeat all the above stuff for Extension Library version 9.0.0.v00_01_20130415-0518 and Extension Library version 9.0.0.v00_01_20130415-2200 but xe:djextNameTextBox control not working with that versions.
-mak

Resources