Inserting a SubmitButton

To insert a submitButton component:

  1. In the Design Structure Window of the desired file, locate the node in which you wish to insert a submitButton component.
  2. In the Component Palette, select Form Components from the dropdown list, and then drag and drop the submitButton component to the parent node of your choice.

    The submitButton node is inserted and highlighted under the expanded parent node.

  3. In the Property Inspector, set the following attributes for the submitButton component:

Note: To use data binding, see Data Binding a Component Attribute.

To set an event handler for submitButton:

  1. In the Property Inspector for submitButton, click Set event handler to register an event handler.
  2. Enter an event name in the dialog that displays, e.g., goto, null. etc.
  3. To edit an event handler, click Go to event handler in the Property Inspector.

    You can enter an optional source of the event to be handled. If this is set, this handler will only be fired if a "source" parameter on the event matches this value. (All events fired by UIX components include a "source" parameter matching the id or name of the component.)

Example (UIX XML)


...
<form name="myform">
  <contents>
    <textInput text="Default input text" name="textfield"/>
    <submitButton text="Enter"/>
  </contents>
</form>
...

<!-- A button that submits the form without performing any validation. -->
...
<form name="myform">
  <contents>
    <textInput text="Default input text" name="textfield"/>
    <submitButton text="Unvalidated Submit"
                  unvalidated="true" />
  </contents>
</form>
...

<!-- A button that triggers an event when the form is submitted. -->
...
<form name="myform">
  <contents>
    <messageTextInput prompt="Search" name="search">
      <end>
        <submitButton text="Go" event="doSearch" />
      </end>
    </messageTextInput>
  </contents>
</form>
...

<!-- if button is outside a form -->

...
    <submitButton formName="form1"
                  text="Enter"/>
...    

About SubmitButton
About ResetButton
About UIX Event Handlers

Inserting a ResetButton
Working with Form Components

 

Copyright © 1997, 2004, Oracle. All rights reserved.