HttpForm (クラス)
public HttpForm {inherits Dialog}
インポート元: CURL.GUI.STANDARD. package 内で定義されています CURL.GUI.CONTROL-BASE.

Web サーバー上で CGI プログラムと対話できる特定の Dialog を作成します。

説明

HttpForm は通常のコンテンツ、リンク、コントロール、ラベルを含むドキュメントの 1 セクションです。ユーザーはフォームのコントロールを修正してフォームに「記入」してから、処理を行うエージェント (Web サーバー、メール サーバーなど) にフォームを発行します。

HttpForm の機能は HTML の <FORM> タグに似ています。

HttpForm はネストできますが、所定の HttpForm の 1 つ内側のコントロールは任意の要求で発行されます。

フォームに非表示のコントロールを指定するには、通常の任意のコントロール (TextField など) を使用して幅と高さを 0pt に設定するか、Graphic.visible? プロパティを false に設定します。(幅または高さがゼロ以外の場合、非表示のコントロールが画面を占有していることに注意してください。)

注意事項

このオブジェクトは、"HttpForm"のスタイル ルールを記述することによってスタイル化されます。

コンストラクタ
default:HttpForm オブジェクトを作成します。
コンストラクタ public {HttpForm.default
form-action:Url,
method:HttpRequestMethod = HttpRequestMethod.get,
encoding:String = HttpFormData.urlencoded-mime-type,
target:String = "_self",
default-character-encoding:CharEncoding = CharEncoding.ascii,
...
}

プロパティ
default-character-encoding:String パラメータに使用する既定の文字エンコード。また MIME 関連のヘッダーとセパレータ文字列をバイトに変換する際に使用する文字エンコードを指定します。
フィールド public HttpForm.default-character-encoding:CharEncoding
encoding:サーバーに送信される要求のエンコード タイプ。
フィールド public HttpForm.encoding:String
form-action:HTTP 要求の URL。
フィールド public HttpForm.form-action:Url
method:使用する HttpRequestMethod
アクセサ public final HttpForm.method:HttpRequestMethod
セッター public final HttpForm.method:HttpRequestMethod
style-element:スタイリングの目的のための、この Visual の "要素" や "型" です。
アクセサ public HttpForm.style-element:String
target: HttpForm.form-action の結果が表示されるブラウザ ウィンドウを指定します。
フィールド public HttpForm.target:String ="_self"
プロパティ 継承 Dialog: _controls, controls, look-and-feel, open?, options-present-here, return-state, use-look-and-feel?
プロパティ 継承 StandardActiveTraversalContainer: _current-active, current-active, repeat-traversal?, traversors
プロパティ 継承 CommandBinding: bound-command, bound-command-impl
プロパティ 継承 StandardActiveTraversor: focus-object
プロパティ 継承 Frame: clonable-class?, halign, halign-spec, hstretch?, hstretch?-spec, valign, valign-spec, vstretch?, vstretch?-spec
プロパティ 継承 ActiveTraversor: _active-traversal-container, active-traversal-container, mnemonic, tab-index, takes-focus?, valid?, validation-result
プロパティ 継承 BaseFrame: child, completely-clonable-children?, graphical-children, ordered-children, reverse-ordered-children, width-first?
プロパティ 継承 DataBindingTarget: data-binding-context, data-bindings
プロパティ 継承 EventTarget: event-handlers
プロパティ 継承 Visual: _style-element, cursor, data-source, dragee, font-size, graphical-parent, has-key-focus?, input-method-enabled?, input-method-keyboard-mode, name, options, style-class, style-manager, style-options, test-child?, test-description, test-name, test-parent?, test-type-name, test-visible?, tooltip, user-data
プロパティ 継承 OptionListInterface: option-register-proc, registered-option-keys
プロパティ 継承 GetBoundsBox: layout-locally-valid?, layout-valid?
プロパティ 継承 Box: clip-child-shadows?
プロパティ 継承 Graphic: avoid-page-break?, background, border-color, border-spec, border-style, border-width, cell-border-spec, cell-border-width, cell-margin, discrete-select-in-range?, display-context, enabled?, graphic-selectable, height, horigin, is-paginating?, layout, margin, opaque-to-events?, option-parent, outside-margin, pagination-state, parent, possibly-displayed?, selection-context, shadow-color, shadow-spec, visible?, visual-parent, vorigin, width

