Your SlideShare is downloading. ×
0
Modern Domino: Booleans
Modern Domino: Booleans
Modern Domino: Booleans
Modern Domino: Booleans
Modern Domino: Booleans
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Modern Domino: Booleans

1,121

Published on

When representing boolean values Notes applications have traditionally used checkboxes and radio-buttons. In this article we look at some of the modern alternatives available when designing modern …

When representing boolean values Notes applications have traditionally used checkboxes and radio-buttons. In this article we look at some of the modern alternatives available when designing modern Domino applications.

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,121
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
9
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  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

×