XPages: Rendering combo box in read mode - xpages

When the page opens in read mode, what code is responsible in showing the "text" as opposed to "alias or saved value" of a combo box? There is some code that loops through the select items and retrieves the text of a matched value to display it in read mode. I think there is no concept of page read mode in JSF. So it must be a XPage implementation. I checked the code in renderers and the converters, still no clue. I am not trying to solve any particular issue here, just wanted to know what converter/renderer does that.

Since the behaviour is the same as it ever was using Notes client I'm sure that this is part of Domino's own data model. The special delimiter used in Notes client coding is the 'pipe' character ('|'). That is, Domino itself is serving everything left of the delimiter as 'text', and everything that's right of it as 'value'

Related

MBCS File Menus generate ???? Characters

I am working on an MBCS app using MFC. I am trying to support Asian languages. For the purposes of this discussion, we'll say I'm trying to support Chinese. I am able to support Pop up dialogs via MessageBoxW and Dialog SCREENs by pasting Chinese characters directly into the RC file. I can't get file menus to work using either resource view or editing the RC file directly. Whenever I type in ANY Asian character, the screen shows ???. One ? for each character. I have tried modifying the menu in C++ using ModifyMenuW. I get more question marks. Visual Studio shows everything working, and the RC file is unicode (UTF-16). I can't easily convert my project to unicode mode. Spanish, French, and German all works fine (one of the Essets in German doesn't work, but that isn't a show stopper). What should I try next?
Thanks in advance!
Well, the easy answer would be change the application to Unicode, but this is not always simple, or possible at all.
Concerning using Unicode in a MBCS application, some things are possible and some others not. For example, I have made a MBCS application displaying and editing translations of program strings (messages, menues etc) in a ListView control, however ListView does have a specific message to turn it to Unicode (LVM_SETUNICODEFORMAT) and support operations (see also CCM_SETUNICODEFORMAT). Menus aren't controls though, but they do have "wide" (Unicode) functions.
If you want to use Unicode in your application, there are some tests you need to make. Success is not guaranteeded, but you can at least draw some conclusions and determine whether what you want to do is possible.
Test1:
You mentioned trying ModifyMenuW(), but this will try to modify an existing menu. Instead, try InsertMenuW() or InsertMenuItemW(). Any unicode string should be displayed properly, so try not just Chinese, but other laguages too (eg Greek or Russian). And btw, I can't see how French works and German doesn't (they use the same codepage - West European). What's the system codepage of your test-machine?
Test2: (if the above has failed)
Try changing the whole menu (SetMenu()) with having a single (unicode) menu item as its root.
Test3: (if the above have failed)
Then you need to check whether the window containing the menu must be Unicode. Create a simple "Hello World" Win32 application, or find a sample, if Visual Studio does not do this for you (these basically register the window class, create the main window and start the message-loop) - you must add a menu too, using the "wide" version of the menu functions explicitly. If this doesn't work, try changing the code that creates the window to unicode. This way you will know whether you need a unicode window, to own the menu.
Please make these tests and let us know the results. I will further post if needed.

Spell check contents of Rich Text Content Control

I am having an issue with Word 2013 and spell checking the contents of Rich Text Content Controls.
I am currently working on a project where text is inserted (via a Word Add-In) into a pre-defined document template which makes use of Rich Text Content Controls. The inserting of the data into the content controls all works great, but I am having an issue where the newly inserted text within the content controls is not being spell checked by Word 2013.
I have read numerous posts on line which suggest that 'grouping' the content controls in the document resolves the issue, but haven't been able to implement this fix.
Text outwith the content controls is being spell checked, but any text within the content controls is not.
Steps to reproduce:
Open Word 2013 and create a new blank document.
Ensure that the DEVELOPER tab is enabled (if not, see instructions here)
On the DEVELOPER tab, enable Design Mode under the Controls group.
Still on the DEVELOPER tab, under Controls, add a new Rich Text Content Control.
Amend the default "Click here to enter text." so that it contains a spelling mistake.
On the DEVELOPER tab, exit Design Mode.
On the REVIEW tab, choose Spelling & Grammar. You should observe that the deliberate spelling mistake within the content control is not recognised.
James, the text you edit in the Rich Text Content Control is what is called the Placeholder Text. This text is to be defined by the 'content' developer.
This text won't be part of the Spelling & Grammar review as the Placeholder Texts are 'constants' defined by the developer, hence the reason why they are under the Developer tab.
So it is advised to first put the texts that you want to use in a Placeholder in a normal document, do the spell check and copy them over and apply to the Placeholder Text.
I think it is fairly reasonable not to include the Placeholder texts in Spelling & Grammar as:
It will take time to process the fixed assets
End users may not have access to the Placeholder Texts to edit the 'mistakes'