メソッド
add-file:この HttpForm で発行されるファイルを追加します。
public {HttpForm.add-file
name:String,
url:Url,
content-type:#String = "application/octet-stream"
}:void
add-file-data:この HttpForm で発行される任意のデータを追加します。
public {HttpForm.add-file-data
name:String,
data:{Array-of byte},
content-type:#String = "application/octet-stream",
filename:String = "",
content-transfer-encoding:#String = "binary"
}:void
add-string-param:送信する namevalue のペアをこの HttpForm とともに追加します。
public {HttpForm.add-string-param name:String, value:String}:void
async-submit-open:テキスト入力用の HttpForm を非同期に送信し、例外または開かれた HttpTextInputStream を含む AsyncFileOpenEvent で指定されたイベント ハンドラを呼び出します。
public {HttpForm.async-submit-open
submit-name:#String = null,
submit-value:#String = null,
character-encoding:CharEncoding = CharEncoding.none-specified,
buffer-size:int = {calculate-instances-per-memory-size default-buffer-memory-size, char },
unread-size:int = {min 4, buffer-size div 4},
request-headers:#HttpRequestHeaders = null,
auto-redirect?:bool = true,
always-return-response-headers?:bool = false,
event-handler:EventHandler,
...:EventHandler
}:AsyncFileOpener
async-submit-open-byte:バイト入力用の HttpForm を非同期に送信し、例外または開かれた HttpByteInputStream を含む AsyncFileOpenEvent で指定されたイベント ハンドラを呼び出します。
public {HttpForm.async-submit-open-byte
submit-name:#String = null,
submit-value:#String = null,
buffer-size:int = {calculate-instances-per-memory-size default-buffer-memory-size, byte },
unread-size:int = {min 4, buffer-size div 4},
request-headers:#HttpRequestHeaders = null,
auto-redirect?:bool = true,
always-return-response-headers?:bool = false,
event-handler:EventHandler,
...:EventHandler
}:AsyncFileOpener
non-keyword-init-arg: InitRestArgParser.process-rest-args で非キーワード引数が検出されると、呼び出されます。
public {HttpForm.non-keyword-init-arg a:any}:void
register-control:Control をこの ControlContainer に登録します。
public {HttpForm.register-control c:Control}:void
reset:
フォーム内のコントロールを初期値にリセットします。また、このフォームに追加されたすべてのデータを、メソッド HttpForm.add-fileHttpForm.add-file-data、または HttpForm.add-string-param を使用して削除します。このメソッドは、次に Dialog.reset を呼び出します。
この HttpForm の作成中に追加されたすべての HttpFormParam は、削除されません。
public {HttpForm.reset}:void
reset-all:フォーム内のコントロールを初期値にリセットします。また、この HttpForm を作成するときに追加された HttpFormParam を含む、メソッド HttpForm.add-fileHttpForm.add-file-dataHttpForm.add-string-param を使用し、このフォームに追加されたすべてのデータを削除します。このメソッドは、次に Dialog.reset を呼び出します。
public {HttpForm.reset-all}:void
submit:HttpForm.form-action にフォームとブラウザを送信します。
public {HttpForm.submit
submit-name:#String = null,
submit-value:#String = null
}:void
submit-open:HttpForm を発行し、テキスト ストリームとして応答を取得します。
public {HttpForm.submit-open
submit-name:#String = null,
submit-value:#String = null,
character-encoding:CharEncoding = CharEncoding.none-specified,
buffer-size:int = {calculate-instances-per-memory-size default-buffer-memory-size, char },
unread-size:int = {min 4, buffer-size div 4},
request-headers:#HttpRequestHeaders = null,
auto-redirect?:bool = true,
always-return-response-headers?:bool = false
}:HttpTextInputStream
submit-open-byte:フォームを発行し、バイト ストリームとして応答を取得します。
public {HttpForm.submit-open-byte
submit-name:#String = null,
submit-value:#String = null,
buffer-size:int = {calculate-instances-per-memory-size default-buffer-memory-size, byte },
unread-size:int = {min 4, buffer-size div 4},
request-headers:#HttpRequestHeaders = null,
auto-redirect?:bool = true,
always-return-response-headers?:bool = false
}:HttpByteInputStream
unregister-control:Control をこの ControlContainer から登録解除します。
public {HttpForm.unregister-control c:Control}:void
メソッド 継承 Dialog: close, get-by-name, handle-look-and-feel-change, handle-observer-message, option-lookup-here, option-propagate-notify, show, show-at-xy
メソッド 継承 StandardActiveTraversalContainer: add-internal, become-active, become-active-from-traversal, dispatch-mnemonic, get-sorted-traversors, internal-remove-child, on-key-press, react-to-child-change, register-active-traversor, traverse, traverse-from-visual, unregister-active-traversor
メソッド 継承 ControlContainer: commit
メソッド 継承 ActiveTraversalContainer: insist-active
メソッド 継承 StandardActiveTraversor: fire-event-at-container, handle-mnemonic, on-focus-in
メソッド 継承 Frame: add, clone-appearance-helper, remove-child
メソッド 継承 GraphicOptions: any-to-Distance, get-display-context
メソッド 継承 GuiEventTarget: handle-delegate-event, handle-event, on-action, on-cancel-mode, on-command-changed, on-commit, on-composition-change-event, on-composition-result-event, on-context-menu-event, on-current-record-change-request, on-current-record-changed, on-destroy-notify, on-destroy-requested, on-drag-over, on-drag-pointer, on-drag-started, on-drop, on-end-composition-event, on-focus-event, on-focus-out, on-gesture, on-gesture-begin, on-gesture-end, on-gesture-magnify, on-gesture-pan, on-gesture-rotate, on-gesture-swipe, on-gesture-tap, on-gesture-touch, on-grab-release, on-gui-event, on-input-method-event, on-key-event, on-pointer-button, on-pointer-crossing, on-pointer-event, on-pointer-motion, on-pointer-press, on-pointer-release, on-pointer-scroll, on-raw-key-event, on-raw-key-press, on-raw-key-release, on-reset, on-selectable-added, on-selectable-removed, on-selection-changed, on-selection-context-activated, on-selection-context-deactivated, on-selection-event, on-start-composition-event, on-start-event, on-stop-event, on-view-activate, on-view-deactivate, on-window-close, remove-event-handlers-for-event-class
メソッド 継承 Observer: observe, stop-observing
メソッド 継承 ActiveTraversor: mark-invalid, mark-valid, request-key-focus
メソッド 継承 BaseFrame: after-reposition, allocate-layout-object, attempt-revalidate-layout, before-reposition, compute-child-bounds, compute-parent-elastic, constrain-height, constrain-width, draw, end-pagination, get-height-preference, get-text, get-width-preference, install-child-bounds, note-attached, note-detaching, notify-option-children, paginate, pick-child, propagate-request-layout, register-options, set-size
メソッド 継承 DataBindingTarget: add-data-binding, get-data-binding, refresh-data-binding, remove-data-binding, unset-property, update-data-binding, validate-data-binding
メソッド 継承 EventTarget: accepts-event-class?, add-event-handler, event-handler-present?, remove-event-handler, verify-event
メソッド 継承 Visual: add-from-init-args, animate, change-cursor, clonable-appearance?, clone-appearance, get-focus-manager, get-layout-context, get-test-parent, get-test-property, get-view, maybe-fire-attach-event, maybe-fire-detach-event, note-caret-position, on-drag-leave, on-pointer-leave, pop-cursor, prepare-test-object, prepare-test-parent, push-cursor, quantize-width, refresh-style-options, release-key-focus, scroll-to-include, test-record, test-run, transform-from-display-coordinates, transform-from-graphical-root-coordinates, transform-to-display-coordinates, transform-to-graphical-root-coordinates
メソッド 継承 BasicBox: contains-point?, find-graphic-at, handle-crossing, on-pointer-envelope-event, pointer-enter-occurred, pointer-leave-occurred
メソッド 継承 OptionListInterface: add-option, add-style-option, change-option-parent-notify, clone-options, get-option, get-option-by-name, keyword-init-arg, local-add-notify, local-remove-notify, name-to-option-key, new-option-item, option-change-notify, option-lookup, option-set?, propagate-option-change, remove-option, remove-style-option, remove-styles, set-option-by-name, set-style-option-by-name, unset-option-by-name, unset-style-option-by-name
メソッド 継承 BasicEventTarget: enqueue-event
メソッド 継承 GetBoundsBox: get-bounds, get-elastic-bounds-into, get-nonparent-bounds-into, request-layout, validate-layout
メソッド 継承 InitRestArgParser: process-rest-args
メソッド 継承 Box: clear, compare-children, find-test-children, get-delimited-child-text-selection, get-gui-path-to-child, get-range-as-selected-text, get-visible-rect-in-root-into, graphical-child-visible-at, make-gui-mark, search-next-here, search-prev-here
メソッド 継承 Graphic: create-pagination-state, detach, draw-range-as-selected, draw-shadow, find-ancestor, find-graphical-ancestor, fire-inferior-crossing-event, get-graphical-root, get-gui-path, get-origin-in-graphical-ancestor, get-origin-in-root, get-pagination-state, get-top-left-in-ancestor, get-visible-bounds-into, on-drag-enter, on-inspection, on-pointer-enter, option-changed, paint-with-decorations, replace-with, request-draw, request-draw-rect, request-pointer-trace, search-next, search-prev, set-layout, start-pagination, xy-offset-to
メソッド 継承 Object: object-describe, object-describe-for-debugging, object-serialize



