Escolar Documentos
Profissional Documentos
Cultura Documentos
org
David Leedy
Mark Roden
Senior Consultant for PSC Group LLC. XPages and jQuery Enthusiast NotesIn9 Contributor DC Users Group Organizer http://xomino.com ! demo.xomino.com Twitter: @MarkyRoden
NotesIn9.com
Tuesday, June 4, 13
David Leedy
Corporate Developer NotesIn9 ScreenCast ! http://notesin9.com ! index.notesin9.com ! cheatsheet.notesin9.com dleedy@notesin9.com Twitter: @DavidLeedy or @NotesIn9
NotesIn9.com
Tuesday, June 4, 13
XPages
Tuesday, June 4, 13
XPages
Design Elements meant to Modernize Domino Web Development ! Added in 8.5.0 and enhanced through 9.0 Built on top of Java Server Faces Dojo JavaScript Framework is built in Standard Languages ! HTML, CSS, JavaScript, Java Works with other Popular OpenSource Projects ! jQuery, Twitter Bootstrap, and many more
NotesIn9.com
Tuesday, June 4, 13
Tuesday, June 4, 13
Pre-XPages Design Element Notes Form Subform Notes View Notes Document
Similar XPages Design Element XPage Custom Control Notes View Data Source Notes Document Data Source
8
Tuesday, June 4, 13
Think Different
Tuesday, June 4, 13
Key concepts
Data Binding ! Easy to separate source code and Data ! No need to Rip and Replace ! Unless you want to! (And you might) Repeat Controls Dojo Integration ! Date Pickers, Partial Refresh, Pagers Scoped Variables
NotesIn9.com
Tuesday, June 4, 13
Scoped Variables
Allow you to pass information in memory No need for cookies or URL Parsing applicationScope ! All Users, Long Life sessionScope ! Single user, Life of user session viewScope ! Single user, Life of Page requestScope ! Single User, REALLY SHORT Life
NotesIn9.com
Tuesday, June 4, 13
values
NotesIn9.com
Tuesday, June 4, 13
11
Perspective ! XPages
This helps reusing OpenSource Projects
! JavaScript FrameWorks ! CSS FrameWorks ! Images/Graphics ! etc..
NotesIn9.com
Tuesday, June 4, 13
12
NotesIn9.com
Tuesday, June 4, 13
13
NotesIn9.com
Tuesday, June 4, 13
14
15
Demo
Tuesday, June 4, 13
Tuesday, June 4, 13
NotesIn9.com
Tuesday, June 4, 13
29
NotesIn9.com
Tuesday, June 4, 13
30
NotesIn9.com
Tuesday, June 4, 13
31
NotesIn9.com
Tuesday, June 4, 13
32
NotesIn9.com
Tuesday, June 4, 13
33
! http://notesin9.com/index.php/2013/04/05/notesin9-105-introduction-to-ssjs-debugger/
! Fredrik
NotesIn9.com
Tuesday, June 4, 13
Norling
34
NotesIn9.com
Tuesday, June 4, 13
36
! http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&name=XPage
37
Learning Curve?
Tuesday, June 4, 13
Learning Curve
With all these new technologies where do I start? ! HTML / XML ! JavaScript Syntax ! Dojo ! Backend Server Side Processing " This is the LotusScript of XPages ! External frameworks like jQuery ! CSS ! Java ! Not Needed to start - Can be handy later
NotesIn9.com
Tuesday, June 4, 13
39
Learning Curve
How do I get started? Start with a low pressure project Set a personal goal to convert an existing piece of code to XPages ! Form ! View ! Application Designer Wiki ! http://www-10.lotus.com/ldd/ddwiki.nsf
NotesIn9.com
Tuesday, June 4, 13
40
Additional resources
Tuesday, June 4, 13
Additional Resources
Community ! OpenNTF.org ! XPages.Info ! CollaborationToday.Info ! StackOverFlow.com ! Over 1,300 questions asked and answered ! Google for XPages Forum ! Google+ community - XPages Paid ! XPages101.net ! TLCC.com ! Engage a mentor
NotesIn9.com
Tuesday, June 4, 13
42
NotesIn9.com
Tuesday, June 4, 13
43
Rookie Mistakes
Tuesday, June 4, 13
Rookie Mistakes
Mistakes everyone makes starting out with XPages ! Why does my code not run when I click a button? ! Why do I make 5 documents every time I save a new form? ! Why does the same document come back when I save? ! Why cant I Hide/Show a Panel? ! Why doesnt my dojo/jQuery selector work? ! Why cant I get two document data sources to open in read mode and edit mode
NotesIn9.com
Tuesday, June 4, 13
18
Rookie Mistakes
Why does my code not run when I click a button? ! Did you put it in the right place?
NotesIn9.com
Tuesday, June 4, 13
19
Rookie Mistakes
Why does my code not run when I click a button? ! Did you put it in the right place?
NotesIn9.com
Tuesday, June 4, 13
20
Rookie Mistakes
Why do I make 5 documents every time I save a new form? ! New custom control new binding right?
! Multiple data bindings means multiple documents
NotesIn9.com
Tuesday, June 4, 13
21
Rookie Mistakes
Why do I make 5 documents every time I save a new form? Solution
! Copy and Paste the data binding in the source panel from one custom control to the next ! When finished move it to the XPage
NotesIn9.com
Tuesday, June 4, 13
22
Rookie Mistakes
Why does the same document come back when I save? ! When I have two data sources on the same page when I create a new document it always comes back on the page? ! http://blog.hughesconnect.com/?p=62 ! Mark Hughes Answer ! Create the document with a scope: request
NotesIn9.com
Tuesday, June 4, 13
23
Rookie Mistakes
Why cant I Hide/Show a Panel? Server Side Solution ! Use Nested Divs ! panelOuter " panelInner ! Control rendering on Inner Panel ! Use panelOuter as partial refresh target Client Side Solution ! Use dojo.style ! dojo.toggleClass("#{id:contentsOuter}", "hide"); " Assumes .hide { display: none};
#
NotesIn9.com
Tuesday, June 4, 13
Rookie Mistakes
Why doesnt my dojo/jQuery selector work? ! dojo.byId is good with Colons ! dojo.query does not like Colons
!"#$%&''()*+,-&./!"#$%&!'()*!$+,,-./!0 !"#$.+.)'0,)1-.2*.+.)'/!-.1&(12!'3+$4(,*!5#&3%!0 !"#$'34565724#'8 !9:;<=>=: * * * +,2*'3.?4.-1@ '3.?4.-1*/*1(A(6B&.2CDEFG41$H2&4'IJEK@ ,-.2'D'3.?4.-16+,-&.K@
25
Rookie Mistakes
Why doesnt my dojo/jQuery selector work? Suggest use class selectors ! Avoid CSS Frameworks that use ID (#) selctors
! <xp:inputText styleClass="fruitField" value="#{document1.fruit}" id="fruit1"> ! </xp:inputText> ! dojo.query(.fruitField)
NotesIn9.com
Tuesday, June 4, 13
26
Rookie Mistakes
Why cant I get two document data sources to open in read mode and edit mode Request Parameters in the URL ! ?action=editdocument Solution ! ignoreRequestParameters = true
NotesIn9.com
Tuesday, June 4, 13
27
Questions?
Tuesday, June 4, 13
Additional Slides
Tuesday, June 4, 13
Tuesday, June 4, 13
NotesIn9.com
Tuesday, June 4, 13
47