7.17.4.2.1. Implementation Example with Registration Function

7.17.4.2.1.1. Initial display of input screen

// Delete because the session may remain when the browser is closed directly
SessionUtil.delete(ctx, "project");

7.17.4.2.1.2. Transition from the input screen to the confirmation screen

// Acquire input information from the request scope
ProjectForm form = context.getRequestScopedVar("form");

// Convert Form to Entity
Project project = BeanUtil.createAndCopy(Project.class, form);

// Save input information in session store
SessionUtil.put(ctx, "project", project);

7.17.4.2.1.3. Return from the confirmation screen to the input screen

// Fetch input information from the session store
Project project = SessionUtil.get(ctx, "project");

// Convert Entity to Form
ProjectForm form = BeanUtil.createAndCopy(ProjectForm.class, project);

// Configure input information to the request scope
context.setRequestScopedVar("form", form);

// Delete the input information from the session store
SessionUtil.delete(ctx, "project");

7.17.4.2.1.4. Execute the registration process

// Fetch input information from the session store
Project project = SessionUtil.get(ctx, "project");

// Registration process is omitted

// Delete the input information from the session store
SessionUtil.delete(ctx, "project");