コンストラクタ詳細
default (コンストラクタ)
public {HttpForm.default
form-action:Url,
method:HttpRequestMethod = HttpRequestMethod.get,
encoding:String = HttpFormData.urlencoded-mime-type,
target:String = "_self",
default-character-encoding:CharEncoding = CharEncoding.ascii,
...
}

HttpForm オブジェクトを作成します。

form-action: HTTP 要求の URL。これは位置引数です。
method: 使用する HttpRequestMethod。有効な値は HttpRequestMethod.getHttpRequestMethod.post です。
encoding: サーバーに送信される要求のエンコード タイプ。

これを使用して、フォーム データをサーバーに送信するために使用するフォーマットを説明します。フォーマットは HttpFormData.urlencoded-mime-type HttpFormData.multipart-mime-type になります。

HttpFormData.urlencoded-mime-type は GET メソッドと POST メソッドをいずれもサポートします。

HttpFormData.multipart-mime-type は POST メソッドのみをサポートします。

HttpForm.add-file または HttpForm.add-file-data を呼び出して HttpForm にデータを追加する場合、フォームを複数パートのフォーマットで発行しなければなりません。この場合、唯一の有効なエンコードは HttpFormData.multipart-mime-type です。
target: form-action が表示されるブラウザ ウィンドウ。詳細については、 HttpForm.target を参照してください。
default-character-encoding: String パラメータに使用する既定の文字エンコード。このパラメータは、MIME 関連のヘッダーとセパレータ文字列のバイト列への変換に使用する character-encoding も指定します。

