components.PowerPortalsPro.Demo.Client.Customizations.Pages.Contexts.RecordContext.RecordContextDemoPage.main-demo-description
components.PowerPortalsPro.Demo.Client.Customizations.Pages.Contexts.RecordContext.RecordContextDemoPage.loading-description
{/* components.PowerPortalsPro.Demo.Client.Customizations.Pages.Contexts.RecordContext.RecordContextDemoPage.snippet-loading-react-create-comment-line1
components.PowerPortalsPro.Demo.Client.Customizations.Pages.Contexts.RecordContext.RecordContextDemoPage.snippet-loading-react-create-comment-line2 */}
<RecordContext table="contact">
<TextEdit columnName="firstname" />
<TextEdit columnName="lastname" />
</RecordContext><RecordContext Record="@(new TableRecord { TableName = "contact" })">
<TextEdit ColumnName="firstname" />
<TextEdit ColumnName="lastname" />
</RecordContext>{/* components.PowerPortalsPro.Demo.Client.Customizations.Pages.Contexts.RecordContext.RecordContextDemoPage.snippet-loading-url-comment */}
<RecordContext table="contact" queryParameterName="id">
<TextEdit columnName="firstname" />
<TextEdit columnName="lastname" />
</RecordContext><!-- components.PowerPortalsPro.Demo.Client.Customizations.Pages.Contexts.RecordContext.RecordContextDemoPage.snippet-loading-url-comment -->
<RecordContext TableName="contact" QueryParameterName="id">
<TextEdit ColumnName="firstname" />
<TextEdit ColumnName="lastname" />
</RecordContext><RecordContext table="contact" id="00000000-0000-0000-0000-000000000001">
<TextEdit columnName="firstname" />
</RecordContext><RecordContext TableName="contact" RecordId="00000000-0000-0000-0000-000000000001">
<TextEdit ColumnName="firstname" />
</RecordContext>components.PowerPortalsPro.Demo.Client.Customizations.Pages.Contexts.RecordContext.RecordContextDemoPage.record-loaded-description
function MyPage() {
const onRecordLoaded = (record: TableRecord) => {
// Initialize dependent state or load related data
};
return (
<RecordContext
table="contact"
queryParameterName="id"
onRecordLoaded={onRecordLoaded}
>
<TextEdit columnName="firstname" />
</RecordContext>
);
}<RecordContext TableName="contact"
QueryParameterName="id"
RecordLoaded="OnRecordLoaded">
<TextEdit ColumnName="firstname" />
</RecordContext>
@code {
private async Task OnRecordLoaded(TableRecord record)
{
// components.PowerPortalsPro.Demo.Client.Customizations.Pages.Contexts.RecordContext.RecordContextDemoPage.snippet-loaded-initialize-comment
}
}components.PowerPortalsPro.Demo.Client.Customizations.Pages.Contexts.RecordContext.RecordContextDemoPage.context-template-description
{/* components.PowerPortalsPro.Demo.Client.Customizations.Pages.Contexts.RecordContext.RecordContextDemoPage.snippet-context-template-react-comment-line1
components.PowerPortalsPro.Demo.Client.Customizations.Pages.Contexts.RecordContext.RecordContextDemoPage.snippet-context-template-react-comment-line2 */}
function ContactHeader() {
const { record } = useRecordContext();
return <h2>components.PowerPortalsPro.Demo.Client.Customizations.Pages.Contexts.RecordContext.RecordContextDemoPage.snippet-context-template-editing-label {String(record?.['firstname']?.value ?? '')}</h2>;
}
<RecordContext table="contact" queryParameterName="id">
<ContactHeader />
<TextEdit columnName="firstname" />
<TextEdit columnName="lastname" />
</RecordContext><RecordContext TableName="contact" QueryParameterName="id">
<ContextTemplate>
<h2>components.PowerPortalsPro.Demo.Client.Customizations.Pages.Contexts.RecordContext.RecordContextDemoPage.snippet-context-template-editing-label @context["firstname"]</h2>
<TextEdit ColumnName="firstname" />
<TextEdit ColumnName="lastname" />
</ContextTemplate>
</RecordContext>components.PowerPortalsPro.Demo.Client.Customizations.Pages.Contexts.RecordContext.RecordContextDemoPage.deleting-description
function MyPage() {
const onBeforeDelete = async () => {
// components.PowerPortalsPro.Demo.Client.Customizations.Pages.Contexts.RecordContext.RecordContextDemoPage.snippet-delete-react-comment-line1
// components.PowerPortalsPro.Demo.Client.Customizations.Pages.Contexts.RecordContext.RecordContextDemoPage.snippet-delete-react-comment-line2
};
return (
<RecordContext
table="contact"
queryParameterName="id"
onBeforeDelete={onBeforeDelete}
>
<MenuBar>
<DeleteContextButton />
</MenuBar>
<TextEdit columnName="firstname" />
</RecordContext>
);
}<RecordContext TableName="contact"
QueryParameterName="id"
OnBeforeDelete="OnBeforeDelete">
<MenuBar>
<DeleteContextButton />
</MenuBar>
<TextEdit ColumnName="firstname" />
</RecordContext>
@code {
private async Task OnBeforeDelete(CancelEventArgs eventArgs)
{
// components.PowerPortalsPro.Demo.Client.Customizations.Pages.Contexts.RecordContext.RecordContextDemoPage.snippet-delete-razor-comment-line1
// components.PowerPortalsPro.Demo.Client.Customizations.Pages.Contexts.RecordContext.RecordContextDemoPage.snippet-delete-razor-comment-line2
}
}components.PowerPortalsPro.Demo.Client.Customizations.Pages.Contexts.RecordContext.RecordContextDemoPage.navigation-description
components.PowerPortalsPro.Demo.Client.Customizations.Pages.Contexts.RecordContext.RecordContextDemoPage.example-description
components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.name | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.type | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.default | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.description |
|---|---|---|---|
ChildContent | RenderFragment? | この文脈でレンダリングされる子コンポーネント。 | |
ContextTemplate | RenderFragment<TableRecord> | 必要に応じて、記録用のテンプレートを指定することもできます。これによりテンプレート内の「TableRecord」オブジェクトにアクセスできます。 | |
DisableUnsavedChangesWarning | bool? | trueに設定すると、ページから離れる際に未保存の変更警告ダイアログが表示されません。 この設定に関係なく、リフレッシュ時に常に警告が表示されます。 明示的に設定されていない場合、その値は親コンテキストから継承されます。 | |
ForceSuccessfulValidationBeforeSave | bool | True | 記録の検証が成功してから保存を許可した場合、 |
IsDirty | bool | False | レコードや登録済みの子コンテキストに保存されていない変更があるかどうかを示します。 |
ParentContext | MainContext? | 最も近い祖先であるMainContextにより、ネストされたコンテキスト階層が可能になりました。 | |
QueryParameterName | string? | 取得すべきレコードのIDを指定するクエリパラメータの名前。 | |
Record | TableRecord? | この記録はこの記録の文脈にリンクされています。 | |
RecordId | string? | コンテキストのためにレコードの具体的なGUIDを使います。 | |
TableName | string? | レコードの論理名。 |
ChildContentContextTemplateDisableUnsavedChangesWarningForceSuccessfulValidationBeforeSaveIsDirtyParentContextQueryParameterNameRecordRecordIdTableNamecomponents.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.name | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.type | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.description |
|---|---|---|
OnBeforeDelete | EventCallback<CancelEventArgs> | コールバックから連絡があり、その後削除されました。削除操作のキャンセルを可能にします。 |
OnBeforeSave | EventCallback<CancelEventArgs> | コールバックから電話がかかってきて、セーブ前に電話がかかってきた。セーブ操作をキャンセルすることが可能です。 |
RecordLoaded | EventCallback<TableRecord> | レコードが読み込まれたときにトリガーされるEventCallback。 |
OnBeforeDeleteOnBeforeSaveRecordLoadedcomponents.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.name | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.parameters | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.type | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.description |
|---|---|---|---|
DeleteAsync | Task<bool> | 確認を求めるプロンプトが出た後、現在の記録が削除されます。 | |
GetRequests | List<OrganizationRequest> | レコードが汚れている場合は作成または更新リクエストを返し、子コンテキストからのリクエストも返します。 | |
RefreshAsync | bool forceRefresh | Task | サーバーからレコードを再読み込み、未保存の変更についてのプロンプトもオプションで表示します。 |
ResetState | void | レコードとすべての子コンテキストを最後に保存した状態にリセットします。 | |
SaveAsync | bool? refresh | Task<bool> | レコードを保存し、新しく作成されたレコードURLにナビゲートします。 |
Validate | bool | レコードとサブコンテキスト(グリッド、ルックアップ編集、レコード、メイン)を検証します。 |
DeleteAsyncGetRequestsRefreshAsyncResetStateSaveAsyncValidate