introduction to xpages development 8 - admincamp€¦ · xpage and optional comment. 2. optionally...

87
© 2012 The Learning Continuum Company, Ltd This material can not be reproduced or distributed without the express permission of TLCC Introduction to XPages Development Workshop 1 Introduction to XPages Development Workshop

Upload: others

Post on 28-Mar-2021

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Introduction to XPages Development Workshop

1

Introduction to XPages Development Workshop

Page 2: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

2

Introduction to XPages Development Workshop > Instructors

Instructor

• Howard Greenberg – Teaching Notes and Domino since 1994 – Partner at TLCC, the Leader in Notes and Domino Training – And Now, the Leader in XPages Training

Page 3: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Agenda

Introduction to XPages Development Workshop > Agenda

• Understand XPages Architecture • Use Domino Designer to create XPages • Create your first XPage • Display Domino views and documents on XPages • Use Core controls to create and edit Domino documents • Demonstrations of advanced XPages techniques

Take the mystery out of XPages!

3

Page 4: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

• Four XPages Courses – JavaScript for XPages

Development – Developing XPages Using Domino

Designer 8.5 – XPages Development 2 for Notes

and Domino 8.5 – Mobile XPages for Domino 8.5

TLCC XPages Offerings

TLCC’s XPages Training

• Choose your learning method – Self-paced – Instructor Led Online – We come to you

20% off for Attendees - www.tlcc.com/entwickler

Page 5: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

5

Prerequisites

Introduction to XPages Development Workshop > Prerequisites

• Experienced Notes/Domino Developers • Minimal to no experience with XPages • Goal: Convert a basic Notes app to XPages

• Show a view • Display documents • Create/edit documents

Page 6: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Hands-on Activities

Introduction to XPages Development Workshop > Hands-on Activities

Will Have Time for Activities In Class • TLCC’s free Introduction to XPages

Development – self-paced course

www.tlcc.com/free-xpages-training

6

Page 7: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Introduction to XPages Development Workshop > Setup and Activity Databases > Preface and Setup

7

The Notes Application to be Converted

Page 8: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Introduction to XPages Development Workshop > Setup and Activity Databases > Preface and Setup

8

Setup and Activity Databases

Page 9: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Traditional Domino Design

Module 2 > Overview of XPages > Traditional Domino Design

9

Form and Document have a 1 to 1 relationship

Form

Document

View

Page 10: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

XPages Architecture

Module 2 > Overview of XPages > XPages Architecture

10

XPage

XPage Design Element

• XPages • Custom Controls • CSS • Themes

Compiled in Domino Designer

XSP Engine (Domino Server)

Browser or Notes Client

HTTP Request and Response

Presentation Layer:

Data Source

Documents Views

Page 11: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

11

Module 2 > Overview of XPages > CSJS and SSJS

Client-Side and Server-side JavaScript…

Page 12: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Programmable Events

Module 2 > Overview of XPages > Programmable Events

12

@DbLookup @Function in a Server-side JavaScript event

Page 13: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

• Domino Designer Perspective for XPage development • Creating an XPage • Adding and formatting text on an XPage • Adding a control to an XPage • Use the Outline view • Saving and previewing an XPage • Troubleshooting errors

Lesson: Creating an XPage

Module 2 > Creating an XPage

13

Page 14: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Domino Designer Perspective for XPage Development

Module 2 > Creating an XPage > Domino Designer Perspective for XPage Development

14

Applications Navigator: • Access and organize projects (nsf applications) • Expand and collapse applications and design elements • Double-click a design element (XPage) to open

Page 15: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Domino Designer Perspective for XPage Development

Module 2 > Creating an XPage > Domino Designer Perspective for XPage Development

15

XPage Editor: • Controls are dragged from the Controls palette • Design tab – view and edit design layout • Source tab – view and edit the source code

Page 16: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Module 2 > Creating an XPage > Domino Designer Perspective for XPage Development

16

Domino Designer Perspective for XPage Development

XPage editor in Source view

Page 17: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Domino Designer Perspective for XPage Development

Module 2 > Creating an XPage > Domino Designer Perspective for XPage Development

17

Other Views: • Outline view – Shows all elements in a hierarchical

layout • Properties view – Shows the properties for the

selected element • Events view – Add CSJS or SSJS to the selected

control/element • Controls Palette – Core, Container, Custom

Controls and user-added. Drag & drop to the XPage editor

• Data palette – Lists data elements for the current data source (Document or View). Drag & drop to the XPage editor

Page 18: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

1. Provide a name for the XPage and optional comment.

2. Optionally select the data source for the XPage (Document or View).

3. The required fields to define the data source are displayed.

4. Click [OK] to create the new XPage.

Module 2 > Creating an XPage > Procedure: Creating an XPage