通常は、 HttpFormData.urlencoded-mime-type フォーム データに、サブセットとして CharEncoding.ascii を含まないエンコードを使用する必要がある場合を除き、CharEncoding.ascii またはそのスーパーセットを使用すべきです。
...:
残余引数は Dialog コンストラクタに渡されます。
HttpFormParam を渡すことができます。これらのパラメータは HttpForm に追加され、HttpForm が送信されるとき、送信されます。HttpForm.reset の呼び出しでは、これらのパラメータは削されません。パラメータを削除するために、HttpForm.reset-all メソッドを呼び出す必要があります。

説明

HttpForm は、次の条件を満たす場合、内部の各コントロールの値を発行します。

コントロールのフォームが発行された場合に返される内容を確認する場合は、コントロールの form-value ゲッターのドキュメントを参照してください。例については ListBox.form-value を参照してください。



プロパティ詳細
default-character-encoding (フィールド)
public HttpForm.default-character-encoding:CharEncoding

String パラメータに使用する既定の文字エンコード。また MIME 関連のヘッダーとセパレータ文字列をバイトに変換する際に使用する文字エンコードを指定します。

説明

通常は、 HttpFormData.urlencoded-mime-type フォーム データに、サブセットとして CharEncoding.ascii を含まないエンコードを使用する必要がある場合を除き、CharEncoding.ascii またはそのスーパーセットを使用すべきです。


encoding (フィールド)
public HttpForm.encoding:String

サーバーに送信される要求のエンコード タイプ。

説明

encoding を使用して、フォーム データをサーバーに送信するために使用するフォーマットを説明します。フォーマットは HttpFormData.urlencoded-mime-type HttpFormData.multipart-mime-type になります。

注意事項

HttpFormData.urlencoded-mime-type は GET メソッドと POST メソッドをいずれもサポートします。

