Feb 23, 2015, 9:18 AM
298 Posts

Recorded Webinar: One Notes Developer's Journey Into Java

  • Category: Other
  • Platform: All
  • Release: All
  • Role: Developer
  • Tags: JAVA
  • Replies: 3
If you missed the presentation by Howard Greenberg on February 17th you can now watch the recording and download the sample application. Learn about one long-time Notes developer's journey using a Java Managed Bean and why. Discover how a Bean allowed the data to be cached in memory allowing for quick access to user-selected data subsets. Learn how different Java collections like HashMaps, ArrayLists and TreeSets can be used to build in-memory objects of your data. See how using a Managed Bean can simplify and greatly speed up your XPages applications! Come get gently led down the path to the pot of Java waiting at the end of the rainbow!

To watch the recording, view the slides, or download the sample application go to:
Feb 26, 2015, 6:58 AM
19 Posts
bean - write to notes object

in the presentation is stated that it is unwise to write to a notes object (e.g. a notes document) allthough some people have written beans to do so

does anyone have an example how to write/save to a notes document via a managed bean?

Feb 26, 2015, 11:23 AM
298 Posts
That is not what I said or at least meant to say
What you can't do is store any Domino object in your bean. You can get a Domino document, change it, and save it with no issues. But you can save a Domino document as part of the bean. You have to do all your interaction within the method calls. What you could save would be the document unid or some other identifier. Same is true with any Domino object.

Feb 27, 2015, 11:25 AM
453 Posts
What Howard said...

I tried storing a Database Object in a Bean - bad idea. However, I have an application scope Bean that stores the ReplicaID's of several databases that are called on often so I can open the DB with the replica ID. As a method of the bean I open the database by Replica ID and pass the database object back to the calling method and that works fine.  In my application I have a Master DB that contains all the XPages Stuff and it accesses any number of application databases. So I create a view of application in the Master with a document for each application which contains among other things the DB RepID. So the Bean as an Application Scope bean only has to cycle through the list of applications one on load and is now available to everyone in the application. Because the list of applications seldom changes the Bean is only loaded on server start-up or HTTP Restart. I have an admin button on the view of applications that forces an update to the Bean. In any case it sure works nicely and once I had it working I have kept finding additional methods that I wanted to add to the Bean and that becomes a pretty simple task because I have most of the tools already built into the Bean.

I'm not a JAVA Bean expert but making some headway in that direction.