Support > Repository > Search control > Specify search conditions as parameters from the outside

When embedding the URL accessing Wagby's search screen, such as in the mail, you can also specify search conditions as parameters at the same time.

Screen naming convention

Wagby's search screen has the following naming convention.


The notation of "Model ID" part follows Camel notation.This is capitalized at the beginning.Also, if an underscore "_" is included in the model ID, it is removed and the next letter is capitalized.For example, if the model ID is customer_order, it is CustomerOrder.

Extension .do is left for compatibility with R6.It may change in the future Wagby.

An example

When opening the search screen of model customer, it becomes the following URL.

Please properly read "localhost: 8921" and "wagby" in accordance with your environment.

After sending the above URL in the mail sentence, the recipient can open the screen directly by clicking the link.(To be precise, the logon screen opens first.After authentication, the screen specified above opens directly instead of the menu screen.)

Items for which search conditions are enabled in the model definition can be specified with URL parameters.

Search item naming convention


The notation with "model ID _ cp" and the suffix "_ cp" here means that the search condition has been stored.

Also, $ 002f means "/" character.This is a delimiter between the model ID and the item ID.

Developers who customize by Java should interpret as "Presentation notation of condition model".

Example 1 Setting a value

If you specify the value 1000 for the search condition customerid whose model ID is customer, the following notation is used.


Example 2 Setting the Japanese value

If you want to pass Japanese (including non-English characters) to the parameter, pass the UTF-8 encoded character. For example, if customername searches for "Yamada", it looks like this:


The notation encoded in UTF - 8 can be created using various services published on the Internet.Search engine "url encoding" should be searched.

Check the parameter name from the automatically generated file

You can confirm the parameter name with the automatically generated JSP file, copy and paste it.

There is a file called "condition +" model ID "+ Cp.jsp" in wagbyapp/webapps/project name/model ID/folder.If you open it with a text editor, you will find the following code.

<tags:input_text name="customer_cp$002fcustomername" ... />

This name = "..." part becomes the parameter name.

For numeric or date type items, you can specify start and end.They are as follows.


Item ID with suffix "1jshparam" will be started.The one given "2jshparam" will be terminated.

For model reference items, pass the ID part instead of the content part.The naming convention for parameter names is as follows.


This is handled internally as the notation "model ID_cp/item ID [1]/@id".

For example, when searching for a customer whose category (ID part) is "1", the parameters are as follows.


Multiple parameters are delimited by "&".In this case, it is searched internally as "AND" (AND condition).

"OR" (OR condition) is not supported.It is a plan to cope with future Wagby.