Procedure: Creating an XPage

18

Page 19: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Module 2 > Creating an XPage > Adding and Formatting Text on an XPage

19

Adding and Formatting Text on an XPage

Page 20: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Module 2 > Creating an XPage > Procedures

20

Procedure: Creating an XPage

Procedure: Adding and Formatting Text on an XPage

Page 21: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Adding a Control to an XPage

Module 2 > Creating an XPage > Adding a Control to an XPage

Use any of the following methods to add a control to an XPage: • Drag & Drop from Controls palette

21

Page 22: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Adding a Control to an XPage

Module 2 > Creating an XPage > Adding a Control to an XPage

Use any of the following methods to add a control to an XPage: • Drag & Drop from Controls palette • Choose the control from the Create Control dialog

22

Page 23: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Use the Outline View to Select and Organize XPage Elements

Module 2 > Creating an XPage > Use the Outline View to Select and Organize XPage Elements

23

Page 24: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Use the Outline View to Select and Organize XPage Elements

Module 2 > Creating an XPage > Use the Outline View to Select and Organize XPage Elements

24

Page 25: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Use the Outline View to Select and Organize XPage Elements

Module 2 > Creating an XPage > Use the Outline View to Select and Organize XPage Elements

25

Page 26: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Use the Outline View to Select and Organize XPage Elements

Module 2 > Creating an XPage > Use the Outline View to Select and Organize XPage Elements

26

Page 27: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Troubleshooting Errors

Module 2 > Creating an XPage > Troubleshooting Errors

27

Page 28: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Module 2 > Creating an XPage > Previewing an XPage > Procedures

28

Procedure: Working with the Outline View

Procedure: Previewing an XPage in a Browser and the Notes Client (XPiNC)

Procedure: Adding Controls to an XPage

Procedure: Troubleshooting Errors

Page 29: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Module 2 > Creating an XPage > … Activity - Creating and Previewing an XPage

29

… Activity - Creating and Previewing an XPage

Page 30: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

• Adding a View control to an XPage • Setting the View control properties • Setting the Pager control properties • Setting View Column Header and View Column properties

Lesson: Display a Domino View on an XPage

Module 2 > Display a Domino View on an XPage

30

Page 31: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Procedures: Adding a View Control to an XPage

Module 2 > Display a Domino View on an XPage > Procedures: Adding a View Control to an XPage

31

Two methods to create a View Control:

• Method 1: Use the Controls palette

• Method 2: Use the Data palette

Page 32: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

32

Method 1 - Use the Controls Palette

Module 2 > Display a Domino View on an XPage > Method 1 - Use the Controls Palette

Page 33: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

33

Method 2 - Use the Data Palette

Module 2 > Display a Domino View on an XPage > Method 2 – Use the Data Palette

1

2

Page 34: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

View Control Properties

Module 2 > Display a Domino View on an XPage > View Control Properties

34

Page 35: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Module 2 > Display a Domino View on an XPage > View Tab

35

• Basic View control properties are set on the View tab • Default values for these settings are shown below

View Tab

Page 36: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Module 2 > Display a Domino View on an XPage > Procedure: Add a View Control to an XPage

36

Procedure: Add a View Control to an XPage

Page 37: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Pager Control Properties

Module 2 > Display a Domino View on an XPage > Pager Control Properties

37

Page 38: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Pager Control Properties - 7 Pager Samples

Module 2 > Display a Domino View on an XPage > Pager Control Properties - 7 Pager Samples

38

Pager Sample Example

Pager Sample 1

Pager Sample 2

Pager Sample 3

Pager Sample 4

Pager Sample 5

Pager Sample 6

Pager Sample 7

Page 39: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

39

Custom Pager Styles

Module 2 > Display a Domino View on an XPage > Custom Pager Styles

Page 40: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

View Column Header Properties

Module 2 > Display a Domino View on an XPage > View Column Header Properties

40

Page 41: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

View Column Properties

Module 2 > Display a Domino View on an XPage > View Column Properties

41

Page 42: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Module 2 > Display a Domino View on an XPage > Procedures: Pager and Column Properties

42

Procedure: Pager Control Properties

Procedure: View Column Properties

Page 43: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Module 2 > Display a Domino View on an XPage > … Activity - Display a Domino View on an XPage

43

… Activity - Display a Domino View on an XPage

Page 44: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Lesson: Display a Domino Document on an XPage

Module 2 > Display a Domino Document on an XPage

44

Page 45: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

1. New XPage dialog - check 'Add data source to the page':

i. Choose "Domino Document“ from drop-down 'Data source' field .

ii. Set appropriate values for 'Application' and 'Form' fields.

iii. Accept or change data source name.

2. Click the [OK] button.

