|
Returns the query parameter name under which a cancel button press
must be reported if form validation is to be skipped.
- Returns
-
The value of
org.apache.struts.taglib.html.Constants.CANCEL_PROPERTY
If a request contains a request parameter with key equal to the return value
of this method, then automatic form validation is skipped. A typical application
case is to use this magic string for the name attribute of a cancel button in a form.
If this button is pressed, automatic form validation is skipped. If automatic form
validation is not used, this magic string is irrelevant.
## A cancel button
<input type="submit" name="$form.getCancelName()" value="Cancel">
## Can also be written as
<input type="submit" name="$form.cancelName" value="Cancel">
|
|
This produces the following output:
<input type="submit" name="org.apache.struts.taglib.html.CANCEL"
value="Cancel">
|
|
キャンセルボタンが押下された場合の、
フォームの自動バリデーションのスキップを通知するクエリパラメータの名称を返却します。
- Returns
-
org.apache.struts.taglib.html.Constants.CANCEL_PROPERTY の値。
リクエストパラメータのキーにこのメソッドの返却値と同じ値が含まれていた場合、フォームの自動バリデーションがスキップされます。
一般的なアプリケーションでは、フォームのキャンセルボタンの name 属性でこの「おまじない」を使います。
このボタンが押下された場合、フォームの自動バリデーションがスキップされます。
もしフォームの自動バリデーションを行っていない場合、この「おまじない」は何の意味もありません。
## キャンセルボタン
<input type="submit" name="$form.getCancelName()" value="Cancel">
## これはこのようにも書けます
<input type="submit" name="$form.cancelName" value="Cancel">
|
|
これは以下の出力を生成します:
<input type="submit" name="org.apache.struts.taglib.html.CANCEL"
value="Cancel">
|
|
|