Xpages Custom Controls How do ya

Ok so I am running through a bunch of the Xpages Tutorials and examples that folks have been kind enough to blog about. I am starting to work on the design of the next version of our organization’s Intranet. Currently we use subforms to house the basic Header, Navigation, and Footer for the Intranet design.

Welcome to Xpages. I have walked through Declan’s wonderful tutorial (Learning XPages Part 1 : Application Objectives | Dec's Dom Blog) which exposes the IBM OneUI design through use of themes and custom controls embedded on an Xpage.

Questions

  1. Can I pull custom controls across databases? (right now subforms can do this)

  2. How do I do this?

  3. Should I be pulling in computed custom controls? (not sure where to do this) or computed Xpages?

I know this is probably basic stuff but that is where I am at right now. :slight_smile:

Thanks in advance for your input.

Elijah

Subject: Couldn’t you do this…

This is just basic Notes design inheritance. It doesn’t give you full computed capability, but it does let you have one “master copy” of the control so you only have to update it in one place.

  1. Create a master repository db, called “CustomControlDb”, mark it as a template.

  2. Create the custom control in the CustomControlDb

  3. Copy the custom control design element from the CustomControlDb and paste it into your database. This should cause it to be marked as inheriting from CustomControlDb.

Repeat step #3 for the other databases you want to have the control appear in.

Then if you want to update the custom control you simply update the copy in the master repository db and perform a design refresh on the other database(s).

Subject: Currently not possible, however…

Sharing custom controls between applications isn’t possible and that’s not to say we haven’t thought about it. We had done some development in this area but we never managed to get it working satisfactorily so it was pulled.

We are thinking about an alternative solution for this but it’s real early days.

Now sharing Themes and Styles is possible and creating your own theme which sits on the server file system is probably the best solution here. You can then use this theme for any number of applications.

Alternatively, you could use one application for your styling then use that to control the styling on others. But this is less straight forward and requires more work to get right.

Hope this helps.

Regards,

Paul.

Subject: I think I get it…but there has to be a way

So currently using Xpages there is no simple way to share design elements (custom control) across databases.

Right now I can make an update to a javascript navigator in one subform and all the databases pulling from this subform are updating.

Is there really no equivalent to this? I see the power of Xpages and I am just starting to get a feel for it but there has got to be some way to do this.

I don’t want to spend hours building a design with custom controls only to have to copy the controls into every database.

When you create a new custom control there is a dropdown to specify the database what is that for?

Elijah

Subject: That dropdown…

That dropdown to specify which application to create you CC is just that. It’s not a custom control sharing feature.

p.

Subject: Thanks for information

I appreciate the candor and the timely response. I will propose this feature in the IdeaJam site to see if there is interest.

Elijah