SlideShare a Scribd company logo
1 of 5
Modern Domino
Booleans

learn. do. dream.

www.redpilldevelopment.com
Booleans
• Boolean values are an integral part
of the life of a programmer used
when a variable has two values, a
true/false or off/on state.
• Booleans are supported in Java,
LotusScript, and even @Formula.
• Historically we have displayed
boolean values in our UI using
check boxes or radio buttons.
• Modern interfaces have developed
with slicker versions these controls.
• For mobile devices check-boxes
and radio buttons are rarely used
as they are often difficult to
operate using a fat thumb.

learn. do. dream.

www.redpilldevelopment.com
Mobile Toggle Switch
• The XPages mobile controls includes a toggle switch.
This is based on dojox/mobile/Switch.
• Touching the control with a tap or drag gesture
triggers the state of the control being flipped.
• Toggle switches are a little different to most other
input controls in that there is not a true value binding
between the control and the underlying property
being edited. Care must there be taken in how these
are coded.
Instructions
1. To implement a toggle switch is is usually a good idea
to develop a toggleMyfield() method in your java
bean that toggles the state of each boolean. This
method will be used later.
Example:
public void toggleDefault() {
setDefault(!isDefault());
}

learn. do. dream.

www.redpilldevelopment.com
Mobile Toggle Switch
2. Unlike most booleans the toggle switch uses values of “on” and “off”. We can use an
immediate if statement in EL to convert an existing boolean value to off/on.
Example:
value=“#{(mybean.default)?’on’:’off’}”
3. To update the value of a boolean we must invoke our toggle method in an
onStateChanged event. This event should (usually) trigger a partial refresh only to
update the value of the field.

learn. do. dream.

www.redpilldevelopment.com
State Buttons
• An alternative to the toggle switch is the state button. This provides a control that can easily used on a
mobile device using a tap gesture as well as on a desktop device using a mouse.
• State buttons are especially useful when you have a group of boolean values.
• State buttons can be any commonly used button control such as a button or tab bar button.
• The current boolean value is used to assign a “selected” class to the button when true. We can the add
CSS to style the button in a different way when its state is “on” or “true”.
• The click event can then invoke our toggle method to update the boolean value.

learn. do. dream.

www.redpilldevelopment.com

More Related Content

Similar to Modern Domino: Booleans

Creating a Simple, Accessible On/Off Switch
Creating a Simple, Accessible On/Off SwitchCreating a Simple, Accessible On/Off Switch
Creating a Simple, Accessible On/Off SwitchRuss Weakley
 
RTL Coding Basics in verilog hardware language
RTL Coding Basics in verilog hardware languageRTL Coding Basics in verilog hardware language
RTL Coding Basics in verilog hardware languageMohammedAbdulAzeem51
 
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 7, 8 - Pr...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 7, 8 - Pr...ICPSR - Complex Systems Models in the Social Sciences - Lab Session 7, 8 - Pr...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 7, 8 - Pr...Daniel Katz
 
GUI Programming in JAVA (Using Netbeans) - A Review
GUI Programming in JAVA (Using Netbeans) -  A ReviewGUI Programming in JAVA (Using Netbeans) -  A Review
GUI Programming in JAVA (Using Netbeans) - A ReviewFernando Torres
 
What is ui element in i phone developmetn
What is ui element in i phone developmetnWhat is ui element in i phone developmetn
What is ui element in i phone developmetnTOPS Technologies
 
Visual Basic IDE Introduction
Visual Basic IDE IntroductionVisual Basic IDE Introduction
Visual Basic IDE IntroductionAhllen Javier
 
Visual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdfVisual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdfsheenmarie0212
 
CheckBox In C#.pptx
CheckBox In C#.pptxCheckBox In C#.pptx
CheckBox In C#.pptxSlemanIsmail
 
Super components en Pascal
Super components en PascalSuper components en Pascal
Super components en PascalPaco Miró
 
