Support > Repository > Application example > Open Wagby's arbitrary screen directly from the external system
ja | en

By including the account and password in the URL, you can open the screen on Wagby directly from the external system.

You can open the screen on Wagby directly from the external system.Include the following information in the URL:

Key Description
user Logon Account
pass password
forwardUrl Information on the destination screen

For example, when opening the list screen of the customer model (customer), it becomes as follows.Please properly read the host name.

http://localhost:8921/wagby/logon.do?user=admin&pass=admin&forwardUrl=showListCustomer

Although logon processing is performed, when logging on, when skipping the menu screen and opening the list screen of the customer model (customer), it becomes as follows.

http://localhost:8921/wagby/logon.do?forwardUrl=showListCustomer
  • Please write "screen name" for parameter forwardUrl.Here, the screen name is equivalent to the part displayed in the URL when selecting the menu after logon.
  • If you do not specify additional parameters for the destination screen, the trailing ".do" is not required.
  • If you omit the forwardUrl parameter, the main menu screen is displayed.
  • If logon account or password is omitted, the login screen will be displayed.After logging on, the screen will move to the screen specified by forwardUrl.
  • Even if the logon account or password is incorrect, it will also transition to the logon screen.At the same time, "The user name or password is incorrect" on the screen.Accounts may be locked if you mistake the password multiple times consecutively.Please be careful."Error message will be displayed.
This method includes a password in the parameter.Please consider using security risks thoroughly in operation.

Example: Open new registration screen

Add the action_New parameter to the URL.The value part is also "New".

http://localhost:8921/wagby/logon.do?user=admin&pass=admin&forwardUrl=insertCustomer.do?action_New=New

The character string following the prefix "action_" is treated as "event".Detail is"Screen transition parameters SummaryPlease read.

Example: Granting search conditions

Replace "&" included in the forwardUrl parameter with "% 26".This is to make it possible to treat strings after the forwardUrl parameter as a batch.

For example: http: // localhost: 8921/wagby/logon.do? User = admin & pass = admin & forwardUrl = showListCustomer.do? Action_Search_Condition = Search_Condition% 26 customer_cp $ 002f integer type field 1 jshparam = integer value% 26 customer_cp $ 002 f integer type field 2 jshparam =
  • In the above example, the model name that stores the search condition is expressed as customer_cp.Detail is"Condition modelPlease read.
  • Please read "integer type item" in the above example properly.Wagby allows you to specify a range for integer type items.Distinguish between start and end by giving the suffix "1jshparam" and "2jshparam" respectively.
  • Separate the condition model name with the item name with "$ 002f".It is an expression that encodes the '/' character with utf - 8.

Example: Giving a search condition including Japanese characters

Let the transition destination be showListStaff.do.Also, make the search condition part as follows.

? Action_Search_Condition = Search_Condition & staff_cp $ 002fname = Ichiro Suzuki

First, URL encode only the multibyte character string "Ichiro Suzuki" of the parameter.The character encoding should be utf-8.

?action_Search_Condition=Search_Condition&staff_cp$002fname=%E9%88%B4%E6%9C%A8%20%E4%B8%80%E9%83%8E

Next, concatenate "screen URL" and "parameter".

showListStaffSub.do?action_Search_Condition=Search_Condition&staff_cp$002fname=%E9%88%B4%E6%9C%A8%20%E4%B8%80%E9%83%8E

This stringagainURL encoding.

showListStaffSub.do%3Faction_Search_Condition%3DSearch_Condition%26amp%3Bstaff_cp%24002fname%3D%25E9%2588%25B4%25E6%259C%25A8%2520%25E4%25B8%2580%25E9%2583%258E

Specify the character string created in this way as the parameter value of forwardURL in logon.do.

http://localhost:8921/wagby/logon.do?user=admin&pass=admin&forwardUrl=showListStaffSub.do%3Faction_Search_Condition%3DSearch_Condition%26amp%3Bstaff_cp%24002fname%3D%25E9%2588%25B4%25E6%259C%25A8%2520%25E4%25B8%2580%25E9%2583%258E
"=", "$", "?", "." Among parameter values ​​specified for forwardUrl will work without URL encoding.That is, characters that require URL encoding are "&", "%", and multibyte characters.

To summarize, replace Japanese characters (multibyte characters) with the URL-encoded value twice.

In case of URL including logon account and password

You can open any screen.

smartphone

http://localhost:8921/wagby/mobileSafariLogon.do?user=admin&pass=admin&forwardUrl=showListScheduleMobile

mobile phone

http://localhost:8921/wagby/mobileLogon.do?user=admin&pass=admin&forwardUrl=showListScheduleMobile

When not including logon account and password

On the PC, if you omit the logon account and password, you will be redirected to the designation screen after logon authentication but forwardUrl specification will be invalid for mobile phone/smartphone.In other words, after logon authentication, the menu screen is displayed without being redirected to the specified screen.

The menu screen is the same as the menu displayed after logging on with the logon account.If you log on with admin, the admin menu will be displayed.

In the following example, log on from the outside as a system administrator and enable maintenance mode.

http://localhost:8921/wagby/logon.do?user=admin&pass=admin&forwardUrl=maintenanceApp.do?__jfc_app_mode=Maintenance

To cancel maintenance mode, specify Normal for parameter __jfc_app_mode.

http://localhost:8921/wagby/logon.do?user=admin&pass=admin&forwardUrl=maintenanceApp.do?__jfc_app_mode=Normal