Creating a Binding Tag

Use the Create Binding wizard to create a binding tag that you can use to bind some data to multiple locations in your project.

To create a binding, follow these steps:

1. Launch the Create Binding wizard in any of the following ways:

From Nexaweb Data perspective:

From Nexaweb perspective:

  • Right click in the Data view and select
    New > Binding

  • Drag a formatter or formatter chain onto the Bindings node

  • Right click on a data source in the Outline view and select New > Binding

  • Right click on component visible in Visual Editor view and select New > Binding

  • Select Tools > Binding

 The Select Component dialog appears.

2.  Complete the Select Component dialog as follows:

image\img00575.gif

Click on the component to which to bind data and click Next.

 The Select the data source dialog appears.

2.  Complete the Select the data source dialog as follows:

image\img00576.gif

Either:

- Click on an existing data source to bind to this component.

- Click Add New Data Source to create a new data source to bind to this component. See the Creating a Data Source section of this document.

 Click Next.

 The Select the type of data binding dialog appears.

3. Complete the Select the type of data binding dialog as follows:

image\img00577.gif

Select the attribute to bind to: Enter an attribute of the component that you selected to which to bind data, or click image\img00578.gif to display the Attribute Chooser dialog.

Select the binding syntax to use: Click the radio button beside one of the following selections:

- Inline (shortcut bind syntax)
For example:
<label text="{*('ds','')}" />

- Inline (full bind syntax and formatter support)
For example:
<label text="{bind('dataSource=ds;select=;type=ONE_TIME')}" />

- Create separate binding syntax
Fo
r example:
<data:binding id="ds_bind" dataSource="ds" type="ONE_TIME" select=""/>

<label text="{bind(binding:ds_bind)}" />

Select the binding type: Click the radio button beside the type for this binding:
- one_time (gets data once and does not refresh)
- one way (refreshes data at intervals when it changes at the source.)

Create the select statement: Specify a query string specific to the data source or click image\img00579.gif to build it.

3. Click Next.

 A preview dialog appears displaying the binding syntax.

4. Click Finisih.
The binding you created appears:
-In
Data view, under the Bindings node.
- I
n the Outline view under the UI file to which you added it.