What is Toggle Button-Technical Chamber.pdf
What is Toggle Button-Technical Chamber.pdfWhat is Toggle Button-Technical Chamber.pdf
What is Toggle Button-Technical Chamber.pdfNishaadequateinfosof
 
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 6 - Profe...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 6 - Profe...ICPSR - Complex Systems Models in the Social Sciences - Lab Session 6 - Profe...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 6 - Profe...Daniel Katz
 
classVII_Coding_Teacher_Presentation.pptx
classVII_Coding_Teacher_Presentation.pptxclassVII_Coding_Teacher_Presentation.pptx
classVII_Coding_Teacher_Presentation.pptxssusere336f4
 
Accessible custom radio buttons and checkboxes
Accessible custom radio buttons and checkboxesAccessible custom radio buttons and checkboxes
Accessible custom radio buttons and checkboxesRuss Weakley
 
React state
React  stateReact  state
React stateDucat
 
C# Programming: Fundamentals
C# Programming: FundamentalsC# Programming: Fundamentals
C# Programming: FundamentalsMahmoud Abdallah
 
Blocos command reference_pdf_78474
Blocos command reference_pdf_78474Blocos command reference_pdf_78474
Blocos command reference_pdf_78474Industrial N°6
 

Similar to Modern Domino: Booleans (20)

Creating a Simple, Accessible On/Off Switch
Creating a Simple, Accessible On/Off SwitchCreating a Simple, Accessible On/Off Switch
Creating a Simple, Accessible On/Off Switch
 
WPF Controls
WPF ControlsWPF Controls
WPF Controls
 
RTL Coding Basics in verilog hardware language
RTL Coding Basics in verilog hardware languageRTL Coding Basics in verilog hardware language
RTL Coding Basics in verilog hardware language
 
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 7, 8 - Pr...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 7, 8 - Pr...ICPSR - Complex Systems Models in the Social Sciences - Lab Session 7, 8 - Pr...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 7, 8 - Pr...
 
UI_UX_testing tips
UI_UX_testing tipsUI_UX_testing tips
UI_UX_testing tips
 
GUI Programming in JAVA (Using Netbeans) - A Review
GUI Programming in JAVA (Using Netbeans) -  A ReviewGUI Programming in JAVA (Using Netbeans) -  A Review
GUI Programming in JAVA (Using Netbeans) - A Review
 
What is ui element in i phone developmetn
What is ui element in i phone developmetnWhat is ui element in i phone developmetn
What is ui element in i phone developmetn
 
Visual Basic IDE Introduction
Visual Basic IDE IntroductionVisual Basic IDE Introduction
Visual Basic IDE Introduction
 
Visual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdfVisual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdf
 
CheckBox In C#.pptx
CheckBox In C#.pptxCheckBox In C#.pptx
CheckBox In C#.pptx
 
Java lab lecture 2
Java  lab  lecture 2Java  lab  lecture 2
Java lab lecture 2
 
Super components en Pascal
Super components en PascalSuper components en Pascal
Super components en Pascal
 
What is Toggle Button-Technical Chamber.pdf
What is Toggle Button-Technical Chamber.pdfWhat is Toggle Button-Technical Chamber.pdf
What is Toggle Button-Technical Chamber.pdf
 
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 6 - Profe...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 6 - Profe...ICPSR - Complex Systems Models in the Social Sciences - Lab Session 6 - Profe...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 6 - Profe...
 
Currency converter
Currency converterCurrency converter
Currency converter
 
classVII_Coding_Teacher_Presentation.pptx
classVII_Coding_Teacher_Presentation.pptxclassVII_Coding_Teacher_Presentation.pptx
classVII_Coding_Teacher_Presentation.pptx
 
Accessible custom radio buttons and checkboxes
Accessible custom radio buttons and checkboxesAccessible custom radio buttons and checkboxes
Accessible custom radio buttons and checkboxes
 
React state
React  stateReact  state
React state
 
C# Programming: Fundamentals
C# Programming: FundamentalsC# Programming: Fundamentals
C# Programming: Fundamentals
 
