New GET, new PUT in that order. New registration can also be done with new PUT only.

Acquires the initial state data when the new registration screen is opened.(The initial value described in the design information and the value of the choice are included.)

@RequestMapping(value="/rest/[modelid]/new", method=GET)

URL Example

http://localhost:8921/wagby/rest/customer/new

Response - Data acquisition success

STATUS=200 OK
Here is an example of the content of the return."Entityp" refers to Wagby's presentation model (for screen display)."Entity" refers to Wagby's store model (value in the database).

{
 "entityp": {
   "customerid_": {
     "content_":"0",
     "formatted_": null,
     "errorcode_":""
   },
   "name_": {
     "content_": "",
     "formatted_": null,
     "errorcode_":""
   },
   "email_": [
     {
       "id_": 1,
       "priority_": null,
       "content_": null,
       "errorcode_":""
     }
   ]
 },
 "errors": {
   "jfcinfo": [],
   "jfcwarn": [],
   "jfcdebug": [],
   "jfcerror": []
 },
 "status": "insertCustomer.input",
 "pkey": "0",
 "entity": {
   "customerid_": 0,
   "name_": "",
   "email_": [
     null
   ]
 }
}

Clear the stored information when new registration starts or refreshed.

@RequestMapping(value="/rest/[modelid]/new/cancel", method=GET)

URL Example

http://localhost:8921/wagby/rest/customer/new/cancel

response

STATUS=200 OK 返戻の内容例を示します。

{
 "entityp": null,
 "errors": {
   "jfcinfo": [],
   "jfcwarn": [],
   "jfcdebug": [],
   "jfcerror": []
 },
 "status":"redirect:/showListCustomer.do",
 "pkey": null,
 "entity": null
}

Enter data on the new registration screen and return data when reloading.It uses the value entered before registration, performs calculation processing (on the server side), and uses it for the purpose of receiving the result.

@RequestMapping(value="/rest/[modelid]/new/refresh", method=POST, headers="Content-Type=application/x-www-form-urlencoded")

URL Example

http://localhost:8921/wagby/rest/customer/new/refresh

Parameters

Specify parameters similar to the form screen.
Example:
customer_p$002fname=Suzuki

response

STATUS=200 OK
Here is an example of the content of the return.

{
 "entityp": {
   "customerid_": {
     "content_":"0",
     "formatted_": null,
     "errorcode_":""
   },
   "name_": {
     "content_":"Suzuki",
     "formatted_": null,
     "errorcode_":""
   },
   "email_": [
     {
       "id_": 1,
       "priority_": null,
       "content_": null,
       "errorcode_":""
     }
   ]
 },
 "errors": {
   "jfcinfo": [],
   "jfcwarn": [],
   "jfcdebug": [],
   "jfcerror": []
 },
 "status":"insertCustomer.input",
 "pkey": "0",
 "entity": {
   "customerid_": 0,
   "name_": "Suzuki",
   "email_": [
     null
   ]
 }
}

Enter data on the new registration screen and return data when reloading.It uses the value entered before registration, performs calculation processing (on the server side), and uses it for the purpose of receiving the result.

@RequestMapping(value="/rest/[modelid]/new/refresh", method=POST, headers="Content-Type=application/json")

URL Example

http://localhost:8921/wagby/rest/customer/new/refresh

HTTP header

Content-Type:application/json

Request description

Specifies the JSON representation of the presentation object.

{
   "name_": {
     "content_":"Suzuki"
   }
}

response

It is similar to "$ {content_ 2 _ name}".

@RequestMapping(value="/rest/[modelid]/new", method=POST, headers="Content-Type=application/x-www-form-urlencoded")

URL Example

http://localhost:8921/wagby/rest/customer/new

Parameters

Specify parameters similar to the form screen.
Example:
customer_p$002fname=Suzuki

Response - Successful registration

STATUS=200 OK
Here is an example of the content of the return.

{
 "entityp": {
   "customerid_": null,
  "name_": {
     "content_":"Suzuki",
     "formatted_": null,
     "errorcode_":""
   },
   "email_": []
 },
"errors": {
   "jfcinfo": [
     {
       "name": null,
       "content": "顧客情報データの登録処理は正常に行われました。",
       "code":"success.normal.termination.insert"
     }
   ],
   "jfcwarn": [],
   "jfcdebug": [],
   "jfcerror": []
 },
 "status":"showCustomer?customerid=1000",
 "pkey": "1000",
 "entity": {
   "customerid_": 1000,
   "name_": "Suzuki",
   "email_": [
     null
   ]
 }
}
@RequestMapping(value="/rest/[modelid]/new", method=POST, headers="Content-Type=application/json")

URL Example

http://localhost:8921/wagby/rest/customer/new

HTTP header

Content-Type:application/json

Request description

Specifies the JSON representation of the presentation object.

{
   "name_": {
     "content_":"Suzuki"
   }
}

response

It is similar to "$ {content_4_name}".