Open topic with navigation

TIBCO Business Studio™ - BPM Edition 5.4.0

# compare()

This method is optional.

It only has to be implemented at the class level (not the prototype level) for ControlWrappers that meet both of the following conditions:

- The value edited by the control is of a complex type, i.e. the type is specified by a BOM class.
- Instances of the control are allowed to occur in grid panes.

In these situations, if the grid pane has enabled sorting, the form needs to know how the complex objects should be sorted. The compare method is used in performing this sorting.

Method Arguments:

- value1: This is the first object to compare.
- value2: This is the second object to compare.

Method Return Value:

- Returns a number value:
  - < 0: if value1 is less than value2
  - 0: if value1 is equal to value2
  - > 0: if value1 is greater than value2

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Business Studio™ - BPM Edition

Copyright © 2015-2023. Cloud Software Group, Inc. All Rights Reserved.