Blocos command reference_pdf_78474
Blocos command reference_pdf_78474Blocos command reference_pdf_78474
Blocos command reference_pdf_78474
 

More from Peter Presnell

Lotus Notes: Simplicity
Lotus Notes: SimplicityLotus Notes: Simplicity
Lotus Notes: SimplicityPeter Presnell
 
Asymetric Modernization
Asymetric ModernizationAsymetric Modernization
Asymetric ModernizationPeter Presnell
 
MWLUG 2014: Red Pill Development Speed Sponsoring
MWLUG 2014: Red Pill Development Speed SponsoringMWLUG 2014: Red Pill Development Speed Sponsoring
MWLUG 2014: Red Pill Development Speed SponsoringPeter Presnell
 
MWLUG 2014: Modern Domino (workshop)
MWLUG 2014: Modern Domino (workshop)MWLUG 2014: Modern Domino (workshop)
MWLUG 2014: Modern Domino (workshop)Peter Presnell
 
MWLUG 2014: ATLUG Comes To You
MWLUG 2014: ATLUG Comes To YouMWLUG 2014: ATLUG Comes To You
MWLUG 2014: ATLUG Comes To YouPeter Presnell
 
Modern Notes: Databases
Modern Notes: DatabasesModern Notes: Databases
Modern Notes: DatabasesPeter Presnell
 
Future Proofing Notes Client Applications
Future Proofing Notes Client ApplicationsFuture Proofing Notes Client Applications
Future Proofing Notes Client ApplicationsPeter Presnell
 
Lotus Notes: Live Long and Prosper
Lotus Notes: Live Long and ProsperLotus Notes: Live Long and Prosper
Lotus Notes: Live Long and ProsperPeter Presnell
 
ATLUG Tack-It-On Modern Notes:Modern Domino
ATLUG Tack-It-On Modern Notes:Modern DominoATLUG Tack-It-On Modern Notes:Modern Domino
ATLUG Tack-It-On Modern Notes:Modern DominoPeter Presnell
 
ATLUG Day of Champions
ATLUG Day of ChampionsATLUG Day of Champions
ATLUG Day of ChampionsPeter Presnell
 
The History of Lotus Notes
The History of Lotus NotesThe History of Lotus Notes
The History of Lotus NotesPeter Presnell
 
Modern Domino: IBM Connect 2014 Summary
Modern Domino: IBM Connect 2014 SummaryModern Domino: IBM Connect 2014 Summary
Modern Domino: IBM Connect 2014 SummaryPeter Presnell
 
Modern Domino: IBM Connect 2014 Preview
Modern Domino:  IBM Connect 2014 PreviewModern Domino:  IBM Connect 2014 Preview
Modern Domino: IBM Connect 2014 PreviewPeter Presnell
 

More from Peter Presnell (20)

Lotus Notes: Simplicity
Lotus Notes: SimplicityLotus Notes: Simplicity
Lotus Notes: Simplicity
 
Big Data With Graphs
Big Data With GraphsBig Data With Graphs
Big Data With Graphs
 
Beyond XPages
Beyond XPagesBeyond XPages
Beyond XPages
 
The Graph Revolution
The Graph RevolutionThe Graph Revolution
The Graph Revolution
 
Asymetric Modernization
Asymetric ModernizationAsymetric Modernization
Asymetric Modernization
 
Modernization Math
Modernization MathModernization Math
Modernization Math
 
MWLUG 2014: Red Pill Development Speed Sponsoring
MWLUG 2014: Red Pill Development Speed SponsoringMWLUG 2014: Red Pill Development Speed Sponsoring
MWLUG 2014: Red Pill Development Speed Sponsoring
 
MWLUG 2014: Modern Domino (workshop)
MWLUG 2014: Modern Domino (workshop)MWLUG 2014: Modern Domino (workshop)
MWLUG 2014: Modern Domino (workshop)
 
