Mindoo Blog - Cutting edge technologies - About Java, Lotus Notes and iPhone

  • XPages series #8: Dynamically creating the UI of an XPage in Java

    Karsten Lehmann  November 10 2009 11:11:23 PM
    This 8th part of the XPages series is more or less a link to a great blog posting that was just published my Tommy Valand.

    It demonstrates how you can create a dynamic web user interface by leveraging JSF features in your XPages application.
    In his example, Tommy produces a data table UIComponent with a snippet of Java code that is executed with the click on a button.

    Image:XPages series #8: Dynamically creating the UI of an XPage in Java

    I'm currently working on something similar for a customer project, but unfortunately I cannot say much about technical details at the moment.
    Basically, it's about dynamic application UI creation based on an abstract UI description. The system produces a dual-output: it dynamically creates the UI of an XPage, but it also creates a Java UI (e.g. a set of Swing components) with a similar form layout.
    Write once, run anywhere. :-)

    The concept includes its own data layer that works independent from Lotus Notes and has some fancy features like transaction logging (even for storing in Lotus Notes databases).

    I recommend that you take a look at Tommys posting and start thinking about your personal use case for this. Anything is possible.

    In my next blog series posting I'm going to write about my own bean manager for managed beans that I needed as a workaround for security limitations when running an XPages application in the Lotus Notes client.
    Comments

    1Tommy Valand  11/11/09 8:01:45 AM  XPages series #8: Dynamically creating the UI of an XPage in Java

    Thanks for the linky :)

    The buttons actually only change the sessionScope variable that is the Data Source of the dynamic Data Table, then do a partial refresh on the table, based on its id.

    The DataTable is created on Page Load, so that it doesn't have to be recreated every time an update happens.

    2RobShaver  11/13/09 6:32:06 PM  XPages series #8: Dynamically creating the UI of an XPage in Java

    My use case is a Domino based content management system where the content owner can modify the UI via the web browser.

    3Karsten Lehmann  11/13/09 6:47:15 PM  XPages series #8: Dynamically creating the UI of an XPage in Java

    Hi Rob,

    great idea! I was already wondering when the first one would come up with it. That should be possible to build, either with a set of repeater controls or with a completely dynamic approach that generates a UIComponent tree via code.

    When you use the repeater controls, just don't iterate over the data, but over a UI description instead (e.g. a list of Java objects that describe what to render in the web page).

    That should be pretty powerful with the right architecture.

    Best regards,

    Karsten

    4Mario Gutsche  4/13/10 3:44:27 PM  XPages series #8: Dynamically creating the UI of an XPage in Java

    Hi,

    thanks for this article.

    For my bachelor thesis i'm developing a xpage-portal and want to realise the portlets/widgets as custom components that will be added dynamically to the portal-page.

    Problem is: normal xsp components can be created with SSJS but custom component are UIIncludeComposite-Objects, that need a FacesPageDriver set and i have no idea how to get this Object via SSJS, i'm already digging through the decompiled sources without success.

    Do you know how to get the PageDriver?

    Best regards,

    Mario

    • Remember me