Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this article, we will use the "URL 在本文中,我们将使用列表表格的“URL Request Parameters for Datalist" option of 列表表格 or 弹出式选择框 form element to refine the result of popup datalist selection.

 

First, we will have to create a datalist and set the filter using Request Param Hash Variable. In this sample, our request parameter name is "group" and we are using 高级表单绑定器 to retrieve form data. You are allow to use other binder and write your filter condition using Request Param Hash Variable.

Image Removed

After we have our datalist ready, let make a form as following. In this form, we will have a Popup Select Box and a List Grid which will use the datalist we just created as popup selection dialog. We will have a select box which will be used to filter the datalist result and its field id is set to "filter".

Image Removed

Configure the "URL Request Parameters for Datalist" option of Popup Select Box and List Grid as following.

Image Removed

By configure this way, the element will retrieve the configured field value and pass it as a url request parameters to the datalist when the popup select dialog is open. In this care, the value of "filter" field will pass as the value of "group" parameter. You can configure a default value if you want to. The default value will be used when configured field return empty value.

Let us populate some data to our datalist for testing.

Image Removed

Datalist”选项 或弹出式选择框  表单元素来优化弹出式数据列表选择的结果。

 

首先,我们将不得不创建一个datalist,并使用Request Param Hash Variable设置过滤器在这个示例中,我们的请求参数名是“group”,我们使用  高级表单绑定器来检索表单数据。您可以使用其他联编程序并使用请求参数哈希变量编写过滤条件。

Image Added

在我们准备好数据之后,让我们来做一个如下的表格。在这种形式下,我们将有一个弹出式选择框和一个列表网格,它将使用我们刚刚创建的数据列表作为弹出式选择对话框。我们将有一个选择框用于过滤数据列表结果,并将其字段标识设置为“过滤”。

Image Added

配置弹出式选择框和列表网格的“URL请求参数为Datalist”选项,如下所示。

Image Added

通过这种方式配置,元素将检索配置的字段值,并在弹出式选择对话框打开时将其作为url请求参数传递给datalist。在这种情况下,“filter”字段的值将作为“group”参数的值传递。您可以配置默认值,如果你想。配置的字段返回空值时将使用默认值。

让我们将一些数据填充到我们的数据手中进行测试。

Image Added

现在,在我们的表格中,当选择框值为“Group2”时,我们的弹出选择对话框中的可用结果将仅显示具有等于“group2”的组的数据。Now, in our form, when the select box value is "Group2", the available result in our popup selection dialog will only shown the data which have group equal to "group2".

 

The sample app for this article: 本文的示例应用程序:  APP_form_how_to_url_params-1-20151119114709.jwa