HttpFormData.multipart-mime-type は POST メソッドのみをサポートします。

HttpForm.add-file または HttpForm.add-file-data を呼び出して HttpForm にデータを追加する場合、フォームを複数パートのフォーマットで発行しなければなりません。この場合、唯一の有効なエンコードは HttpFormData.multipart-mime-type です。


form-action (フィールド)
public HttpForm.form-action:Url

HTTP 要求の URL。



method (アクセサ)
アクセサ public final HttpForm.method:HttpRequestMethod
セッター public final HttpForm.method:HttpRequestMethod

使用する HttpRequestMethod

説明

有効値は次のとおりです。


style-element (アクセサ)
アクセサ public HttpForm.style-element:String

スタイリングの目的のための、この Visual の "要素" や "型" です。

説明

この実装によって Visual._style-elementの値が返されますが、通常は定数を返すためにオーバーライドされます。

オーバーライド

Visual のサブクラスのスタイルが他のオブジェクトと異なる場合、このゲッターは適切な文字列を返すようにオーバーライドされる必要があります。 慣例では,この文字列はクラス名または、オブジェクトを生成するマークアップの名前です。
オーバーライドでは、空の文字列でないかぎり、self._style-elementを返さなければなりません。
導入: バージョン 6.0


target (フィールド)
public HttpForm.target:String ="_self"

HttpForm.form-action の結果が表示されるブラウザ ウィンドウを指定します。

説明

target の値を次の表に示します。




詳細については、Applet.browse-url を参照してください。





メソッド詳細
add-file (メソッド)
public {HttpForm.add-file
name:String,
url:Url,
content-type:#String = "application/octet-stream"
}:void

この HttpForm で発行されるファイルを追加します。

name: (サーバーが使用する) パラメータ名。
url: 追加されるファイルのパス。ファイルのコンテンツがアプレットによって読み出される間は、有効な任意の Url が許可されます。

この URL のファイル名部分は、filename として MIME ヘッダーに追加されます。

この URL には ASCII 文字のみが使用できます。または RFC 2045 に従って括る必要があります。

添付するファイルをユーザーに選択してもらう場合は、choose-file または choose-location を使用します。
content-type: クライアントがコンテンツのタイプを判断し、適切な MIME タイプの文字列を指定するのが理想的です。これが不可能な場合、「application/octet-stream」を使用します。サーバーまたは最終的な受領者はファイル名とファイルのデータ、またはそのいずれかから MIME タイプの類推を試みることができます。

説明

新しいファイル パラメータとして発行されるデータに、指定されたファイルが追加されます。複数のファイルを追加する場合は、そのつど、このメソッドを呼び出します。同じパラメータ名を持つファイル パラメータはすべて、一緒にサーバーに送られます。

注意事項

HttpForm.reset も参照してください。


add-file-data (メソッド)
public {HttpForm.add-file-data
name:String,
data:{Array-of byte},
content-type:#String = "application/octet-stream",
filename:String = "",
content-transfer-encoding:#String = "binary"
}:void

この HttpForm で発行される任意のデータを追加します。

name: サーバーが使用する パラメータ名。
data: フォームに追加されるデータ。
content-type: クライアントがコンテンツのタイプを判断し、適切な MIME タイプの文字列を指定するのが理想的です。これが不可能な場合、「application/octet-stream」を使用します。サーバーまたは最終的な受領者はファイル名とファイルのデータ、またはそのいずれかから MIME タイプの類推を試みることができます。
filename: MIME タイプが非 null の場合、ファイル名のヘッダーが追加され、その名前を指定します。

この文字列には ASCII 文字のみが使用できます。それ以外の文字が含まれている場合、RFC 2045 に従って括る必要があります。
content-transfer-encoding: これは、追加予定のファイルに使用される Content-Transfer-Encoding のヘッダー値です。null には content-transfer-encoding ヘッダーの意味がありません。アプレットが送信されるデータをエンコードしている場合、エンコードの説明にこの引数が使用されます。

説明

新しい「パート」として発行されるデータに、指定されたデータが追加されます。複数のデータ パートを追加する場合は、そのつど、このメソッドを呼び出します。

注意事項

HttpForm.reset も参照してください。


add-string-param (メソッド)
public {HttpForm.add-string-param name:String, value:String}:void

送信する namevalue のペアをこの HttpForm とともに追加します。