45

Module 2 > Display a Domino Document on an XPage > Procedure: Add a Domino Document Data Source to an XPage

Procedure: Add a Document Data Source to a NEW XPage …

Page 46: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

1. XPage Properties Data tab. 2. Click [Add] button and choose Domino Document from menu. 3. Select application for the document data source. 4. Select Domino form for the data source. 5. The ‘Default action’ is to create a new document.

46

Module 2 > Display a Domino Document on an XPage > Procedure: Add a Domino Document Data Source to an XPage

Procedure: Add a Document Data Source to an EXISTING XPage

Page 47: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

47

Module 2 > Display a Domino Document on an XPage > Adding Controls for Fields in a Domino Document …

Adding Controls for Fields in a Domino Document …

• Approach 1: Add controls individually and then bind each control

• Approach 2: Use the Data palette to add the selected fields and automatically bind them

Page 48: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

48

Module 2 > Display a Domino Document on an XPage > Approach 1: Add Controls individually and then Bind each Control

Approach 1: Add Controls individually and then Bind each Control …

… using the Controls Palette (2 step process)

Page 49: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

49

Module 2 > Display a Domino Document on an XPage > Approach 2: Use the Data Palette to add Multiple Controls

Approach 2: Use the Data Palette to add Multiple Controls

Page 50: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

50

Module 2 > Display a Domino Document on an XPage > Procedure: Adding Controls for Fields in a Domino Document

Procedure: Use the Data Palette to add Multiple Controls

Page 51: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Procedure: Enabling Links in a View Control to Open Documents …

Module 2 > Display a Domino Document on an XPage > Procedure: Enabling Links in a View Control to Open Documents

51

Page 52: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Procedure: Enabling Links in a View Control to Open Documents

Module 2 > Display a Domino Document on an XPage > Procedure: Enabling Links in a View Control to Open Documents

52

Page 53: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Module 2 > Display a Domino Document on an XPage > Procedure: Create Links to Display Documents from View Control

53

Procedure: Create Links to Display Documents from View Control

Page 54: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

• Submit button - validates input, submits and saves data sources • Cancel button - submits XPages, no validation, no saving • Other buttons - code onclick event to specify what happens

Adding Navigation Controls to an XPage …

Module 2 > Display a Domino Document on an XPage > Adding Navigation Controls to an XPage

54

Page 55: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Module 2 > Display a Domino Document on an XPage > Procedure: Create a Submit and Cancel Button

Procedure: Create a Submit and Cancel Button

55

1

2

Page 56: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

56

Module 2 > Display a Domino Document on an XPage > Procedure: Adding Other Buttons to an XPage

Procedure: Adding Other Buttons to an XPage

1

2

Page 57: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

• Script to compute the value of the 'Visible' property – Return boolean True to show (not like the Hide When on a form!!!)

Hiding Controls on an XPage …

Module 2 > Display a Domino Document on an XPage > Hiding Controls on an XPage

57

Page 58: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Hiding Controls on an XPage

Module 2 > Display a Domino Document on an XPage > Hiding Controls on an XPage

58

Button will be displayed if document is in edit mode

Page 59: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Module 2 > Display a Domino Document on an XPage > Procedure: Adding Submit and Cancel Buttons

59

Procedure: Adding Submit and Cancel Buttons

Page 60: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Module 2 > Display a Domino Document on an XPage > … Activity - Display a Domino Document on an XPage

60

… Activity - Display a Domino Document on an XPage

Page 61: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Lesson: Creating and Editing Domino Documents

Module 2 > Creating and Editing Domino Documents using Core Controls

61

Page 62: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

62

Module 2 > Creating and Editing Domino Documents using Core Controls

Rich Text

1

2

Page 63: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Three tool bar types available for the new (in 8.5.2) CKEditor widget • Slim • Medium (default if no toolbar attribute is specified) • Large

63

Module 2 > Creating and Editing Domino Documents using Core Controls

Rich Text Editor Control Type …

Page 64: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

64

Module 2 > Creating and Editing Domino Documents using Core Controls

Rich Text Editor Control Type

Page 65: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Module 2 > Creating and Editing Domino Documents using Core Controls > Demonstration: Edit Controls

65

Demo: Edit Controls

Page 66: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

66

Module 2 > Creating and Editing Domino Documents using Core Controls > Combo Box and List Box Controls

Creating List Box and Combo Box Controls

Page 67: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

67

Module 2 > Creating and Editing Domino Documents using Core Controls > Combo Box and List Box Controls

List Box and Combo Box Properties

Page 68: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Combo Box and List Box Controls

Module 2 > Creating and Editing Domino Documents using Core Controls > Combo Box and List Box Controls

68

