【发布时间】:2014-08-04 00:51:54
【问题描述】:
我们需要输入什么对象类型才能在 Kentico v8 的 Uniselector 控件中选择自定义文档类型?
在 Kentico v7.0.34 中,我们成功地使用 UniSelector 来选择自定义文档类型,如下所示;
- 对象类型:customtableitem.custom.Course
- 返回列名:CourseID
- 显示名称格式:{%Name%}
- 选择模式:多个
- 订购者:姓名
但是,在 Kentico v8.0.17 中,使用上述值时出现以下错误;
[CustomTableItemProvider.GetTypeInfo]:“custom.course”类不是自定义表格。
Server Error in '/' Application.
[CustomTableItemProvider.GetTypeInfo]: Class 'custom.course' is not custom table.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Exception: [CustomTableItemProvider.GetTypeInfo]: Class 'custom.course' is not custom table.
Source Error:
Line 1094: private void LoadObjects()
Line 1095: {
Line 1096: if (Object != null)
Line 1097: {
Line 1098: // Reset string builder
Source File: c:\Visual Studio\Projects\Kentico8\CMS\CMSAdminControls\UI\UniSelector\UniSelector.ascx.cs Line: 1096
我们已尝试如下更改对象类型;
- 对象类型:custom.Course
这个结果是下面的错误;
找不到对象类型“custom.course”。
Server Error in '/' Application.
Object type 'custom.course' not found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Exception: Object type 'custom.course' not found.
Source Error:
Line 1094: private void LoadObjects()
Line 1095: {
Line 1096: if (Object != null)
Line 1097: {
Line 1098: // Reset string builder
Source File: c:\Visual Studio\Projects\Kentico8\CMS\CMSAdminControls\UI\UniSelector\UniSelector.ascx.cs Line: 1096
我已阅读文档available here,对于对象类型,它提供了“cms.user”的示例值。将对象类型设置为“cms.user”确实适用于选择 CMS 用户。
我还创建了一个名为“Test”的自定义表,并且可以确认将对象类型设置为“customtableitem.customtable.Test”对于选择自定义表项确实有效。
我也在 Kentico 的 dev.net Q&A 网站上问过这个问题; https://devnet.kentico.com/questions/uniselector-in-kentico-v8
干杯,
达伦
【问题讨论】:
标签: kentico