1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[まとめ]プリザンターのcontext.AddResponseの引数への指定例

Posted at

はじめに

先日の記事で紹介したcontext.AddResponseのMethodについての記事を、どんな引数をセットすれば良いのかを含めて一覧にしてみました。早引きにご使用ください。

前提

マニュアルにはcontext.AddResponse(method,target,value)とありますが、実装上はcontext.AddResponse(method,target,value,options)となっています。デフォルト引数(null)が設定されているので、一部引数は省略可能です。引数の設定パターンは下記の通りです。

  1. context.AddResponse(method)
  2. context.AddResponse(method,target)
  3. context.AddResponse(method,target,value) マニュアル記載
  4. context.AddResponse(method,target,value,options)

メソッド一覧

method target value options 実装 備考
Html <セレクタ> <任意の文字列> [未使用] $(target).html(value);
ReplaceAll <セレクタ> <任意の文字列> [未使用] $(value).replaceAll(target);
Message #Message JSON.stringify({Css: <メッセージタイプ>,Text: <任意のメッセージ>}) [未使用] $p.setMessage(target, value); 詳細は開発者向け機能:スクリプト:$p.setMessageを参照
Href 空文字列 <遷移先URL> [未使用] location.href = value;
PushState <任意のキー文字列> <スタック先URL> [未使用] history.pushState(target, '', value);
Set <項目物理名> <任意の文字列> [未使用] $p.set($p.getControl(target), value); 詳細は開発者向け機能:スクリプト:$p.set/開発者向け機能:スクリプト:$p.getControlを参照
Set <セレクタ> <任意の文字列> [未使用] $p.set($(target), value); 詳細は開発者向け機能:スクリプト:$p.setを参照
SetData <セレクタ> [未使用] [未使用] $p.setData($(target));
SetMemory <任意のキー文字列> <任意の文字列> [未使用] data[target] = value;
Append <セレクタ> <任意の文字列> [未使用] $(target).append(value);
Prepend <セレクタ> <任意の文字列> [未使用] $(target).prepend(value);
After <セレクタ> <任意の文字列> [未使用] $(target).after(value); 存在しないセレクタを指定するとNULL例外が発生するので注意
Before <セレクタ> <任意の文字列> [未使用] $(target).before(value); 存在しないセレクタを指定するとNULL例外が発生するので注意
InsertText <セレクタ> <任意の文字列> [未使用] var body = $(target).get(0);body.focus();var start = body.value;var caret = body.selectionStart;var next = caret + value.length;body.value = start.substr(0, caret) + value + start.substr(caret);body.setSelectionRange(next, next); 説明項目をセレクタとして使用することが前提
Remove <セレクタ> [未使用] [未使用] $(target).remove();
Attr <セレクタ> JSON.stringify({Name: <属性名>,Value: <属性値>}) [未使用] var json = JSON.parse(value);$(target).attr(json.Name, json.Value);
RemoveAttr <セレクタ> <属性名> [未使用] $(target).removeAttr(value);
Css <セレクタ> JSON.stringify({Name: <プロパティ>,Value: <値>}) [未使用] var json = JSON.parse(value);$(target).css(json.Name, json.Value);
Focus <セレクタ> [未使用] [未使用] $(target).focus();
SetValue <セレクタ> <任意の文字列> [未使用] $p.setValue($(target), value);
ClearFormData <セレクタ> <任意の文字列> [未使用] $p.clearData(target, $p.getData($('.main-form'), value);
CloseDialog <セレクタ> [未使用] [未使用] $(target).dialog('close'); モーダルIDをセレクタとして使用することが前提
Paging <セレクタ> [未使用] [未使用] $p.paging(target);
Toggle <セレクタ> 1 or 0 [未使用] $(target).toggle(value === '1');
Trigger <セレクタ> <イベント名> [未使用] $(target).trigger(value);
Invoke <任意のキー文字列> <任意の文字列> [未使用] $p[target](value);
Events <関数名> [未使用] [未使用] $p.execEvents(target, '');
WindowScrollTop 空文字列 <スクロール量> [未使用] $(window).scrollTop(value);
ScrollTop <セレクタ> <スクロール量> [未使用] $(target).scrollTop(value);
LoadScroll 空文字列 [未使用] [未使用] $p.loadScroll();
FocusMainForm 空文字列 [未使用] [未使用] $p.focusMainForm();
Disabled <セレクタ> true or false [未使用] $(target).prop('disabled', value);
Log 空文字列 <任意の文字列> [未使用] console.log(value);
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?