Page 69: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Module 2 > Creating and Editing Domino Documents using Core Controls > TIP: Copy Domino Form Field Choices for the List Import

69

Tip: Copy Domino Form Field Choices for the List Import

Page 70: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Computing Values for Combo Box and List Box Controls …

Module 2 > Creating and Editing Domino Documents using Core Controls > Computing Values for Combo Box and List Box Controls

70

1

2

Page 71: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Return the List of Values using the Schema Tab …

Module 2 > Creating and Editing Domino Documents using Core Controls > Return the List of Values using the Schema Tab

71

Page 72: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Return the List of Values using @Functions

Module 2 > Creating and Editing Domino Documents using Core Controls > Return the List of Values using @Functions

72

Page 73: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Module 2 > Creating and Editing Domino Documents using Core Controls > Note: Considerations when using @Functions in XPages

73

Note: Considerations when using @Functions in XPages

XPage @Functions are JavaScript… so JavaScript rules and syntax apply:

• Use commas for parameters, not semi-colons • Case-sensitive (@dbcolumn will not work) • Database parameter: use empty string for local db (or

@DbName) – or, use a two element array with server and db path

Page 74: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

• Horizontal or vertical layout.

Radio Button Group Control

Module 2 > Creating and Editing Domino Documents using Core Controls > Radio Button Group Control

74

Page 75: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Check Box Group Control

Module 2 > Creating and Editing Domino Documents using Core Controls > Check Box Group Control

75

• Each box can be individually selected or cleared • Multiple or single choice

Page 76: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Module 2 > Creating and Editing Domino Documents using Core Controls > Check Box Group Control

76

Tip: Remove Legacy Check Box and Radio Button Controls from Controls Palette

Page 77: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Module 2 > Creating and Editing Domino Documents using Core Controls > Demonstrations

77

Demo: Computing Values for Combo Box and List Box Controls

Demo : Using Check Box and Radio Button Group Controls

Page 78: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Module 2 > Creating and Editing Domino Documents on an XPage > … Activity - Editing Domino Documents on an XPage

78

… Activity - Editing Domino Documents on an XPage

DemoForm-4-4-4

Page 79: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Module 3 > Demonstrations of Advanced Techniques using XPages > Demonstrations of Advanced Techniques using XPages

79

Demonstrations of Advanced Techniques using XPages

Page 80: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

XPages Architecture

XPage Design Element

• XPages, Custom Controls • CSS, Themes

Compiled in Domino Designer

XSP Engine (Domino Server)

HTTP Request and Response

XPages Presentation Layer

Data Sources

Browser or Notes client

Domino

Domino Documents Domino Views

Page 81: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

XPages Architecture

XPage Design Element

• XPages, Custom Controls • CSS, Themes

Compiled in Domino Designer

XSP Engine (Domino Server)

HTTP Request and Response

XPages Presentation Layer

Data Sources

Browser or Notes client Delivered to Mobile Devices

Domino

Domino Documents Domino Views

Page 82: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

XPages Architecture

XPage Design Element

• XPages, Custom Controls • CSS, Themes

Compiled in Domino Designer

XSP Engine (Domino Server)

HTTP Request and Response

XPages Presentation Layer

Data Sources

Browser or Notes client

JDBC

IBM DB2 Oracle MS SQL

Domino

Domino Documents Domino Views

Delivered to Mobile Devices

Page 83: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Skills Needed for XPages Development

Notes and Domino Application Development – Domino Object Model (LotusScript or Java)

JavaScript Web Development

– HTML and CSS

XPages skills You don’t need to be a Java Guru!

– Create great XPages apps with no Java code … but … – There is clearly a place for Java in XPages

Java Libraries Java beans

Page 84: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

The XPages Developer Progression

1 - Drag and Dropper: • Simple Actions • Some JavaScript • Convert existing Notes apps to XPages

2 - SSJS Coder: • Rewrite LotusScript business logic in Server-side JavaScript • Use Source Pane more • Use CSS to style XPage • New apps

3 - The Java Guru: • Java - beans • MVC architecture – separate code vs. presentation • Pull in data from other sources

– Relational databases – Web Services

Not everyone will get to The Java Guru level – and that is OK!!!

Page 85: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

ILO April 17th

85

GOAL: Develop XPages Applications

Module 4 > Where to Go From Here > Skill Path to Develop XPages Applications

Special Offer for Attendees: www.tlcc.com/entwickler

Page 86: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

Drawing for a Course!!!

86

Page 87: Introduction to XPages Development 8 - AdminCamp€¦ · XPage and optional comment. 2. Optionally select the data source for the XPage (Document or View). 3. The required fields

© 2012 The Learning Continuum Company, Ltd – This material can not be reproduced or distributed without the express permission of TLCC

87

Q and A