Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Excerpt

This class represents a field on the form. This can be either a field on the main form, or on a related list.

...

This class is extended by: B25.Lookup.

Methods

onUpdate (without parameters)

Code Block
List<B25.FormEventHandler> onUpdate()

Returns a reference to the list of handlers that have been defined to trigger when the field’s value is updated by the user. Because this method returns a reference to the actual list (and not a copy), any changes you make to this list will directly affect the defined handlers. This method is intended to be used in the customize method defined in your implementation of the B25.Form.Customizable interface. Using it anywhere else, such as inside one of your event handlers, will not have any effect.

Return value:

...

List<B25.

...

FormEventHandler>

...

onUpdate (with parameter)

Code Block
void onUpdate(B25.FormEventHandler handler)

Adds the given handler to the list of handlers that have been defined to trigger when the field’s value is updated by the user. This method is a convenience method, and is identical to calling onUpdate().add(B25.FormEventHandler handler).

Parameters:

Name

Type

Description

handler

B25.FormEventHandler

The handler to trigger when the field is updated.

...

updateValue

Code Block
void updateValue(Object newValue)

Calling this method allows you to directly set the value of the field. Unlike the value being updated by the user on the form, this action will not trigger any event handlers.

...

Use this method inside your own handlers.

Parameters:

Name

Type

Description

newValue

Object

The value that you want to set the field to.

...

updateValue

Code Block

...

void 

...

updateValue(

...

Object 

...

newValue, 

...

Boolean 

...

triggerChangeHandlers)

...

Like the previous method

...

Return value: ReturnType (link to relevant doc)

, calling this method allows you to directly set the value of the field. The second parameter lets you choose if you want this change to trigger any other handlers that have been defined for the form.

Note

Be careful about using this method with triggerChangeHandlers=true, because it can cause infinite recursion.

Parameters:

Name

Type

Description

...

param1

...

ParameterType (link to relevant doc)

...

The first parameter.

...

param2

...

ParameterType (link to relevant doc)

...

The second parameter.

...

On this page

...

newValue

Object

The value that you want to set the field to.

triggerChangeHandlers

Boolean

Whether this update should trigger other event handlers.

...

hide

Code Block
void hide()

Hides a field on the reservation form.

...

show

Code Block
void show()

Can be called after the hide method to let a field appear on the reservation form.

...

disable

Code Block
void disable()

Disables a field on the reservation form, which will block any input in the field.

...

enable

Code Block
void enable()

Can be called after the disable method to let a field be available for input again on the reservation form.