199 Lotus blogs updated hourly. Who will post next? Home | Blogs | Search | About 
 
Latest 7 Posts
Tipps and Tricks for the Java SE 8 Programmer Exam
Sun, Dec 11th 2016 3
Winning the IBM Collaboration Solutions Developer Competition 2016
Mon, Oct 3rd 2016 4
Creating ICS Calendar Feeds with XPages
Tue, Apr 12th 2016 9
3 XPages hints #3: Homepage and Performance improvements
Mon, Feb 29th 2016 10
Travelling 2.0: How your smartphone can assist you travelling easier and cheaper
Fri, Jan 15th 2016 11
Leaving the yellow bubble for a while
Sun, Jun 7th 2015 5
Simple way to make certain elements sticky in your web application (XPages example using OneUI)
Sun, Apr 19th 2015 9
Top 10
Travelling 2.0: How your smartphone can assist you travelling easier and cheaper
Fri, Jan 15th 2016 11
3 XPages hints #3: Homepage and Performance improvements
Mon, Feb 29th 2016 10
My top 5 wishlist for IBM Notes / IBM Domino Designer, which ones are yours?
Wed, Aug 6th 2014 9
Simple way to make certain elements sticky in your web application (XPages example using OneUI)
Sun, Apr 19th 2015 9
Creating ICS Calendar Feeds with XPages
Tue, Apr 12th 2016 9
Convert Number to String to Number
Thu, Aug 4th 2011 6
3 XPages hints #2
Wed, Apr 30th 2014 5
Creating a test environment: the easy way
Tue, Jun 3rd 2014 5
Leaving the yellow bubble for a while
Sun, Jun 7th 2015 5
How to use the OneUI V2.1 Framework without ExtensionLibrary
Thu, Apr 5th 2012 4


XPages Configuration Framework
Twitter Google+ Facebook LinkedIn Addthis Email Gmail Flipboard Reddit Tumblr WhatsApp StumbleUpon Yammer Evernote Delicious
Frederic dehedin    

By now i think every Domino/Notes developer created at least 1 or more XPages applications. Developers who are developing XPages applications on a regular basis probably using their own frameworks (or using others) as a base of all their applications.

In this post i share my own configuration framework, which i use in my recent developed applications.. tweaking it here and there.. i hope it will give some of you a kick start for 2014..

So whats the benefit? Using this framework will let you easily create good performing and sortable selection lists (and other configuration items).

configuration-framework

 

 

Description

I very rarely use SSJS. Java became my favourite, even compared to Lotusscript.. So in my NSF you find several Java Classes. Don’t worry, there are only some of them which are relevant for this framework:

App

In this class i use mainly lotus.domino classes. The main functions are returning ViewNavigators, DocumentCollections, etc. I would tag this class as a database connector..

ConfigController

This class builds the list of configuration items. This bean will be placed in the application scope in order to keep it in the memory only once.
The configuration classes in the lists have to implement the IConfiguration interface.

Configuration

This is a typical configuration item with label and value attributes. It implements the “IConfiguration” Interface.

Room

This is just an example for a variation of the Configuration class. By inheriting from the Configuration class, it implements also the IConfiguration Interface, the other attributes (e.g. Address Object) are totally customizable. Just remember when you add other classes like the Room class: You have to adjust the ConfigController’s init method, in order to fill the object’s values from the custom form..

FacesConfig

As mentioned above, the ConfigController sits in the application scope..

<managed-bean>
   <managed-bean-name>
    configController
   </managed-bean-name>
   <managed-bean-class>ch.belsoft.config.ConfigController
   </managed-bean-class>
   <managed-bean-scope>application</managed-bean-scope>
   <managed-property>
      <property-name>app</property-name>
      <value>#{app}</value>
   </managed-property>
</managed-bean>
<managed-bean>
   <managed-bean-name>app</managed-bean-name>
   <managed-bean-class>ch.belsoft.App
   </managed-bean-class>
   <managed-bean-scope>application</managed-bean-scope>
</managed-bean>

Advantage:

  • Only 1 Object in the server’s memory (low server load, good performance)

Disadvantage(s):

  • every user sees the same configuration entries (reader fields won’t work with this framework or have to be implemented in another way)
  • on ¬†XPiNC the application scope behaves like session scope, so no advantages here with the performance (initial loading)

Although the disadvantages outnumber the advantage, the fact that i have only 1 ConfigController object and that the whole configuration is red from the Database only once, is a huge advantage..

Important: Keep in mind that changes to the configuration has now effect until you press the button “Reset Config”. Making this button visible only for [Administrator] would be a good idea..

Instructions

  • Download the NSF File with the link below
  • Sign the NSF File and place it to a server
  • Notes Client: Creating and changing of configuration entries
  • Web / XPage: open the NSF (default xpage: “start.xsp”) and check out the sample implementation of the configuration entries

Download

Download Lotus Notes nsf File

 

PS: I will post this to OpenNTF as well as soon i got the paperwork done :-)



---------------------
http://www.fdehedin.ch/309/xpages-configuration-framework
Jan 06, 2014
2 hits



Recent Blog Posts
3
Tipps and Tricks for the Java SE 8 Programmer Exam
Sun, Dec 11th 2016 4:17p   Frederic Dehedin
Recently i studied for the Java SE 8 Programmer I Exam (Java OCA for short) and was glad that i passed it on the first go. Although i’ve been practicing programming in Java several years, i decided to sustain my practical knowledge with some theoretical background and i’m happy to share my experience in this blog […]
4
Winning the IBM Collaboration Solutions Developer Competition 2016
Mon, Oct 3rd 2016 12:23p   Frederic Dehedin
Just yesterday we came back to Switzerland after our 3 Weeks holidays in Indonesia. We were in Bali, Nusa Lembongan (Island next to Bali) and Rote Island (Timor). So on the 16. September 2016, after a beautiful day on the boat diving with Manta Rays, i was eager to check the contest results and received […]




Created and Maintained by Yancy Lent - About - Planet Lotus Blog - Advertising - Mobile Edition