How to keep autocomplete event active on Xpages

I've an xpages in which i set some fields to filter documents, with an autocomplete in one of these.
At the end, a button make a pdf based on this query fields (onClick action), and the pdf is presented to be saved or open.
Ad this point, autocomplete doesn't work anymore, i need to reload the xpage to make autocomplete active again, but i loose all other field values set in previous search.
Is it possible to keep autocomplete alive?
My guess is that you serve up an PDF directly from the page and no in a separate window. This will make the XPage to stall and will wait for a timeout of some kind.
I usually on the pdf generation button add this on a js timeout.
XSP.allowSubmit()
That usually works in the cases I have encountered.
Problem solved!
Just set the type ahead mode to Partial instead of Full
Thanks everyone

Viewing Word Documents inside Browsers

I'm searching for some kind of Programm / Java Applet / ActiveX Control or magic spell to view Word / Excel Documents inside Browsers (Browser independent would be the best case, but IE only ist just fine).
I don't want to open Word itsself inside a frame, because that gives users the false impression that they can edit and save the document i just want to display its contents.
I also found solutions which converts the word document to pdf first, but i can't do this due to some security restrictions on the environment i'm working on.
This can help when those proprietary file formats can first be converted to ODF (for example by LibreOffice/OpenOffice.org): http://webodf.org/
(I will not comment on "security restrictions" and using Microsoft software ...)

Copy text from template into mail (Lotus Notes)

I'm trying to create a toolbar button that inserts a footer (including some buttons) into the current mail.
As far as I know, theres no way to create and modify buttons directly with Lotus Formula, so I'm trying to copy/paste from another document. I can't use a mail template because I need the text to be inserted in replies.
This is what I have assembled from online examples:
#PostedCommand([FileOpenDatabase]; "SERVER" : "mailbox.nsf" ;
"($All)" ; "" ; 1 ; 1 ) ;
#PostedCommand([OpenDocument] ; "" ; "34884517EED80C33C125A999005301D4") ;
#PostedCommand([EditDocument]) ;
#PostedCommand([EditGotoField] ; "Body" ) ;
#PostedCommand([EditSelectAll]) ;
#PostedCommand([EditCopy]) ;
#PostedCommand([FileCloseWindow]) ;
#PostedCommand([FileCloseWindow]) ;
#PostedCommand([EditPaste])
This works inconsistently, depending on what I am looking at when pressing the button.
Sometimes it opens a search box with the actual text of the mail pasted in it. It does seem to close the new mail.
I'm especially confused because many commands don't take any arguments, eg FileCloseWindow. How do I control the "context" of the commands or check for success?
It feels like doing automation with SendKeys - fire off a chain of commands and hope that nothing unexpected happens. Of course, I am a total noob with Lotus Formula, so I may be doing this totally wrong. Any help is appreciated.
You may want to use Alan Lepofsky's free "Paste Information" application.
The Notes database "Paste Information" serves as the repository for the content you wish to reuse. Move the cursor to the position where you want to insert the text, click on the "Paste Information" Toolbar icon and then choose the document (aka. text) to insert.
http://www.alanlepofsky.net/alepofsky/alanblog.nsf/dx/paste-information-application
There really isn't a good solution for this using formulas. You'll be stuck in the SendKey-like world you describe.
If you can modify the mail template even a little, you could add a form to it that includes your text and buttons, instead of grabbing it from a central database. Then you could automate creating a new document based on that form, copying the contents, etc. That could help the automation work consistently and perhaps more quickly since it would be getting the resource from within its own database.
You could also then add a shared action button to all the mail forms (memo, reply, etc) that runs this formula, which would make distribution a lot easier.
I'm afraid even with LotusScript, this is an impossible task because you can't insert rich text into a UI document ( or at least not in the version I am running ).

Resources