Skip to main content link. Accesskey S
  • Anonymous
  • Log on
  • Help
  • IBM logo
  • IBM Connections wiki
  • All Wikis
  • Home
  • Community Articles
  • Product Documentation
  • Learning Center


Search

Advanced Search

Categories

Tag Cloud

  • 1.0
  • 1.0.x
  • 2.0
  • 2.0.1
  • 2.0.1.1
  • 2.0_media
  • 2.5
  • 2.5_deployment
  • 2.5_media
  • 2.5_performance
  • 3
  • 3.0
  • 3.0.1
  • 3.0.1_media
  • 3.0_media
  • 3_deployment
  • 8.1.1
  • 8.2
  • activities
  • administrators
  • api
  • best_practices
  • blogs
  • bookmarks
  • business_card
  • cluster
  • communities
  • community
  • community_manager
  • connections
  • connections_3
  • connections_301
  • customization
  • customize
  • customizing
  • demos
  • deploying
  • deployment
  • deployments
  • developers
  • dogear
  • Domino
  • Edge server
  • education
  • error messages
  • files
  • forums
  • getting_started
  • Help
  • home
  • home_page
  • homepage
  • how-to
  • HTTP server
  • ibm
  • index
  • installation
  • integration
  • iOS
  • ipad
  • iWidget
  • J2EE
  • javadoc
  • lc3.0
  • learning
  • lotus-connections
  • mml
  • mobile
  • Notes
  • performance
  • person_card
  • Portal
  • portlet
  • portlet_factory
  • profiles
  • proxy server
  • quickr
  • Redbooks
  • rest
  • reverse proxy server
  • Sametime
  • scenarios
  • search
  • security
  • self-paced
  • SSO
  • tags
  • test_infrastructure
  • troubleshooting
  • tuning
  • video
  • VideoFest
  • videos
  • WAI
  • WAS
  • web_seminar
  • WebAppIntegrator
  • WebSphere
  • widgets
  • wikis
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 > IBM Redbooks: Customizing Lotus Connections 2.0 > 2.3.1 A Basic iWidget
Rate this article 1 starRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

2.3.1 A Basic iWidget 

expanded Abstract
collapsed Abstract
No abstract provided.
Back to parent topic 2.3 Developing widgets for the Lotus Connections Homepage

The simplest place to start for a basic iWidget is to develop a "Hello world" widget. This widget does nothing more than show a piece of text in the iWidget container that says "Hello World!" To create the widget, you need only one file, and that file can be hosted in a basic http server such as IBM IHS or Apache server. The file itself is an XML file. This XML file is the iWidget descriptor and provides information about the iWidget to the framework.

The following example shows the XML descriptor file for a basic "Hello World!" iWidget.

<iw:iwidget name="helloWorld" xmlns:iw="http://www.ibm.com/xmlns/prod/iWidget"

 

<
iw:content mode="view"
 

<
![CDATA[
<
div
 

<
div id="helloWorld"
 
Hello World!</div
 

<
/div
 

]]>
<
/iw:content
 

<
/iw:iwidget
 

Begin the XML descriptor with the iWidget declaration that contains a name for the iWidget. Within this declaration, place the iWidget attributes. The only attribute that we use in our example is the iw:content attribute, which contains an HTML template for the iWidget itself. This template is copied by the framework and inserted into the DOM of the page where the iWidget is deployed. For applications that provide an iWidget container, this template is placed inside this container.

This is very basic widget. The XML descriptor file can be used to import JavaScript libraries and to pass options to the framework. This example does nothing more than provide a small piece of HTML that is used to render the "Hello World!" message. You can use the content section of this iWidget descriptor to build a more complex template and to include inline JavaScript and CSS for styling the HTML. It is important to note that any HTML in this content section ultimately is subject to the existing CSS styles in the page on which the iWidget is rendered. This is useful in that an iWidget deployed on a page in one application can inherit its look and feel. The same iWidget will look different when deployed in a different application.

Back to parent topic 2.3 Developing widgets for the Lotus Connections home page
Next topic 2.3.2 Importing a JavaScript resource file for a basic iWidget

(Edited by DW)


expanded Article information
collapsed Article information
Category:
IBM Redbooks: Customizing Lotus Connections 2.0
Tags:

This Version: Version 13 January 13, 2009 1:56:53 PM by Jennifer Heins  IBMer

expanded Attachments (0)
collapsed Attachments (0)

 


expanded Versions (13)
collapsed Versions (13)
Version Comparison     
Version Date Changed by               Summary of changes
This version (13) Jan 13, 2009 1:56:53 PM Jennifer Heins  
12 Jan 7, 2009 5:36:51 PM Mike Ebbers  
11 Dec 18, 2008 3:36:28 PM Debbie Willmschen  
10 Dec 18, 2008 3:35:32 PM Debbie Willmschen  
9 Dec 18, 2008 3:34:41 PM Debbie Willmschen  
8 Dec 18, 2008 3:33:59 PM Debbie Willmschen  
7 Dec 18, 2008 3:23:34 PM Debbie Willmschen  
6 Dec 18, 2008 3:19:46 PM Debbie Willmschen  
5 Dec 18, 2008 3:16:20 PM Debbie Willmschen  
4 Nov 8, 2008 3:45:10 PM Mike Ebbers  
3 Sep 4, 2008 6:34:14 AM Jamie J O'Leary  
2 Sep 4, 2008 6:30:52 AM Jamie J O'Leary  
1 Sep 4, 2008 5:26:35 AM Jamie J O'Leary  
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedSubscribe to RSSHelpAbout
  • All Lotus and WebSphere Portal wikis
  • IBM developerWorks
  • IBM Software support
  • IBM Social Business User Experience Blog
  • IBMSocialBizUX on Twitter
  • IBMSocialBizUX on Facebook
  • Lotus product forums
  • IBM Social Business UX 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