ListItemEventHandler does not fire on the prospective list

简介: Today I met a problem. I have several list definition in my project. I attached ListItemEventHandler to every list.

Today I met a problem. I have several list definition in my project. I attached ListItemEventHandler to every list. Every List inherits from Custom List. I deploy the solution and create a Custom List on the deployed site. When I add an item to the Custom List, every eventhandler fire. I don't know what caused this and I didn't find the reason. After I recreate features, it works.

 

ListItem的事件接收器没有在预期的列表上触发

 

今天我遇到了一个问题。在我的工程里有几个列表定义,我在每个列表上添加了ListItem的事件接收器。每个列表定义都继承自自定义列表。我把解决方案部署之后,在目标站点上创建了一个自定义列表。当我向自定义列表里添加项目的时候,每个事件接收器都被触发了。我不知道什么造成了这个问题,没有找到原因。当我重建功能之后,它如期望地运行了。

 

Update: The reason is the feature's scope is site. I changed the socpe to web and it works.

 

更新:原因找到了,是因为功能的范围设置成了Site,改为Web就可以了。

相关文章
Unknown custom element: <add-employee> - did you register the component correctly? For red cursive c
原因: 1.组件名没写对(导入和注册不对应) 2.components少写了个s 3.组件命名最好是驼峰命名 4.导入时语法错误 5.代码中有两个components,后一个的值把前一个覆盖了 6.组件直接循环套用了
101 0
|
12月前
Error:Elements in iteration expect to have ‘v-bind:key‘ directives
Error:Elements in iteration expect to have ‘v-bind:key‘ directives
|
JSON 数据格式
成功解决 global init errTypeError:Right-hand side of 'instanceof' is not callable
成功解决 global init errTypeError:Right-hand side of 'instanceof' is not callable
|
NoSQL MongoDB 数据库
DeprecationWarning: count is deprecated. Use Collection.count_documents instead
当我使用pymongo查询出对应的cursor(find出的document的迭代器),然后查看查询出数据的数量时使用如下代码: ```python db = MongoClient(host='192.168.1.3', port=27017) # dbname为操作的数据库名称,collectionname为操作的集合名称
347 0
SAP QM 执行事务代码QP01,系统报错 -Material type FOOD is not defined for task list type Q-
SAP QM 执行事务代码QP01,系统报错 -Material type FOOD is not defined for task list type Q-
SAP QM 执行事务代码QP01,系统报错 -Material type FOOD is not defined for task list type Q-
Fire!!
Joe works in a maze. Unfortunately, portions of the maze have caught on fire, and the owner of the maze neglected to create a fire escape plan. Help Joe escape the maze.
136 0