MWLUG 2014: ATLUG Comes To You
MWLUG 2014: ATLUG Comes To YouMWLUG 2014: ATLUG Comes To You
MWLUG 2014: ATLUG Comes To You
 
Modern Notes: Databases
Modern Notes: DatabasesModern Notes: Databases
Modern Notes: Databases
 
Future Proofing Notes Client Applications
Future Proofing Notes Client ApplicationsFuture Proofing Notes Client Applications
Future Proofing Notes Client Applications
 
Lotus Notes: Live Long and Prosper
Lotus Notes: Live Long and ProsperLotus Notes: Live Long and Prosper
Lotus Notes: Live Long and Prosper
 
ATLUG Tack-It-On Modern Notes:Modern Domino
ATLUG Tack-It-On Modern Notes:Modern DominoATLUG Tack-It-On Modern Notes:Modern Domino
ATLUG Tack-It-On Modern Notes:Modern Domino
 
ATLUG Day of Champions
ATLUG Day of ChampionsATLUG Day of Champions
ATLUG Day of Champions
 
Where's Domino?
Where's Domino?Where's Domino?
Where's Domino?
 
The History of Lotus Notes
The History of Lotus NotesThe History of Lotus Notes
The History of Lotus Notes
 
Lotusphere
LotusphereLotusphere
Lotusphere
 
The Mobile World
The Mobile WorldThe Mobile World
The Mobile World
 
Modern Domino: IBM Connect 2014 Summary
Modern Domino: IBM Connect 2014 SummaryModern Domino: IBM Connect 2014 Summary
Modern Domino: IBM Connect 2014 Summary
 
Modern Domino: IBM Connect 2014 Preview
Modern Domino:  IBM Connect 2014 PreviewModern Domino:  IBM Connect 2014 Preview
Modern Domino: IBM Connect 2014 Preview
 

Recently uploaded

Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 

Recently uploaded (20)

Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

Modern Domino: Booleans

  • 1. Modern Domino Booleans learn. do. dream. www.redpilldevelopment.com
  • 2. Booleans • Boolean values are an integral part of the life of a programmer used when a variable has two values, a true/false or off/on state. • Booleans are supported in Java, LotusScript, and even @Formula. • Historically we have displayed boolean values in our UI using check boxes or radio buttons. • Modern interfaces have developed with slicker versions these controls. • For mobile devices check-boxes and radio buttons are rarely used as they are often difficult to operate using a fat thumb. learn. do. dream. www.redpilldevelopment.com
  • 3. Mobile Toggle Switch • The XPages mobile controls includes a toggle switch. This is based on dojox/mobile/Switch. • Touching the control with a tap or drag gesture triggers the state of the control being flipped. • Toggle switches are a little different to most other input controls in that there is not a true value binding between the control and the underlying property being edited. Care must there be taken in how these are coded. Instructions 1. To implement a toggle switch is is usually a good idea to develop a toggleMyfield() method in your java bean that toggles the state of each boolean. This method will be used later. Example: public void toggleDefault() { setDefault(!isDefault()); } learn. do. dream. www.redpilldevelopment.com
  • 4. Mobile Toggle Switch 2. Unlike most booleans the toggle switch uses values of “on” and “off”. We can use an immediate if statement in EL to convert an existing boolean value to off/on. Example: value=“#{(mybean.default)?’on’:’off’}” 3. To update the value of a boolean we must invoke our toggle method in an onStateChanged event. This event should (usually) trigger a partial refresh only to update the value of the field. learn. do. dream. www.redpilldevelopment.com
  • 5. State Buttons • An alternative to the toggle switch is the state button. This provides a control that can easily used on a mobile device using a tap gesture as well as on a desktop device using a mouse. • State buttons are especially useful when you have a group of boolean values. • State buttons can be any commonly used button control such as a button or tab bar button. • The current boolean value is used to assign a “selected” class to the button when true. We can the add CSS to style the button in a different way when its state is “on” or “true”. • The click event can then invoke our toggle method to update the boolean value. learn. do. dream. www.redpilldevelopment.com