Discussions
Categories
- 196.8K All Categories
- 2.2K Data
- 238 Big Data Appliance
- 1.9K Data Science
- 450.2K Databases
- 221.7K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 550 MySQL Community Space
- 478 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 544 SQLcl
- 4K SQL Developer Data Modeler
- 187K SQL & PL/SQL
- 21.3K SQL Developer
- 295.8K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.5K Development Tools
- 107 DevOps
- 3.1K QA/Testing
- 646K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 154 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 18 Java Essentials
- 160 Java 8 Questions
- 86K Java Programming
- 80 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 204 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 437 LiveLabs
- 38 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 171 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 232 Portuguese
WHEN-TREE-NODE-EXPANDED is not firing

Do you have any idea why an WHEN-TREE-NODE-EXPANDED trigger fails to fire in my form ?
My form has a tree with an item level WHEN-TREE-NODE-EXPANDED trigger.
Node 2.1 is initially collapsed.
The trigger usually fires when the user clicks on the NODE 2.1 (+) but it fails to fire about 1 in 20 time when testing. The node expands, but the trigger does not fire
There are no other WHEN-TREE-NODE-EXPANDED triggers at the form or block level
The test case is simple and reproducible in the application so I am very confident that the trigger is not firing. ... open the form, navigate to a tab that has the tree control on it, the tree will be populated with data. click on the (+) link to expand one of the nodes in the tree
Environment Forms 11.1.2.2.0, Java 8 update 66, client Windows 10 v1809
Any ideas on why WHEN-TREE-NODE-EXPANDED it fails to fire every time ?
Answers
-
Does it fail to fire or does the node not expand?
Add messages to verify : for example at the end of the trigger
show_message('Succes ' || to_char(sysdate,'MI-SS'));
exception
when form_trigger_failure then show_mesage('Failure ' || to_char(sysdate,'MI-SS'));raise;
when others then show_message(Others ' || to_char(sysdate,'MI-SS'));raise;
Does the node expand if you click it a second time? If no, what have you to do to resume expanding?
What happens within the trigger?
-
Hey Hub
The node expands correctly but the trigger does not fire
I have removed the trigger code and replaced it with just a simple message but the message does not appear. I have also tried logging text to a file in case the message was getting intercepted in ON-ERROR or ON-MESSAGE triggers but the same thing ... the trigger does not appear to be firing at all.
-
"Does not appear to be firing at all" : does it now always or again about 1 in 20 times?
Unlikely 1, check if there exist the same trigger on a higher level (block/form) and if there is a change in default trigger Execution Hierarchy causing that other trigger to be fired first (and maybe only).
Unlikely 2, check if there are timers set and when_timer_expired triggers can fire that can explain that differences in time can explain differences in behaviour
Unlikely 3. I don't know the options in your current forms version, but in the past I "solved" some strange problems by converting the fmb to a text format and back to fmb. In this situation I would remove the trigger before the conversion and add it again after conversion back to fmb.
-
Hub
** "Does not appear to be firing at all" : does it now always or again about 1 in 20 times?
It is very random. I can do the exact same steps and it only fails to fire 1 in 20 times. It could be the first 1st of 10th or 20th time ... but almost always before the 20th time
** Unlikely 1, check if there exist the same trigger on a higher level (block/form) and if there is a change in default trigger Execution Hierarchy causing that other trigger to be fired first (and maybe only).
There are no other node triggers in the form
** Unlikely 2, check if there are timers set and when_timer_expired triggers can fire that can explain that differences in time can explain differences in behaviour
There is no when-timer-expired trigger in the form
** Unlikely 3. I don't know the options in your current forms version, but in the past I "solved" some strange problems by converting the fmb to a text format and back to fmb. In this situation I would remove the trigger before the conversion and add it again after conversion back to fmb.
Done already - same issue
I have also recompiled the form and all libraries attached to the form.
Thanks for the feedback. Some good ideas there
-
Exactly (e.g. 12.2.1.3, 10.1.2.2, etc) which Forms version and which Java version on the user’s machine?
Michael Ferrante
Senior Principal Product Manager
Oracle
Twitter: @OracleFormsPM
-
Forms 11.1.2.2.0
Java 8 update 66
Our upgrade process is very slow so upgrading Forms or Java is not an option
-
Our upgrade process is very slow..
This is a bit of an understatement. Forms 12.2.1 has been available since 2015 (approximately 7 years ago). Java 8u66 was also released in 2015. This is not a good practice. With such long upgrade cycles, your environment may be at risk. It seems that addressing this issue should be priority #1 over developing new code.
Regarding the issue you reported, I tested in 12.2.1.4 (on a Windows server and Windows client) with Java 8u331 and mostly (see my final comment below) cannot reproduce what you described. The trigger fires every time a node is expanded (or collapsed). For the sake of completeness, I also tested in a nightly build of the next planned major release (running on a Linux server) and again, the problem does not reproduce.
That said, I was able to reproduce what you claimed IF I clicked on the node symbol repeatedly within about a one second period. In other words, if I tried to open then immediately click the same node again quickly. I also noted that the reproducibility seems to be tied to how much plsql is in the trigger and how complex it is. The simpler the plsql the more likely the problem would reproduce. Here is an example:
-- THIS REPRODUCES CLEAR_MESSAGE; MESSAGE ('Fired' || ' at ' || to_char(CURRENT_TIMESTAMP,'HH24:MI:SS'));
Note that the only difference below is the addition of the fractions of a second. However, with this change the problem does not reproduce.
-- THIS DOES NOT REPRODUCE CLEAR_MESSAGE; MESSAGE ('Fired' || ' at ' || to_char(CURRENT_TIMESTAMP,'HH24:MI:SS.FF'));
This issue can be investigated by Forms Development, however if it is something that can be corrected a fix would only be provided to 12.2.1.4+. It is also possible that the issue cannot be corrected.
Michael Ferrante
Senior Principal Product Manager
Oracle
Twitter: @OracleFormsPM
-
My previous response (above) can be ignored.
Upon further investigation, I can see that I am not reproducing the problem. Rather what I was seeing is that the node symbol was being clicked multiple times within the same second. The result is that it gave the appearance of the trigger not firing when really it was firing.
So, that leaves me to say that the problem you described is not reproducible in 12.2.1.4 using newer Java versions.
Michael Ferrante
Senior Principal Product Manager
Oracle
Twitter: @OracleFormsPM
-
Thanks you for investigating Michael
I will notify my team about your finding
The customer is aware that they are well behind on software versions and need to upgrade
regards
Scott Hollows