Jump to content

My First XPage



Today I tried to make a simple web page using the Domino Designer 8.5.2FP1 XPage design element on a Domino 8.5.2FP1 Linux server. Getting to know how it works is pretty easy, and I didn't need to read any documentation.

I made a Form with a Subject and Body field, and a View which shows the Subject, then I made an XPage which uses the Form as its Data Source.

Then I found some good and bad sides about XPages:

The Good

The Bad

1) It's quite easy to learn how to use XPages, as the UI makes sense. It's pretty close to Visual Studio also.

2) The design element toolbar is nice, and you can drag and drop any design element to your XPage.

3) You can easily connect fields from Notes Views and Notes Forms with visual design elements.

4) A RichText type field activates CKEditor automatically, and it saves it as Notes RichText so it can be visually seen in the Notes Client also. Getting rid of the IBM Oracle Java RichText applet was a very good decision of IBM. Now they just have to get rid of the rest of IBM Oracle Java in Notes/Designer/Domino and things would be faster and better than ever. CKEditor rocks hard!

5) XPages have many useful premade actions which you can use in Buttons, for example Create Document, Edit Document, Toggle Read/Edit mode, Create Response Document, Delete Document.

6) The design elements have a nicely structured Data/Style/All properties tree view, from which you can visually change many CSS tags, JavaScript events, Notes functions, etc....

This makes visual working effective and fun, even when it's only visual coding, as the visual output is a different issue.

7) You can integrate standard JavaScript libraries visually into XPages, like Dojo, JSon, REST, etc....

1) The visual layout in Designer does not match the visual layout in SeaMonkey or Notes very much. I get a much closer match with SeaMonkey's Ctrl-E visual editor, from which I can copy/paste individual design elements into a Notes Form for further processing. I thought that maybe the main reason is the difference in the default settings of SeaMonkey/Notes/Designer, and by adding a CSS stylesheet, the visual output would match closer in all clients. A stylesheet didn't help either, and Designer still shows the HTML page completely different than the browser. I found a workaround though: adding computed fields with HTML code on the XPage around all XPage design elements solves the problem, and I get a decent browser output.

2) The HTML/CSS source code is calling some XSP JavaScript class, and it's impossible to edit or analyze the page with SeaMonkey afterwards, since there are no div tags or any other HTML tags. This is not very compatible with anything, and makes development harder. It seems there are divs after all, but they don't support the position:absolute style.

3) The fact that CKEditor saves RichText as Notes RichText has its bad sides too. You can't correct errors in the HTML code when the transformation goes wrong. Also the Source button in CKEditor is missing, as well as the Layer (=div) button. Maybe there is a hack to make it save as HTML? Fixed: It actually saves as MIME/HTML so the HTML source code of the rich text field is intact, this is great!

4) When I made a very simple XPage with only a Subject and Body field, Domino Designer managed to mess up its own XSP code and caused 2 errors which broke the XSP compiler, and the XPage could no longer be compiled/updated. I removed manually some duplicate action/save tag in the XSP code and it worked again.

5) When Domino is configured to run on port 81, and even when I have the firewall opened for port 80 and 81 from my Workstation and Server, the XSP RichText CKEditor breaks when port 81 is used, and only a small textarea is shown. This is however not a real issue, as I need to add some redirection code anyway to redirect Domino back to port 80. I just hope XPages allows such redirection, like the $$Return field in Forms does, or the Print statement in WQS LotusScript agents. I wonder why Domino even tries to force the user to port 81, when the web page was opened from port 80 or no port was specified (which defaults to 80). Domino should not care what is written in its server document, but only look at the incoming URL.

6) The XPage opens fine in SeaMonkey, when I choose Design/Preview in Web Browser, and it worked first in Notes too, but after I added the Body field, it stopped working in Notes completely, and I only get an error: Item not found. Workaround found: Opening the XPage manually from the server works fine in Notes.

I would be glad to hear what I did wrong, and how I can get those bad things fixed.




Recommended Comments

There are no comments to display.

Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...