Table of Contents Previous Section Reusable Component Limitations

Reusable Component Limitations

When you create a reusable component in WebObjects Builder, there are some limitations:

  • Reusable components stored on a custom palette must use only lower-case letters in the names of exported variables.

    When you store a component on the palette, all of its exported variables are stored on the palette along with it. The palette ignores case. When you drag the component off of the palette, the exported variable names appear in the inspector in all lower-case letters and are written out in the parent component's .wod file that way. (The .wod file stores bindings.)

    For example, the child component may have an exported variable alertString. After the child component is dragged from the palette to the parent component, the bindings inspector displays that variable as alertstring. The parent component then binds to an alertstring attribute. At run time, WebObjects tries to bind the parent component's script to the alertstring variable in the child component fails because alertstring does not exist.

  • Form elements are surrounded by <FORM> tags.

    When you drag an element from the Form Elements palette to a component, WebObjects Builder inserts a <FORM> tag before that component and a </FORM> tag immediately after it. If you create a reusable component in this manner and intend to use it inside a parent component's form, it won't work because of the extra <FORM> tags. As a workaround, you can do the following:

    1. Create the component in WebObjects Builder, and then save it.
    2. Open the component's HTML file (MyComponent.wo/MyComponent.html) in a text editor.
    3. Delete the <FORM> start and end tags, then save the file.

    If you're storing the component on a custom palette, do this before you add the component to the palette.


Table of Contents Next Section