Note: In form builder, triggers 'execution hierarchy' caused funny issue in enter-query mode.
2008-10-10 18:17
337 查看
Today, I'm almost tortured by the weird form behavior in enter-query mode in one of my custom forms.
Yesterday, I don't remeber exactly when, the block could still turn to light-blue when I hit F11 to enter 'enter-query' mode. But later I noticed it didn't change but always in white color.
I checked all the properties of the form, block and item, but none look suspicious. I also compare the properties with those in a standard form. Also nonthing suspicious.
Later I tried to copy all the objects, including blocks,lov,record groups, program units etc into a new form and run , still the same. How come? It has been torturing me almost about 4 hours.
Finally I checked metalink and found a note(133933.1) about how to change color of item in enter-query mode, actually in Oracle form there's no such attribute to easily set this. The note provided a sample plsql unit to loop all the item and set different visual attribute for items in normal mode and enter-query mode. So suddenly I thought it's the trigger that cause the weird behavior. So I delete some triggers and it proved my guess. After some narrowing down, I finally located it's the 'when-new-record-instance' trigger. I know the standard feature must be in app_standard.even('when-new-record-instance'), so I added it to block level 'when-new-record-instance' trigger and it worked. Then how come the form lever one was not executed? Then I realized it's the 'execution hierarchy' I tried to set this block level one to 'Before' and 'After' and 'Before' behaves what I expected. So it's solved.
Yesterday, I don't remeber exactly when, the block could still turn to light-blue when I hit F11 to enter 'enter-query' mode. But later I noticed it didn't change but always in white color.
I checked all the properties of the form, block and item, but none look suspicious. I also compare the properties with those in a standard form. Also nonthing suspicious.
Later I tried to copy all the objects, including blocks,lov,record groups, program units etc into a new form and run , still the same. How come? It has been torturing me almost about 4 hours.
Finally I checked metalink and found a note(133933.1) about how to change color of item in enter-query mode, actually in Oracle form there's no such attribute to easily set this. The note provided a sample plsql unit to loop all the item and set different visual attribute for items in normal mode and enter-query mode. So suddenly I thought it's the trigger that cause the weird behavior. So I delete some triggers and it proved my guess. After some narrowing down, I finally located it's the 'when-new-record-instance' trigger. I know the standard feature must be in app_standard.even('when-new-record-instance'), so I added it to block level 'when-new-record-instance' trigger and it worked. Then how come the form lever one was not executed? Then I realized it's the 'execution hierarchy' I tried to set this block level one to 'Before' and 'After' and 'Before' behaves what I expected. So it's solved.
相关文章推荐
- 关于NSAutoreleasePool' is unavailable: not available in automatic reference counting mode
- firmware upgrade encountered an issue.please select recovery mode in kies & try again
- error: 'for' loop initial declarations are only allowed in C99 mode
- Error is: '[Deployer:149164]The domain edit lock is owned by another session in exclusive mode - he
- [MySQL 工具] pt-query-digest使用出错问题分析Can't locate Time/HiRes.pm in @INC
- PL/SQL 报错:A query with LOB's requires OCI8 mode, but OCI7 mode is used
- NSAutoreleasePool' is unavailable: not available in automatic reference counting mode
- Stored procedure 'zhanghouying' may be run only in unchained transaction mode. The 'SET CHAINED OFF' command will cause the curr
- Firefox is currently in offline mode and can't browse the Web
- c++ builder TADOQuery控件的type mismatch for field‘note',expecting: String actual: Memo.
- CodeBlock编辑器GCC环境下,编译报错:Execution of 'mingw32-g++.exe -o bin\Debug\test.exe obj\Debug\main.o' in 'C
- error: 'for' loop initial declarations are only allowed in C99 mode
- This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery
- release' is unavailable: not available in automatic reference counting modeAutomatic
- This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
- 关于NSAutoreleasePool' is unavailable: not available in automatic reference counting mode的解决方法
- Write operations are not allowed in read-only mode (FlushMode.NEVER) - turn your Session into FlushMode.AUTO or remove 'readOnly
- Could not find default endpoint element that references contract 'wcfXXXXXXXXXXX' in the ServiceMode
- Fatal error: Undefined class constant 'MYSQL_ATTR_USE_BUFFERED_QUERY' in
- 错误:'release' is unavailable: not available in automatic reference counting mode..(Xcode4.2.1+iOS5.0)