Support > Repository > Screen function > Screen transition (1) Transit from detail screen to registration screen
ja | en

Transit from detailed screen to registration screen of arbitrary model. Pass parameters at the same time.

We prepare two models of customer model and customer model. The definition of each is shown in Fig. 1 and Fig. 2.Both are (unrelated to) related, independent models.

(The item names are similar.The customer model adds the prefix "cs" to each item name of the customer model.This is for the sake of clarity of explanation, and it is not necessarily such item name.)

Figure 1 Definition of customer model
Figure 2 Definition of customer model

Figure 3 shows an example of preparing a button for transitioning from the detail screen of the customer model to the registration screen of the customer model. By pressing this button, we pass values ​​of each item of the customer model to the customer model (as parameters).

Figure 3 Example of preparing buttons to transition to registration screen of customer model

Figure 4 shows an example of transition to the new registration screen of the customer model.You can see that the value has been delivered.

Figure 4 New registration screen for customer model

As shown in this example, you can open the screen of any model.You can also pass parameters.

Setting of customer model

When opening a new registration screen REQUEST Apply the function. It receives externally given parameters.

If the key name when externally given is different from the item name,REQUESTSpecify the (external) key name for the function.

Figure 5 Setting up the REQUEST function

For numerical type items

The return value of the REQUEST function is a string type.When the item of the receiving side (here, "good customer" model) is numeric type,TOINTPlease convert the character string to numeric type using function etc.

For date type items

The return value of the REQUEST function is a string type.When the item of the receiving side (here, "good customer" model) is numeric type,DATEVALUEPlease convert the character string to the date type using a function etc.

Set up customer model

In the "customer model" shown in Figure 3, open "Screen> Other> Java source code setting".
Here, define the add button as follows.

item Description Input example
screen name Specify which screen to add a button to.Here we will define "Detailed display screen". Detailed display screen
indicate Enable it. (check)
Display condition When displaying buttons always, this column is blank.For conditions, see "Button display conditionPlease read.
Button name Specify an arbitrary name.It can also be expressed as an expression. Member registration
event name Specify the event for the transitioned screen.[To be described later] New
Action name Specify the screen to transition.[To be described later] insertCustomer4s
Additional parameters Parameters can be specified on the transition screen.[To be described later] csname=${name}
Fig. 6 Add button setting

event name

For each screen, events that can be received are prepared.The events that can be accepted on the new registration screen are as follows.

event name Description
New Open the new registration screen.
Event names are case sensitive.Please input correctly.

Action name

A string consisting of a combination of model and screen.It becomes part of address bar (URL).

The new registration screen is as follows.

"Insert" + model name (Camel notation)

With this rule, the action name corresponding to the search list display screen of the model "customer4s" is "insertCustomer4s". Extension is not required.

Camel notation: Capitalize the first letter.Remove the underscore included in the model name and capitalize the next letter.For example my_funny_valentine would be MyFunnyValentine.

Additional parameters

You can pass the initial value directly to the registration screen.

The format is "key = value".The key part is the item ID (of the transition destination model).
Using placeholders ($ {...}) in the value part,Transition sourceYou can pass in the value of the item.

To pass multiple parameters, separate them with &.

Additional parameters for realizing the operation in Figure 4 are as follows.

In this example, the key part (csname, cskananame) matches the item name of the customer model.Therefore, in Figure 5, the argument of the REQUEST function is omitted.
This time, the primary key (csid) of the customer model is automatically numbered using the order.Therefore it is not necessary to pass it as a parameter from outside.



The following can not be specified for the item name described in the additional parameter.

  • Repeat item
  • Repeating container item
  • A foreign key child model tied to this model

In the example shown in Figs. 1 and 2, the "company name" in the customer model and customer model was a character string type. Next is an example of dividing "company model" and "customer model".The "company name" of the customer model changes to a structure holding the primary key of the company model.(FIGS. 7 and 8)

Figure 7 Definition of company model
Figure 8 Modified customer model


"Company name" in customer model has changed to model reference (from character string type).At this time, if you press "Register Membership" button, the company name code (ID part) will be handed over.

Figure 9 Detailed screen of modified customer model

For model reference, you can also check that the parameters are crossed.(FIG. 10)

Figure 10 Customer Registration screen after pressing the button


Customer model

The initial value of the company name item of the customer model should receive the code (ID part). For converting initial value expression to numeric typeTOINTApply the function.

Figure 11 Change of initial value expression (application of TOINT function)

Customer model

There is no change.The parameter part "cscompanyname = $ {companyname}" can also be used as it is.

The customer model companyname has changed to model reference.At this time, the $ {companyname} specification of the above parameter is interpreted as passing the code (ID part) automatically.For details of this rule, see "Specifications/ConstraintsPlease read.

From the details screen

This function can not be changed from the registration screen/update screen.The detail screen is the starting point.

Rule of model reference item

"Screen transition parameter summary> Rule of model reference itemPlease read.

Button arrangement

You can not control the display order of the buttons.The original button is always placed on the right side of the button display.