Join special agents Joe Friday and Frank Smith (Brad B and Paul D) as they uncover all the facts, and just the facts, about facets. Watch as they filter through the opinions, rumors and misconceptions to get answers to all the tough questions like "What are facets?", "When and how should I use them?", "Who else is using them?" and "Why should I even care?" Witness as they discover the xp:key differences and benefits of both named and unnamed facets. Follow our pragmatic pair as they argue and each make a case for xe:dynamicContent or xe:switchFacet. Listen as they reveal the flexibility and power of facets in the Form Table, Data View and Application Layout design frameworks.
Just the Facets Ma'am ... MWLUG August 23, 2013, Indianapoilis, IN
1. MWLUG 2013
Just the Facets, Ma’am
Brad Balassaitis, PSC Group
Paul Della-Nebbia, TLCC
2. Just the Facets, Ma’am
1
Join special agents Joe Friday and Frank Smith (Brad B and Paul D) as they uncover all
the facts, and just the facts, about facets. Watch as they filter through the opinions,
rumors and misconceptions to get answers to all the tough questions like "What are
facets?", "When and how should I use them?", "Who else is using them?" and "Why
should I even care?" Witness as they discover the xp:key differences and benefits of
both named and unnamed facets. Follow our pragmatic pair as they argue and each
make a case for xe:dynamicContent or xe:switchFacet. Listen as they reveal the
flexibility and power of facets in the Form Table, Data View and Application Layout design
frameworks.
Paul Della-Nebbia
Founding Partner
TLCC
Brad Balassaitis
Senior Consultant/XPages Developer
PSC Group
3. What We’ll Cover …
• Callbacks, Facets and Keys
• Adding an Editable Area to a Custom Control
• Form Table design framework
• Data View design framework
• Application Layout design framework
• Dynamic Content and Facets
• Q & A
2
4. Callbacks, Facets, and Keys
What’s a facet?
A. A named area in a control, addressable via xp:key
B. The resulting drop location to add a component for an Editable
Area added to a custom control.
C. A named child instead of a sequential one. Only used if the
parent chooses to. Sequential children are comparatively
autonomous.
D. All of the above.
E. None of the above.
3
5. Callbacks, Facets and Keys
What’s a callback?
A. An event on a custom control that can be coded return a value
from its containing XPage.
B. A design editable area added to a custom control.
C. Usually, an indication that your initial audition went well.
D. All of the above.
E. None of the above.
4
10. What We’ll Cover …
• Callbacks, Facets and Keys
• Adding an Editable Area to a Custom Control
• Form Table design framework
• Data View design framework
• Application Layout design framework
• Dynamic Content and Facets
• Q & A
9
12. Editable Area control
• Add custom control with callback to XPage
• Add panel to editable area
• Custom control gets this.facets tag and panel gets xp:key attribute
11
13. Creating Custom Layout Control
• Set up a layout structure in a custom control
• Add Editable Area controls to each section
12
15. What We’ll Cover …
• Callbacks, Facets and Keys
• Adding an Editable Area to a Custom Control
• Form Table design framework
• Data View design framework
• Application Layout design framework
• Dynamic Content and Facets
• Q & A
14
21. Add a Form Table to an XPage
• Procedure: Form Buttons and Page Navigation
20
Add action controls & set navigation
22. What We’ll Cover …
• Callbacks, Facets and Keys
• Adding an Editable Area to a Custom Control
• Form Table design framework
• Data View design framework
• Application Layout design framework
• Dynamic Content and Facets
• Q & A
21
31. In-View Editing using a Dialog control
• Technique: In-View Editing using a Dialog Control …
30
… cont …
32. In-View Editing Using Dialog Control …
• Technique: In-View Editing Using a Dialog Control …
31
… cont …
1 2
return viewEntry.getNoteID();
33. In-View Editing Using Dialog Control …
• Technique: In-View Editing Using a Dialog Control …
32
3
4
var c = getComponent("dialog1");
c.hide("detailPanel");
DemoXPage543View
… cont …
34. In-View Editing using a Tooltip Dialog
• Technique: In-View Editing using a Tooltip Dialog control
33
DemoXPage544View
XSP.openTooltipDialog("#{id:tooltipDialog1}","#{id:computedField2}")
35. In-View Editing using an In-Place Form
• Technique: In-View Editing using an In-Place Form Control
34
DemoXPage545View
36. Customizing Summary
• Technique: Customizing Summary
• Add panel to Summary facet and add custom content into panel
• Build link to open document
35
38. What We’ll Cover …
• Callbacks, Facets and Keys
• Adding an Editable Area to a Custom Control
• Form Table design framework
• Data View design framework
• Application Layout design framework
• Dynamic Content and Facets
• Q & A
37
46. Application Layout in a CC
• Designing an Application Layout in a Custom Control
45
Differences when Designing an Application Layout in a Custom Control versus an XPage
56. Application Layout Design Strategies
55
Design Layout #6 – Web site Design
Design Layout #7 – Enabling the Search Bar in a Multi-Application Design
57. What We’ll Cover …
• Callbacks, Facets and Keys
• Adding an Editable Area to a Custom Control
• Form Table design framework
• Data View design framework
• Application Layout design framework
• Dynamic Content and Facets
• Q & A
56
59. Rendered Property and JSF Life Cycle
58
XPages Masterclass Video Series with Tony McGuckin
http://tonymcguckin.wordpress.com/2013/04/22/xpages-masterclass-series-1/
65. XPages Component Tree …
• Dynamic Content Control and the XPages Component Tree …
64
… cont …
66. XPages Component Tree
• Dynamic Content Control and the XPages Component Tree
65
switchFacet versus dynamicContent
DemoXPage253
67. Add Dynamic Content Control …
66
… cont …
Add/configure selectable facets to editable area
68. Changing Content on Client Side
• Two ways to change content on client side:
67
1
2
69. Changing Content on Server Side
• Two ways to change content on server side:
68
1
2
DemoXPage251
var dc=getComponent("dynamicContent1");
dc.show("provinces")
71. What We’ll Cover …
• Callbacks, Facets and Keys
• Adding an Editable Area to a Custom Control
• Form Table design framework
• Data View design framework
• Application Layout design framework
• Dynamic Content and Facets
• Q & A
70
72. Some Key Points …
• Facets are named areas in a control, addressable via xp:key
• Form Table, Data View and Application Layout controls
– framework controls to display Domino documents and views
– Rapid XPages development of Web 2.0 apps in a oneui framework
– details facet of xe:dataView like a built-in repeat
• Rendered property …
– Like hide-when, often the first choice for dynamic content, but …
• Inefficient in JSF life cycle (recalculated in all 4 application-level phases)
• Inefficient in component tree (rendered=“false”)
• Use xe:dynamicContent control
– Offers greatest flexibility to dynamically switch content
– Only the displayed facet is added to the component tree
representation for XPage
71
73. For more information …
• www.tlcc.com/mwlug
– Seven XPages Courses!
– Rapid XPages Development using Application Layout and Dojo UI
Controls
– 20% off special offer to MWLUG attendees to September 30th
• openNTF.org
– Extension Library Project and ExtLib Demonstrations application
• Xcellerrant.net – Brad Balassaitis Blog series
– Dojo Grids in XPages
– Data View series
72
74. Brad Balassaitis
PSC Group
Senior Consultant/XPages Developer
Twitter: @Balassaitis
Xcellerant.net
Q & A
73
Paul Della-Nebbia
TLCC, founding partner, instructor
paul@tlcc.com
Twitter: @pauldn
www.tlcc.com/mwlug