name: サーバーが使用する パラメータ名。
value: name に対応してフォームに追加される値。

説明

新しいパラメータとして送信されるデータに、指定された名前と値のペアが追加されます。名前と値のペアを 1 つ以上追加する場合は、そのつどこのメソッドを呼び出します。

注意事項

HttpForm.reset も参照してください。


async-submit-open (メソッド)
public {HttpForm.async-submit-open
submit-name:#String = null,
submit-value:#String = null,
character-encoding:CharEncoding = CharEncoding.none-specified,
buffer-size:int = {calculate-instances-per-memory-size default-buffer-memory-size, char },
unread-size:int = {min 4, buffer-size div 4},
request-headers:#HttpRequestHeaders = null,
auto-redirect?:bool = true,
always-return-response-headers?:bool = false,
event-handler:EventHandler,
...:EventHandler
}:AsyncFileOpener

テキスト入力用の HttpForm を非同期に送信し、例外または開かれた HttpTextInputStream を含む AsyncFileOpenEvent で指定されたイベント ハンドラを呼び出します。

submit-name, submit-value: submit-namesubmit-value が非 null の場合、名前/値のペアがこのフォームで発行されます。名前と値は、いずれも発行される前に URL エンコードされます。
character-encoding: ファイルの読み込み時に使用する文字エンコーディング。CharEncoding を参照してください。指定されていない場合、HttpHeaders.content-type に HTTP "charset" パラメータが存在すればそれが使用されます。存在しない場合、可能であれば文字エンコーディングはストリームの最初の数バイトから判断されます。このような解釈ができない場合は、既定の CharEncoding.utf8 文字エンコーディングが使用されます。
buffer-size: バッファに格納される char の最小数。buffer-sizeunread-size がどちらも 0 の場合、アンバッファ ストリームの作成が可能であればこれを行います。
unread-size: 効果的に読み取り不可能な char の最小数。buffer-sizeunread-size がどちらも 0 の場合、アンバッファ ストリームの作成が可能であればこれを行います。
request-headers: リクエストと共に送信されるヘッダー。
auto-redirect?: true の場合、リクエストは応答のステータスによって自動的にリダイレクトされます。
always-return-response-headers?: 応答ヘッダーのステータスが status-ok でない場合に既定の動作をオーバーライドします。例外を発生させる代わりに、応答ヘッダーにアクセスできるストリームを返します。バージョン 1.7 以降は、返されるストリームにより、応答ヘッダーだけでなく応答の本文にもアクセスできます。したがって、呼び出し側は終了時に HttpTextInputStream.close を呼び出して、接続に関連付けられたリソースを解放する必要があります。
event-handler: AsyncFileOpenEvent を受け取る EventHandler。少なくとも 1 つを指定する必要があります。
...: AsyncFileOpenEvent を受け取るオプションの EventHandler

戻り値

非同期オープンを制御できる AsyncFileOpener を返します。

注意事項

HttpFile.http-async-read-open も参照してください。


async-submit-open-byte (メソッド)
public {HttpForm.async-submit-open-byte
submit-name:#String = null,
submit-value:#String = null,
buffer-size:int = {calculate-instances-per-memory-size default-buffer-memory-size, byte },
unread-size:int = {min 4, buffer-size div 4},
request-headers:#HttpRequestHeaders = null,
auto-redirect?:bool = true,
always-return-response-headers?:bool = false,
event-handler:EventHandler,
...:EventHandler
}:AsyncFileOpener

バイト入力用の HttpForm を非同期に送信し、例外または開かれた HttpByteInputStream を含む AsyncFileOpenEvent で指定されたイベント ハンドラを呼び出します。

