Introduction to using IBM XPages Mobile Controls.
Video versions of the presentation can (soon) be viewed on David Leedy's Notes in 9 (notesin9.com). Red Pill development (www.redpilldevelopment.com) also offers the presentation as an on-site (4hr) workshop.
2. www.redpilldevelopment.comlearn. do. dream.
Peter Presnell
CEO – Red Pill Development
peter.presnell@redpilldevelopment.com
twitter.com/PeterPresnell
google.com/111498578987618903765
www.facebook.com/peter.presnell
www.linkedin.com/in/peterpresnell
www.slideshare.net/ktree19
3. www.redpilldevelopment.comlearn. do. dream.
Why Mobile?
• In 2012 the total number of
smartphones & tablet devices shipped
exceeded that of PCs. (Morgan Stanley
Research)
• By the end of 2017 there will be more
mobile devices on Earth than people.
(Cisco)
• Worldwide business mobile devices are
projected to grow from 889 million in
2012 to 1.4 billion by 2016. (Radicati)
• 81% of employees use mobile devices
for business use. (Enterasys)
• CIOs expect over 20% of their
employees to use tablets instead of
latops by 2013. (Gartner)
• By 2015 mobile application
development will account for 80% of all
development activities. (Gartner)
21. www.redpilldevelopment.comlearn. do. dream.
Single Application Page
<xe:singlePageApp>
Container for mobile application
Property Description
id Unique identifier
selectedPageName The initial mobile page to be displayed (Required)
22. www.redpilldevelopment.comlearn. do. dream.
Mobile Page
<xe:appPage>
Individual page used within mobile application
Property Description
autocreate true : Children created on server when page is loaded
id Unique identifier
keepScrollPos true (default): The scroll position is retained when navigating
between pages
pageName The name used to identify the page
resetContent True: Page content is recreated each time the page is
displayed
26. www.redpilldevelopment.comlearn. do. dream.
Page Heading
<xe:djxmHeading>
Heading displayed at top of a page
Property Description
label Text to be displayed in header
back Text to be displayed in the back button
moveTo Application page to navigate to when back button is pressed
transition Transition to use when navigating back
Facet Description
actionFacet Used to place additional actions on the right of the header
(typically use <xe:toolBarButton>)
28. www.redpilldevelopment.comlearn. do. dream.
Tool Bar Button
<xe:toolBarButton>
Action button for heading
Property Description
arrow Displays a previous or next arrow
back true: Navigate to previous page
callback (client) javascript function called when transition is
completed
href url of a web page to navigate to
hrefTarget Target location for new page (e.g. _blank _self)
icon Icon to be displayed
iconPos Controls positioning of the icon
moveTo Application page to move to
29. www.redpilldevelopment.comlearn. do. dream.
Tool Bar Button
<xe:toolBarButton>
Property Description
selected (for toggle buttons) true: mark button as initially selected
toggle true: Enables toggle button behaviour
transition Type of animated transition to be used
transitionDir Direction of the transition
url url for HTML or JSON to be loaded into an application page
urlTarget The id of the control to host the url content
Event Description
onClick Executes when button is clicked
30. www.redpilldevelopment.comlearn. do. dream.
Move To Application Page
<xe:moveTo>
Controls navigation to a new application page
Property Description
direction Direction in which transition is applied
forceFullRefresh true: Content of page is refreshed before being displayed
targetPage Application page to be displayed
transitionType Type of transition to display
34. www.redpilldevelopment.comlearn. do. dream.
Static Line Item
<xe:djxmLineItem>
Provides a list item (mainly for navigation)
Property Description
icon Icon displayed to the left of the label
id Unique identifier
label Text to be displayed (left aligned)
moveTo Application page navigated to when the item is selected
rightText Additional text (right aligned)
transition Type of transition effect used when item is selected
38. www.redpilldevelopment.comlearn. do. dream.
Tab Bar
<xe:tabBar>
Container for action buttons
Property Description
barType segmentedControl:display as buttons
tabBar (default): – display as tabs
id Unique identifier
inheading Uses tab bar as heading (only if barType=segmentedControl)
39. www.redpilldevelopment.comlearn. do. dream.
Tab Bar Button
<xe:tabBarButton>
Button for mobile devices
Property Description
icon1 Icon displayed when button is unselected
icon2 Icon displayed when button is selected
iconPos1 Controls positioning of unselected icon (icon1)
iconPos2 Controls positioning of selected icon (icon2)
id Unique identifier
label Button text
selected true: button is initially displayed as selected
selectOne true (default): Only one button can be selected at a time
transition Type of transition effect used when moving to another page
43. www.redpilldevelopment.comlearn. do. dream.
Toggle Switch
<xe:djxmSwitch>
Mobile on/off state
Property Description
id Unique identifier
leftLabel Text displayed when switch is in “on” state
rightLabel Text displayed when switch is in “off” state
value Initial value
Event Description
onStateChanged Triggered when switch is toggled on/off
onTouchEnd Triggered when user lifts finger off control
onTouchMove Triggered when user drags finger across control
onTouchStart Triggered when user touches the control
47. www.redpilldevelopment.comlearn. do. dream.
Outline (mobile)
<xe:outline>
Tree structure outline/menu
Property Description
id Unique identifier
renderType For mobile set to
com.ibm.xsp.extlib.MobileOutlineNavigator
treeNodes List of (tree) nodes that make up the outline structure
<xe:basicContainerNode>
<xe:basicLeafNode>
treeRenderer Renderer used to visualize the outline
For mobile set to <xe:MobileAccordianMenu>
49. www.redpilldevelopment.comlearn. do. dream.
Basic Container Node
<xe:outline>
Parent node
Property Description
children List of (tree) nodes that make up this branch of the outline
<xe:basicContainerNode>
<xe:basicLeafNode>
expanded true: child nodes are initially shown expanded
image Icon to be displayed to the left of this entry
label Text to be displayed for entry
onClick Code executed when node is clicked
(Only executed when href is empty)
selected true: node is styled as a selected node
50. www.redpilldevelopment.comlearn. do. dream.
Basic Leaf Node
Child node
Property Description
href url to navigate to (use #pagename)
image Icon to be displayed to the left of this entry
label Text to be displayed for entry
onClick Code executed when node is clicked
(Only executed when href is empty)
selected true: node is styled as a selected node
57. www.redpilldevelopment.comlearn. do. dream.
Data View (mobile)
<xe:dataView>
View component
Property Description
categoryColumn Defines one or more columns used to display category value
collapsibleCategory true: Categories can be expanded/collapsed
data Datasource used to provide data for the view
extraColumns Defines one or more additional columns to be displayed
first Specifies the index of the first row to be displayed
iconColumn Defines the icon to be displayed in the icon column
openDocAsReadOnly true: document are opened in read-only mode
pageName Page used to open the document when the summary label is selected
rows Number of rows to be displayed
summaryColumn Defines the column used for the summary label
var Variable used to access the current row
58. www.redpilldevelopment.comlearn. do. dream.
Data View (mobile)
<xe:dataView>
Facet Description
categoryRow Alternate facet used to defined category columns
detail Details to be shown below summary column
icon Alternate facet used to define icon colum
pagerBottom Center aligned area below view data
pagerBottomLeft Left aligned area below view data
pagerBottomRight Right aligned area below view data
pagerTop Center aligned area above view data
pagerTopLeft Left aligned area above view data
pagerTopRight Right aligned area above view data
summary Alternate facet used to define summary column
60. www.redpilldevelopment.comlearn. do. dream.
Category Column (mobile)
<xe:viewCategoryColumn>
Used to display to content of category rows
Property Description
columnName Column from which the value is retrieved
61. www.redpilldevelopment.comlearn. do. dream.
Icon Column (mobile)
<xe:viewIconColumn>
View component
Property Description
columnName Column from which the value is retrieved
icons.iconEntry.selected true: icon should be displayed.
Used when selectedValue is absent
icons.iconEntry.selectedValue Column value that results in this icon being displayed
icons.iconEntry.url url of the image
63. www.redpilldevelopment.comlearn. do. dream.
Adding More Rows
<xe:addRows>
Adds additional rows to a data viewer
Property Description
disabledFormat The type of action to take on the disableId control when
there are no more rows available
disableId Id of the control to be disabled when no more rows are
available
for id of the the data view being controlled
rowCount The number of rows to be added
67. www.redpilldevelopment.comlearn. do. dream.
Form Table (mobile)
<xe:formTable>
Form container
Property Description
disableRequiredMarks true: Doesn’t display * next to required fields
fieldHelp true: Help link is provided for each row
formDescription Additional text describing the form - placed below formTitle
formTitle Title placed at the top of the form
labelPosition Default placement of labels relative to input controls
For mobile this is usually set to above
68. www.redpilldevelopment.comlearn. do. dream.
Form Layout Row (mobile)
<xe:formRow>
Form row
Property Description
for Id of input control used to edit the data
label Label to be associated with the input control
labelPosition Location of label relative to the input control
default: above (form mobile theme)
75. www.redpilldevelopment.comlearn. do. dream.
1: Define Form/Views
Field Description
Title Text: Application Title (Required)
Description Text: Description of application
Type Keywords: Type of application
Stage Keywords: Stage of development (Dev, QA, Production)
Department Keywords: Department requesting application
View Description
Applications Title (a), Type, Stage, Department, Description
By Department Department (c), Stage(c), Title (a), Type, Description
By Type Type (c), Stage(c), Title (a), Department, Description