XPage : Dynamic field Binding

In my application I wanted to bind a viewScope variable with the field, but the key was not static. The viewScope key was generated based on some business logic. To solve this problem, I created a dataContext variable (whose name is constant) and computed the value of this (data context) variable. I wrote the code there to calculate the key name. Finally I binded the field with the viewScope variable as follows:

The dataContext variable:

The field binding:

Same technique can be extended to other objects like NotesDocument, NotesViewEntry, etc.

One thought on “XPage : Dynamic field Binding

  1. Hi,
    Seems you know lot about Lotus Notes and have done Android as well. I have a question. I want to access Lotus Notes i.e get and set meeting from Android application.
    I am getting exception for integrating java code in Android. How can I make this possible.
    I tried creating jar for java code but i am unable to run it.

    Please help.

Leave a Reply to Shraddha Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">