submit-name, submit-value: submit-namesubmit-value が非 null の場合、名前/値のペアがこのフォームで発行されます。名前と値は、いずれも発行される前に URL エンコードされます。
buffer-size: バッファに格納される char の最小数。buffer-sizeunread-size が両方とも 0 の場合は、できるかぎりバッファリングしないストリームの作成を試みます。どちらかが 0 でない場合、BufferedByteInputStream が返されます。
unread-size: 効率よく読み取ることができない char の最小数。buffer-sizeunread-size が両方とも 0 の場合は、できるかぎりバッファリングしないストリームの作成を試みます。どちらかが 0 でない場合、BufferedByteInputStream が返されます。
request-headers: リクエストと共に送信されるヘッダー。
auto-redirect?: true の場合、リクエストは応答のステータスによって自動的にリダイレクトされます。
always-return-response-headers?: 応答ヘッダー内のステータスが status-ok でない場合に既定の動作をオーバーライドします。例外を発生させる代わりに、応答ヘッダーにアクセスできるストリームを返します。バージョン 1.7 以降は、返されるストリームにより、応答ヘッダーだけでなく応答の本文にもアクセスできます。したがって、呼び出し側は終了時に HttpByteInputStream.close を呼び出して、接続に関連付けられたリソースを解放する必要があります。
event-handler: AsyncFileOpenEvent を受け取る EventHandler で、少なくとも 1 つ指定する必要があります。
...: AsyncFileOpenEvent を受け取るオプションの EventHandler

戻り値

非同期オープンを制御できる AsyncFileOpener を返します。

注意事項

HttpFile.http-async-read-open-byte も参照してください。


non-keyword-init-arg (メソッド)
public {HttpForm.non-keyword-init-arg a:any}:void

InitRestArgParser.process-rest-args で非キーワード引数が検出されると、呼び出されます。

説明

Visual によるこのメソッドの実装では、最初にこのメソッドへの入力値をオブジェクトに関連するメタデータとして解釈を試みます。たとえば、オブジェクトに関連する EventHandlerDataBinding を認識してから、これらをアタッチするための適切な手順を実行することになります。
メタデータとして認識不可能な入力値は、Visual に追加される内容であると解釈され、Visual.add-from-init-args に渡されます。

オーバーライド

オブジェクトに関連付けられた追加のメタデータも受け入れるようにするには、このメソッドをオーバーライドします。実装では通常、解釈に失敗した入力値でスーパー実装が呼び出されるようにします。


register-control (メソッド)
public {HttpForm.register-control c:Control}:void

Control をこの ControlContainer に登録します。

説明

Control はそれぞれのコントロールコンテナ オプション ハンドラでこれを呼び出す必要があります。
c: 登録のコントロール。

オーバーライド

登録されたコントロールを追跡するように、これをオーバーライドします。


reset (メソッド)
public {HttpForm.reset}:void

フォーム内のコントロールを初期値にリセットします。また、このフォームに追加されたすべてのデータを、メソッド HttpForm.add-fileHttpForm.add-file-data、または HttpForm.add-string-param を使用して削除します。このメソッドは、次に Dialog.reset を呼び出します。
この HttpForm の作成中に追加されたすべての HttpFormParam は、削除されません。

注意事項

全ての ValueControl は初期値を設定し、フォーム内の各コントロールは Reset イベントに送られます。
reset-button プロシージャはフォームの標準リセットボタンを簡単に追加するために使用します。


reset-all (メソッド)
public {HttpForm.reset-all}:void

フォーム内のコントロールを初期値にリセットします。また、この HttpForm を作成するときに追加された HttpFormParam を含む、メソッド HttpForm.add-fileHttpForm.add-file-dataHttpForm.add-string-param を使用し、このフォームに追加されたすべてのデータを削除します。このメソッドは、次に Dialog.reset を呼び出します。

注意事項

全ての ValueControl は初期値に設定され、フォーム内の各コントロールに Reset イベントを送ります。


submit (メソッド)
public {HttpForm.submit
submit-name:#String = null,
submit-value:#String = null
}:void

HttpForm.form-action にフォームとブラウザを送信します。

注意事項

プロシージャ submit-button を使用すると、標準発行ボタンをフォームに簡単に追加できます。
submit-name, submit-value: submit-namesubmit-value が非 null の場合、名前/値のペアがこのフォームで発行されます。名前と値は、いずれも発行される前に URL エンコードされます。


submit-open (メソッド)
public {HttpForm.submit-open
submit-name:#String = null,
submit-value:#String = null,
character-encoding:CharEncoding = CharEncoding.none-specified,
buffer-size:int = {calculate-instances-per-memory-size default-buffer-memory-size, char },
unread-size:int = {min 4, buffer-size div 4},
request-headers:#HttpRequestHeaders = null,
auto-redirect?:bool = true,
always-return-response-headers?:bool = false
}:HttpTextInputStream

HttpForm を発行し、テキスト ストリームとして応答を取得します。

