Home » Developer & Programmer » Forms » Event triggered when a form is closed
Event triggered when a form is closed [message #253966] Wed, 25 July 2007 07:03 Go to next message
Tulasip
Messages: 2
Registered: July 2007
Junior Member
I am doing form personalization. when_new_form_instance event is fired, I am creating a trigger. I want to disable this trigger when the user closes this form( i.e when the user clicks on 'X' on the window).
I have used when_form_navigate event, but this is not giving the expected result. I used when-window-closed event also. It was not getting fired when I am closing the window. Please help me.
Re: Event triggered when a form is closed [message #254057 is a reply to message #253966] Wed, 25 July 2007 11:50 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm not sure I understood what you are saying.

"I am creating a trigger". Which one? The WHEN_NEW_FORM_INSTANCE one? And you'd like to disable it when closing the form?

If so, why? It fires when the form starts, not when it closes.

But OK, I'd say that I didn't get the point here, so - could you explain it a little bit more, please?

(BTW, did you try the KEY-EXIT trigger?)

I'd just like to add that - if you need to disable part of a code (i.e. it should execute when form starts and not when it ends or whatever it is), perhaps you should move this code into a PROCEDURE and put something like this into a trigger: set a global variable (or a parameter) at certain point of time and check its value as
IF :global.should_i_be_executed = 'Y'
THEN
   exec_my_procedure;
ELSIF :global.should_i_be_executed = 'N'
THEN
   NULL;
END IF;

I'm sorry if nothing of this helps ...
Re: Event triggered when a form is closed [message #254201 is a reply to message #254057] Thu, 26 July 2007 02:40 Go to previous messageGo to next message
Tulasip
Messages: 2
Registered: July 2007
Junior Member
Thanks for the quick response.

I have defined a seq 10 with
a) Condition
Trigger Event = WHEN-NEW-FORM-INSTANCE
b) Action
Type = Builtin
Builtin Type = Forms_DDL
Argument = Script for creating a trigger

I have created another seq 20 with
a) Condition
Trigger Event = WHEN-FORM-NAVIGATE
b) Action
Type = Builtin
Builtin Type = Forms_DDL
Argument = scritpt to disable the trigger

When form is opened, trigger is getting created.
But when the user closes the form, it is not disabling the trigger. User closes the form by clicking on 'X' on the window.

As per your suggesion , I have changed the trigger event to POST-FORM in seq20. It is not working.

I have tried with POST-FORM, WHEN-WINDOW-CLOSED events also. They are not working.
Please help me in this.
Re: Event triggered when a form is closed [message #254355 is a reply to message #254201] Thu, 26 July 2007 09:52 Go to previous messageGo to next message
linlasj
Messages: 98
Registered: August 2005
Location: Linköping
Member
Hi,
the trigger KEY-EXIT should work here, but it does not. I just tested this...It fires when you exit the form in a normal way. But not if you press the Oracle Forms x at the upper right.

There must be a way to catch that event of pressing the x in the upper right.


Best Regards,
Lars
Re: Event triggered when a form is closed [message #254357 is a reply to message #254355] Thu, 26 July 2007 09:58 Go to previous messageGo to next message
linlasj
Messages: 98
Registered: August 2005
Location: Linköping
Member
Hi,
Btw, WHEN-WINDOW-CLOSED is referring to the "inner" window, not the browser window. But the "inner" window in the OC4J environment (I presume you are testing on your PC) should be able to "reach" programmaticly.


Br,
Lars
Re: Event triggered when a form is closed [message #654382 is a reply to message #254357] Mon, 01 August 2016 12:20 Go to previous message
jademad
Messages: 7
Registered: May 2011
Location: Bahrain
Junior Member
KEY-EXIT
THIS TRIGGER CATCH THE CLICKING ON THE (x) ON THE UPPER RIGHT OF THE FORM

SO U CAN WRITE
NULL;
ON THIS TRIGGER TO DISABLE THIS (x) FROM EXITING THE WINDOWS
Previous Topic: ora-12224 tns no listene at user computer
Next Topic: not firing pre-query
Goto Forum:
  


Current Time: Thu Dec 08 22:04:06 CST 2016

Total time taken to generate the page: 0.12164 seconds