# Modifying Existing Liquid Data Controls

This section describes the ways you can modify an existing Liquid Data control. It contains the following procedures:

- To Change the Query Associated With a Single Control Method
- To Add a New Method to a Control
- To Invoke the Query Wizard to Modify an Existing Control
- Updating an Existing Control if Schemas Change

## To Change the Query Associated With a Single Control Method

Perform the following steps to change the query that a method in a Liquid Data Control accesses.

1. In WebLogic Workshop, open the Design View for a Liquid Data Control (.jcx) file.
2. Select the method you want to change, right-click, and select Edit Stored-Query Name to bring up the Liquid Data Control Wizard.

Figure 1-9 Changing the Query a Method Accesses

Note: You can also access the Liquid Data Control Wizard from the property editor

Figure 1-10 Opening the Property Editor from the Stored-Query Name Property

1. If you are accessing a remote Liquid Data server, enter a password on the connection information screen. If you are using a local Liquid Data server, the connection information screen does not appear.
2. In the Property editor, navigate to the query you want the method to access, select it, and click OK.

## To Add a New Method to a Control

Perform the following steps to add a new method to an existing Liquid Data control.

1. In Workshop, open an existing control in Design View.
2. In the control Design View, move your mouse inside the box showing the control methods, right-click, and select Add Method, as shown in Figure 1-11.

Figure 1-11 Add a Method to a Control

1. Enter a name for the new method.
2. Move your mouse over the new method, right-click, and select Edit Stored-Query Name to launch the query wizard (see Figure 1-9).

Alternately, you can launch the query wizard from the Stored-Query name property, as shown in Figure 1-10.

3. If you are accessing a remote Liquid Data server, enter a password on the connection information screen. If you are using a local Liquid Data server, the connection information screen does not appear.
4. In the Property editor, navigate to the query you want the method to access, select it, and click OK.

## To Invoke the Query Wizard to Modify an Existing Control

You can use the query wizard to modify one or more queries accessed in an existing Liquid Data Control. A query corresponds to a method in the Liquid Data Control (.jcx) file. Perform the following to invoke the Liquid Data query wizard and modify the query selection for an existing Liquid Data Control.

1. In WebLogic Workshop, open the Design View for a Liquid Data Control (.jcx) file.
2. If you are not already viewing the Property Editor, select View —> Property Editor from the Workshop menu.
3. If you want to change any of the connection information, enter a value for the url or username attributes in the property editor.
4. In the Liquid Data section of the property editor, click the three dots (see Figure 1-12) to launch the query wizard.

Figure 1-12 Invoking the Query Wizard from the Workshop Property Editor

1. If you entered new values for the url or username attributes, or if the Liquid Data Server is in a remote domain, the Liquid Data Connection Information screen appears. Enter a password and click OK. If you did not change the value of these attributes, then the wizard opens to the Property Editor where you select queries.
2. Add or remove queries as you need in the Property Editor screen and click OK. For details, see Step 6: Select Queries to Add to the Control.

## Updating an Existing Control if Schemas Change

If any of the schemas corresponding to any methods in a Liquid Data Control change, then you must update the Liquid Data Control to regenerate the XMLBeans for the changed schemas. Perform the following steps to update a Liquid Data Control

1. In WebLogic Workshop, open the Liquid Data Control (.jcx) file.
2. In the Liquid Data section of the property editor, click the three dots (see Figure 1-12) to invoke the Liquid Data query wizard.
3. If you are accessing a remote Liquid Data server, enter a password on the connection information screen. If you are using a local Liquid Data server, the connection information screen does not appear.
4. In the query wizard Property Editor, click OK. Workshop regenerates the Liquid Data Control and the XMLBeans for all the schemas used by queries in the control.