This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Feb 13, 2013, 4:40 PM
453 Posts
topic has been resolvedResolved

Name Picker issues

  • Category: Extension Library
  • Platform: All
  • Release: 8.5.3
  • Role: Developer
  • Tags: Name Picker control
  • Replies: 3
I am fairly new to XPages, been doing Notes for a long time. Some things that are dead simple in Notes seem way to complicated in XPages!
In any case I installed the Extension Library and am using the Name Picker control. I have created a Mulyi-Line Edit Box called Approvers with the separator as ";" and the Name Picker points to the Box Approvers. That part works. The problem is that I do not want the end user to be able to Edit the Edit Box directly. So if I make Approvers Read-Only the Picker control does not show up. So I thought I would uncheck Visible on the Approvers control, but that makes the Picker Control hidden. Perhaps there is an easy way to accomplish this but I can't find it.
Second issue I would like the Multi value separator in the Approvers field to be a new line.
At the risk of asking to many questions in one topic I need it to display only public NAB, selected all-public property but that for some reason only gives me my personal local NAB.  
Feb 13, 2013, 8:49 PM
31 Posts
Re: Name Picker issues
Hi Bill, be thankful you weren't trying to do name picking prior to ExtLib!
 
  • To disable input on your control attached to your name picker you could try this  OpenNTF Suggestion
  • Or, this one.
  • Or, what I did was use a NameTextBox to hold the result which provides a slick way of removing entries as well.  Use a NameTextBox & NamePicker.
  • To list your results with newline separators, you'll need to use a converter I think.  I haven't used this on an input attached to a name picker, but the below works swimmingly on a dojo textarea:
<xp:customConverter>
                                <xp:this.getAsObject><![CDATA[#{javascript:/* UI input -> Notes document field */
@Explode(@Trim(value),";");}]]></xp:this.getAsObject>
                                <xp:this.getAsString><![CDATA[#{javascript:/* Notes document field -> UI display */
@Implode(value,"\n");}]]></xp:this.getAsString>
                            </xp:customConverter>
  • To your last question, my experience with the all-public is this:
    • When you are in localhost mode, it uses all the NABs listed in your notes.ini NAMES= parameter.  It can't list any server NABs because it doesn't know about them.
    • When you are running the same XPage on a server, it will use the NABs listed in the server's notes.ini NAMES= parameter.

Hope these help you with your name picker issues.
Judy


 
 
Feb 17, 2013, 7:47 PM
453 Posts
Re: Name Picker issues

Thanks for the responses. I used a bit of several responses here and in theStackOverFlow.

1. I created the dojo Names PIcker and pointed it at a text control called Approvers and set the MultipleSeparator to "," in the Approvers Control
 
2. Add a Multi Line Text Box that I called ApproversDisplay, Set this to read-only and don't bind it to the data object and the default value of

var Rel = getComponent('Approvers').getValue(); return @Implode(Rel,"\n")

which separates each value with a new line.

3. Set the onchange event on the Approvers control to do a Partial Refresh on ApproverDisplay.
 
4. in the source I set the style property display:none this does not hide the Name Picker like the visible property does.
 
style="display:none">

I'm pretty new to XPages so some might consider that there is a better way, but after more hours than I really want to count !It Works!


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal