MultiLanguage NotesView Content in Xpages - xpages

I have realized a full Xpages application width > 200 Notes View..and for translate I use the native option "Localization options" into Xpages settings.
All work very well (can now write the translation into -proprierties)
But...
In some Notes View I have the content of some column with embedded #Formulas string in the original language or the date of my field in the format of Domino enviroment (ex. there are #text(datfield;"S0") that return italian format gg\mm\aaaa)
Can I mix the native Multilanguage Database Notes Option with Locazations Options feature?
With native Notes Multilanguage database, is need duplicate the view setting the correct language... but Xpages support this feature when render the object Notes View?
p.s. For native Notes multi-language read this Redbook from page 65

First of all I would try to eliminate all the #Text(datefield) entries from the views that you are working with. This will allow the both the notes clients and the ViewPanes in your Xpage applications to automatically display the date in the correct format for the viewer of the application.
Unfortunately, from my testing, it appears that you cannot mix the native multilingual database options with the XPages localization options.

You cannot mix up those two options, because Notes-based multilingual database option is a part of Notes Client architecture.
If I were you, I create seperate views for XPages application. It's really waste of resources in the mean time (migration phase) but it's the most optimized way I guess. Instead of conforming old-style views, you may redesign your views according to what you need.
For example, in XPages, you don't need many columns to be calculated within the index.
There is no great answer for that :(

I have found that the only solution is a routine JS client insert into
*AfterPageLoad* event with **view.postScript**(Function JS client)
and *AfterRestoreView* event with the same call **view.postScript**
convert on.fly the content of my view.
I select the content DOM of my Notes view with dojo.query

Related

Notes : Is there any good tool to export design elements, especially for XPages and the custom control to write the design spec document?

I created lots of XPages and the custom control in new application. Then, I need to write the design spec documents. Is there any good to help it? "Design synopsis" menu in Notes seems not to export XPages design information.
When you connect XPages to an on disk project (ODP - see the help for that), you get a directory with design elements. XPages and controls are XML files, so you could use xslt to report on them.
Hope this helps
If your business logic is in Java, you can generate a Javadoc of the classes https://www.intec.co.uk/generating-javadocs-for-xpages-applications/.

Sharepoint html element naming conventions, by Sharepoint Controls

A few times I've attempted to customize a SP2007 page using css, html, or javascript in Sharepoint Designer; however, in Sharepoint Designer I am not able to get direct access to the desired elements since they are generated by a Sharepoint Control (such as a web part or dataview) and appear only AFTER the page is rendered in the browser. I use use IE's F12 to tracked the element I wish to change. Then I can see an identifer such as name or id I can use in my javascript or css.
Example 1: SP2007 generates "name=ctl00$PlaceHolderMain$g_ba9196a9_2842_4607_b048_9a443cb4def5$ff2_1$ctl00$ctl00$BooleanField" for an input text box. I use that name to manipulate the text box as I desire.
Example 2: SP2007 generates "id=zz6_menu" for the "Welcome" text which I use to get the users full name.
So far this has worked out fine. Am I tempting fate?
Can someone refer me to a reference that discusses how these names and other Sharepoint Control element identifiers are generated?
Are they stable? Can I count on them to be the same provided the application I develop with my version of SP isn't updated to a later version of SP? And even if that case I'm thinking I can simply update to the identifiers created by the newer version of SP.
Is this a good practice? Any other comments?
All responses are welcomed.
Thanks.
SharePoint is based on ASP.NET and that's why the Ids are automatically genereated.
cf this article.
You should not use them to identify elements on css or js.
Do not write code that references controls using the value of the
generated UniqueID property. You can treat the UniqueID property as a
handle (for example, by passing it to a process), but you should not
rely on it having a specific structure.
In my opinion, the best way is to rely on the css classes because they are not automatically generated and should not change a lot.
Anyway, if you upgrade to SP2010 or 2013, lot of your modifications won't work anymore because the structure and css changed...

XPages and data reflection (integration with PrimeFaces)

I need to have complicated grid for reflecting data with following features: sorting, filtering, pagination, and categorization (like in Notes Views). Additional features like resizing and reorderign of columns, add\remove columns by user, etc - are also welcome! )
Currently I’m considering Server-Side logic, like PrimeFaces (http://www.primefaces.org/showcase/ui/datatableHome.jsf).
Need support in how to integrate PrimeFaces into XPages? Or are there any suggestions, what library to use to reflect data in tables?
P.S. Currently I’m using DoJo EnchancedGrid. But it doesn’t support categories, this is first concern. And second - it is Client-Side logic, what is also not the best for my project.

XPages RichText Links

I have an XPage to display document data. To display RichText data I added a RichText control. What I found out is that database / view / document links are displayed with the appropriate icon but are converted to http-links. I would like to have these links being transformed to notes://-links to make sure that these links are being opened in the user's notes client rather than in the user's browser.
Any suggestions how to accomplish this from a technical point of view?
Many thanks in advance for your help.
Michael
Speak after me:
The web knows no RichText, it is a ghost of Christmas past.
There is only MIME. Now go and live with it!
Unless you build an hybrid application where RichText is used in the client and browser I recommend to select the option [x] Save as MIME in the RichText options. For hybrid applications it depends on the use case.
In your case it seems (?) that the datbase/view/document links are added using a client. It looks like a good idea to use mime in this case. Then is is just a simple string (of HTML) where you can before display (or save) use a DOM operation or a Regex to sort out the content. That works client or server side
You could have a custom control that contains a DIV and a XSP.addOnLoad() script that uses the RichtText url in an Ajax call and a dojo.query("a") to get a handle on all links and then sort out the ones you want to alter.
Let us know how it goes.

Lotus Notes: RichText Item

Okay, here's the deal. I am using C# with the Domino API. I have some rich text data that I want to insert into a lotus notes rich text field.
NotesDocument.ReplaceItemValue just inserts the text as is with no formatting.
NotesDocument.CreateRichTextItem gives me a NotesRichTextItem object that I can use for manually creating RichText (methods like AddNewLine() AddPageBreak() etc). But it does not have any kind of Parse method to get already formatted rich text data, which is what I need. I want my users to put whatever they want in there - so using the aforementioned methods is useless to me.
The NotesRichTextItem.Values object throws an error when I try to add a rich text formatted string.
So now, what do I do? I guess I'm pretty much screwed here, but hoping some genius will come up with a solution. Any help much appreciated.
Thanks guys!
PS - Inserting notes rich text data or HTML data would be fine. Either one would be just as good as long as it displays proper rich text in the document and not an unformatted string.
Well, I found an answer - it's not pretty, but it works! What I did was
Use the DXL Exporter to grab the xml
edit it (adding the rich text) and then
Delete the original document
Use the DXL importer to import the edited document
Voila! :-D
Thanks anyway for such a quick response :-)
Without knowing the details of your application, I'm not sure this would suffice. But you can store HTML as text within a Notes rich text field, and then in your Notes app display the field as "pass-through HTML". Downside is that you would not be able to do subsequent editing from the Notes client. Also, the HTML rendering engine within the Notes client is pretty poor, so you may not get anywhere near full fidelity.
If that doesn't meet your needs, you can always look into using the Notes C API (rather than the COM/API you are using). The lower level API does allow you to insert anything into a rich text field, but you will need to write the parser / converter yourself. Search for Composite Data (CD) records.
Here is a link to the API site: http://www14.software.ibm.com/webapp/download/nochargesearch.jsp?k=ALL&status=Active&q=Lotus+%22C+API%22
Does the API not provide you with access to the various rich text classes? Perhaps they could help? For example, there are classes for NotesRichTextStyle, NotesRichTextNavigator, NotesRichTextSection, NotesRichText, and so on and so forth.

Resources