Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: changed namespaces

...

To make life easier on yourself, use the same package names that the FlexJS framework uses. That way your cade code can move into the framework repository with little change.

Your "component" should live in: org.apache.flex.html.staticControls. The beads that make up your component should live in: org.apache.flex.html.staticControls.beads or one of its sub-directories, depending on its purpose.

...

For more details about creating components, see Creating Components. The code shown in the example is not intended to be a true component and a number of items have been left out; it is for illustrative purposes only.

Consider a horizontal version of the NumericStepper where there is a Label showing a value and a Button to decrement the value to the left of the Label and a Button to increment the value to the right of the Label. This is a composite component and will be easy to cross-compile to JavaScript.

The component is called, "NumericAdjustment", or org.apache.flex.html.staticControls.NumericAdjustment. This component needs the following beads:

...

NumericAdjustment {
iBeadView: ClassReference("org.apache.flex.html.staticControls.beads.NumericAdjustmentView");
iBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.NumericAdjustmentModel");
}

The NumericAdjustment component class, org.apache.flex.html.staticControls.NumericAdjustment, has very little content of its own:

...