OCEツールキットでは、フィールドの外観タイプのコンポーネントを開発するためのサポートを提供しています。開発者はカスタム・フィールド・エディタを作成および管理できます。
フィールドの外観タイプのコンポーネントの場合、次のタスクを実行できます。
フィールドの外観タイプでコンポーネントのリストをフィルタできます。
次のOCEツールキットのコマンドをカスタム・フィールド・エディタの開発に使用できます。
cec add-field-editor <name> Adds a field editor to a field in a content type. [alias: afe] cec remove-field-editor <name> Removes a field editor from a field in a content type. [alias: rfe] ------------------------ cec add-field-editor ------------------------ Usage: cec add-field-editor <name> Adds a field editor to a field in a content type. Options: --template, -t The template the content type is from [required] --contenttype, -c The content type [required] --field, -f The field the field editor is for [required] --contenttemplate, -n Flag to indicate the template is a content template --help, -h Show help [boolean] Examples: cec add-field-editor editor1 -t BlogTemplate -c BlogPost -f summary Use editor1 as the appearance for field summary in content type BlogPost from local template at src/templates/BlogTemplate cec add-field-editor editor1 -t BlogTemplateContent -n -c BlogPost -f summary Use editor1 as the appearance for field summary in content type BlogPost from local template at src/content/BlogTemplateContent ------------------------ cec remove-field-editor ------------------------ Usage: cec remove-field-editor <name> Removes a field editor from a field in a content type. Options: --template, -t The template the content type is from [required] --contenttype, -c The content type [required] --field, -f The field the field editor is for [required] --contenttemplate, -n Flag to indicate the template is a content template --help, -h Show help [boolean] Examples: cec remove-field-editor editor1 -t BlogTemplate -c BlogPost -f summary Remove editor1 as the appearance for field summary in content type BlogPost from local template at src/templates/BlogTemplate cec remove-field-editor editor1 -t BlogTemplateContent -n -c BlogPost -f summary Remove editor1 as the appearance for field summary in content type BlogPost from local template at src/content/BlogTemplateContent
フィールドの外観コンポーネントの次のサンプルは、OCEツールキットに含まれています。
TextFieldEditor
SliderFieldEditor
MapFieldEditor
次の図は、サンプルのフィールドの外観コンポーネントの開発に使用できるOCEツールキットのコマンドを示しています。
ローカル・サーバー上ですぐに使用可能なフィールドの外観コンポーネントを作成し、これらをテストしてから、Oracle Content Managementインスタンスにアップロードできます。次の図は、localhost:8085
でこれらのコンポーネントを示しています。
ローカル・サーバーでスライダなどの各コンポーネントをテストできます。コンポーネントのプロパティを選択して、これを保存します。
マップ・コンポーネントの場合、マップの周りをクリックして、エディタ値として場所を指定できます。
コンポーネントのHTMLファイルを編集して、背景色などの設定を変更できます。
OCEツールキットのコマンドを使用すると、フィールド・エディタをコンテンツ・タイプのフィールドとローカルに関連付けることができます。
cec add-field-editor editor1 -t SimpleContent -n -c SimpleType -f title cec add-field-editor slider -t SimpleContent -n -c SimpleType -f value
カスタム・フィールド・エディタの構成およびテストが完了すると、OCEツールキットのコマンドを使用して、これらをOracle Content Managementインスタンスにアップロードできます:
# upload editors cec ulcp editor1,slider -p -s Latest # upload content cec cr Repo5 -s cec upload-content SimpleContent -r Rpo5 -s
カスタム・フィールド・エディタをアップロードすると、コンポーネントがOracle Content Managementインスタンスにインポートされます。