Today I uploaded two new XSnippets.
Easy Menu
This is a small tool to integrate easily a fully customizable and configurable menu in your XPage.
You can define a picture for your menu button and also a picture which will be displayed on mouseover. You can leave the picture properties empty, so you can define your buttons using CSS-styles.
The whole menu is designable via CSS-styles, either directly in the code or in a seperate CSS file via the defined classes.
For defining the content of your menu, just pass a java.util.Vector with entries with the following structure via the menuEntries property:
[ButtonLabel]|[Link]
You can also use multiple menuEntry properties with the same structure to define it manually.
You can define the link in different ways. You cann define an URL like google.de or a full URL. Also you can define XPages, but you have put a / before the name, like this: /xpage1.xsp.
I had put that in a configuration document.
To make the customControl work, you have to add the following properties:
menuEntry – type String – String Editor – Allow multiple instances
menuItemPicture – type String – Image File Picker
menuItemPictureHover – type String – Image File Picker
menuEntries – type java.util.Vector – String Editor
You can find it here: http://openntf.org/XSnippets.nsf/snippet.xsp?id=easy-menu-custom-control
Login Dialog
This snippet shows you how to put your loginmask into a dojo dialog.
Simply embedd this code somewhere in your XPage to have your login screen put into a dojo dialog.
I always put it into a link list on top of the screen like in OneUI or in a menu or something.
For anonymous users, the login link will be displayed and for any authorized user the logout link will be displayed.
Looks a bit more beautiful and more modern than a new screen with the login mask showing up. Of course this is only helpful if the application allows unauthorized users to open at least the start page.
I recommend using a customized login mask, defined in domcfg.nsf, in this dialog.
You can find it here: http://openntf.org/XSnippets.nsf/snippet.xsp?id=login-dialog
Hope yopu like it =)
Filed under: Notes & XPages Tagged: Dialoge, Dojo, Easy Menu, Login Dialog, Notes, OpenNTF, XPages, XSnippet Contest, XSnippets
