Skip to main content link. Accesskey S
  • Translate Page ▼
  • Anonymous
  • Log on
  • Help
  • IBM logo
  • Lotus Notes and Domino Application Development wiki
  • All Wikis
  • Home
  • Community Articles
  • Product Documentation
  • Learning Center


Search

Advanced Search

Categories

Tag Cloud

  • 6.0
  • 6.5
  • 8.0
  • 8.5
  • 8.5.1
  • 8.5.2
  • 8.5.3
  • action bar
  • Agents
  • Ajax
  • app dev
  • beginner
  • C&S
  • calendaring and scheduling
  • client
  • composite applications
  • Controls
  • converters
  • css
  • Custom controls
  • Data Binding
  • db2
  • design elements
  • dialog boxes
  • Documents
  • Dojo
  • Domino
  • Domino Designer
  • Domino Designer 8.5
  • DXL
  • Eclipse
  • error handling
  • errors
  • extensions
  • FAQ
  • Forms
  • formulas
  • getting started
  • globalization
  • Help
  • html
  • Installation
  • interface
  • internationalization
  • Java
  • JavaScript
  • JSF
  • localization
  • Lotus Domino Designer
  • LotusScript
  • LotusSphere
  • LotusTechInfo
  • menu bar
  • Mobile
  • new user
  • Notes
  • Notes 8
  • notes.ini
  • NSD
  • OpenNTF
  • partial update
  • performance
  • Pickers
  • Portal
  • presentations
  • programming
  • Redbooks
  • Requested Articles
  • roadmap
  • rooms and resources
  • samples
  • Scripting
  • security
  • tabs
  • templates
  • themes
  • Tips
  • toolbar
  • troubleshooting
  • tutorials
  • validation
  • variables
  • video
  • VideoFest
  • View
  • view control
  • ViewPanel
  • Views
  • web
  • Web apps
  • Web services
  • webdev
  • x-pages
  • XML
  • Xpage
  • XPages
  • XPages Extensibility API
  • XPages Extension Library
  • xsp-config
  • データソース
InformationInformation
You are currently viewing machine translated content. IBM translation might be available. Click IBM Translated Product Documentation to see what is available.X


Home > Designing XPage Applications > New 8.5.1 Design Feature Cleans Up XPage Design When Using Custom Controls
Rate this article 1 starRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

New 8.5.1 Design Feature Cleans Up XPage Design When Using Custom Controls 

expanded Abstract
collapsed Abstract
No abstract provided.

If you have done any XPage development at all you know the power of using custom controls in your XPage design.  One issue though is if you are using many custom controls on an XPage it is difficult to tell where the XPage design elements start/end and the Custom Control elements start/end.

Version 8.5.1 introduced a new design element that slipped under the radar, but I have found very useful in upgrading my XPage application designs.

This is the new Design Definition property when creating Custom Controls.

As an example look at the design of the following XPage in the XPage design editor.

 

This is an XPage that is made up of 5 Custom Controls.

  • A Header
  • Name Fields
  • Address Fields
  • Buttons
  • Footer

Just looking at the design does not tell developers that the elements are Custom Controls.  Plus if this was a large input design, with a big graphics header, designer screen real estate could become a premium.

So what if you could just indicate in the XPage design that there was a Custom Control included without displaying the Custom Control contents?

This is what the new Design Definition Custom Contorl property brings to the table.

To use this new property edit the Custom Control in an 8.5.1 Designer client.  In the Properties view of the Custom Control click on the new Design Definition tab.

This opens an editor that prompts you to "Enter custom XSP markup:"

The XSP markup that is entered in this dialog will be displayed in the XPage design interface instead of the defined elements of the Custom Control.

So here in the Header custom control instead of displaying the company name with the large font I simply want to indicate that this is now a place holder for my Header custom control.

I input the following XSP markup in the Design Definition property


http://www.ibm.com/xsp/core">


Header Custom Control

The code has to be valid XSP markup so it starts with the xml declaration tab and the XSP view tag.

The only other markup added is the XSP panel control with text in between the tags that will describe the functionality of the Custom Control.  Now when this custom control is added to an XPage design instead of seeing all of the Custom Control elements designers will only see the panel with the added text.

Tip:  An easy way to make sure you get the correct markup is to add the control to be used to the design view, then switch to the Source view and cut/paste the correct syntax.

The completed Custom Control looks like the following.

When looking at an XPage design that includes the Custom Control it now looks like the following.

This allows developers to know that there is a custom control there but without taking up a lot of design real estate.

If the same technique was added to the other Custom Controls that make up this XPage design, it would look like the following in the XPage designer

   

Each of the Custom Controls can be double clicked upon to launch the Custom Control editor to change the contents of the Custom Control.

Nothing changes about the features and functionality of the added Custom Control, all of it properties are still available in the XPage design, it simply un-clutters the design interface.  There is no change in functionality when the XPage is rendered in the Notes or Browser client

You can use any valid XSP design element in the Design Definition property of the Custom Control but as you can see in the following graphic, the Panel control provides a nice placeholder to be displayed in the XPage designer.

You do not have to implement this feature in every custom control added to the page, they can be mixed and matched as the developer requires.

An excellent resource to see how this new feature is implemented is the 8.5.1 Discussion Template.

A special thanks to Steve Castledine for helping me understand this new feature. 

The example applciation that I use here can be downloaded from my website here, but the Discussion Template is a better example once you understand how this new feature is being used.


expanded Article information
collapsed Article information
Category:
Designing XPage Applications
Tags:
XPages, Custom Controls

This Version: Version 1 February 23, 2010 2:28:20 PM by Paul Calhoun  
   
expanded Attachments (0)
collapsed Attachments (0)

 


expanded Versions (1)
collapsed Versions (1)
expanded Version Comparison
collapsed Version Comparison
     
Version Date Changed by               Summary of changes
This version (1) Feb 23, 2010 2:28:20 PM Paul Calhoun  
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Tip: When linking to articles use the original title, not the edited title. The alias for the link can be the edited title.
Go ElsewhereStay ConnectedSubscribe to RSSHelpAbout
  • All Lotus and WebSphere Portal wikis
  • IBM developerWorks
  • IBM Software support
  • Lotus Technical Information and Education Team Blog
  • Lotus Tech Info on Twitter
  • Lotus Tech Info on Facebook
  • Lotus product forums
  • Lotus Tech Info blog
  • IBM Collaboration Solutions
  • Recently added feedRecently added
  • Recently edited feedRecently edited
  • Recently added comments feedRecently Added Comments
  • Wiki Help
  • Forgot user name/password
  • Wiki design feedback
  • Content feedback
  • About the wiki
  • About IBM
  • Privacy
  • Contact IBM
  • IBM Terms of use
  • Wiki terms of use
Return to English
Arabic
Chinese Simplified
Chinese Traditional
French
German
Italian
Japanese
Korean
Portuguese
Russian
Spanish