submit-name, submit-value: submit-namesubmit-value が非 null の場合、名前/値のペアがこのフォームで発行されます。名前と値は、いずれも発行される前に URL エンコードされます。
character-encoding: テキスト ストリームから読み込まれる時に使用する文字エンコードを指定します。CharEncoding を参照してください。指定されなかったとき、HttpHeaders.content-type に HTTP "charset" パラメータが存在すれば、それが使用されます。存在しない場合、文字エンコーディングは、可能であればストリームの最初の数バイトから判断されます。これが可能でない場合は、既定の文字エンコーディング CharEncoding.windows-latin-1 が使用されます。
buffer-size: バッファに格納される char の最小数。buffer-sizeunread-size がどちらも 0 の場合、アンバッファ ストリームの作成が可能であればこれを行います。
unread-size: 効果的に読み取り不可能な char の最小数。buffer-sizeunread-size がどちらも 0 の場合、アンバッファ ストリームの作成が可能であればこれを行います。
request-headers: リクエストと共に送信されるヘッダー。
auto-redirect?: true の場合、リクエストは応答のステータスによって自動的にリダイレクトされます。
always-return-response-headers?: 応答ヘッダーのステータスが status-ok でない場合に既定の動作をオーバーライドします。例外を発生させる代わりに、応答ヘッダーにアクセスできるストリームを返します。バージョン 1.7 以降は、返されるストリームにより、応答ヘッダーだけでなく応答の本文にもアクセスできます。したがって、呼び出し側は終了時に HttpTextInputStream.close を呼び出して、接続に関連付けられたリソースを解放する必要があります。

戻り値

このメソッドがオープンする HttpTextInputStream を返します。

説明

返されるストリームは HttpInputStreamInfo から継承されます。HttpInputStreamInfo は応答ヘッダーにアクセスするためのインターフェイスを提供します。

注意事項

HttpFile.http-read-open も参照してください。


submit-open-byte (メソッド)
public {HttpForm.submit-open-byte
submit-name:#String = null,
submit-value:#String = null,
buffer-size:int = {calculate-instances-per-memory-size default-buffer-memory-size, byte },
unread-size:int = {min 4, buffer-size div 4},
request-headers:#HttpRequestHeaders = null,
auto-redirect?:bool = true,
always-return-response-headers?:bool = false
}:HttpByteInputStream

フォームを発行し、バイト ストリームとして応答を取得します。

submit-name, submit-value: submit-namesubmit-value が非 null の場合、名前/値のペアがこのフォームで発行されます。名前と値は、いずれも発行される前に URL エンコードされます。
buffer-size: バッファに格納される char の最小数。buffer-sizeunread-size が両方とも 0 の場合は、できるかぎりバッファリングしないストリームの作成を試みます。どちらかが 0 でない場合、BufferedByteInputStream が返されます。
unread-size: 効率よく読み取ることができない char の最小数。buffer-sizeunread-size が両方とも 0 の場合は、できるかぎりバッファリングしないストリームの作成を試みます。どちらかが 0 でない場合、BufferedByteInputStream が返されます。
request-headers: リクエストと共に送信されるヘッダー。
auto-redirect?: true の場合、リクエストは応答のステータスによって自動的にリダイレクトされます。
always-return-response-headers?: 応答ヘッダー内のステータスが status-ok でない場合に既定の動作をオーバーライドします。例外を発生させる代わりに、応答ヘッダーにアクセスできるストリームを返します。バージョン 1.7 以降は、返されるストリームにより、応答ヘッダーだけでなく応答の本文にもアクセスできます。したがって、呼び出し側は終了時に HttpByteInputStream.close を呼び出して、接続に関連付けられたリソースを解放する必要があります。

戻り値

このメソッドが開く HttpByteInputStream を返します。

説明

返されるストリームは HttpInputStreamInfo から継承されます。HttpInputStreamInfo は応答ヘッダーにアクセスするためのインターフェイスを提供します。

注意事項

HttpFile.http-read-open-byte も参照してください。


unregister-control (メソッド)
public {HttpForm.unregister-control c:Control}:void

Control をこの ControlContainer から登録解除します。

説明

Control は、コンテナから削除されるときに、各々のコントロールコンテナ オプション ハンドラでこれを呼び出す必要があります。
c: 登録解除のコントロール。

オーバーライド

登録されたコントロールを追跡するように、これをオーバーライドします。