From f66dbc3ad4fe3b40b3b1a3787e04d17831d50f1d Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Tue, 14 Feb 2017 19:52:18 +0100 Subject: [PATCH] Declared code as eiffel code. --- doc/workbook/wui/readme.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/workbook/wui/readme.md b/doc/workbook/wui/readme.md index 26a886f3..c7e24e0b 100644 --- a/doc/workbook/wui/readme.md +++ b/doc/workbook/wui/readme.md @@ -23,7 +23,7 @@ In addition, the `WSF_FORM_..` is capable to analyze parameters from request `WS A simple solution to return html content is to use the `WSF_HTML_PAGE_RESPONSE` for now. In a `WSF_EXECUTION` descendant, see how to implement the `execute` procedure. -``` +```eiffel execute local mesg: WSF_HTML_PAGE_RESPONSE @@ -38,7 +38,7 @@ execute In this case, the html is hardcoded, and written manually. Now let's see how to use the WSF widgets on a more advanced usecase, a simple sign-in web form with 2 input fields `username`, `password` and `submit` button. -``` +```eiffel execute do -- Basic url dispatching... @@ -118,7 +118,7 @@ Indeed `WSF_HTML.process (request, .., ..)` analyze the request, fill the form f See -``` +```eiffel process (req: WSF_REQUEST; a_before_callback, a_after_callback: detachable PROCEDURE [WSF_FORM_DATA]) -- Process Current form with request `req`, -- and build `last_data: WSF_FORM_DATA` object containing the field values. @@ -128,7 +128,7 @@ process (req: WSF_REQUEST; a_before_callback, a_after_callback: detachable PROCE In our previous sample code, `execute_web_form_submission` could be: -``` +```eiffel execute_web_form_submission local mesg: WSF_HTML_PAGE_RESPONSE @@ -184,7 +184,7 @@ If those validations reports error, then the `form_data.has_error` will be True. To set validation, For instance, in previous sample, accepts only alpha-numeric characters: -``` +```eiffel f_username.set_description ("Only alpha-numeric character are accepted.") f_username.set_validation_action (agent (fd: WSF_FORM_DATA) do