Not able to disable a button in FORMS 5.0

From: Kiran Anumolu <anumolu_kiran_at_hotmail.com>
Date: Fri, 21 Jan 2000 14:25:12 -0600
Message-ID: <3888C0A8.2A527FA4_at_hotmail.com>



[Quoted] I am experiencing some problems when I try to disable a button. This is using FORMS 5.0 (Developer 6) and Oracle 8.0.5 on NT 4.0

I have a simple FORM with 2 text fields say FirstName and LastName fields and 2 buttons 'SAVE' and 'CLOSE'. I have a menu attached to the FORM so the default menu is not there any more. Now, once the user enters a first name and last name and presses the 'SAVE' button I want the data to be inserted into the database and disable the 'SAVE' button.

The Code in 'SAVE' button trigger is

if(:system.form_status = 'CHANGED') then

    commit_form;
end if;
Every thing works fine once the users enters some data and presses 'SAVE'. The data goes into the table (the 'SAVE' button is still enabled though).

Now, in order to disable the button I wrote this in the POST-INSERT trigger (I tried in ON-INSERT also) of the block.
SET_ITEM_PROPERTY('SAVE', ENABLED, PROPERTY_FALSE); Now, with this new code added, the 'SAVE' button gets disabled once the user presses it, and I get a message 'Transaction completed 1 row inserted' some thing like that, indicating that the row is inserted into the table, but NO. It does not. So the button is getting disabled but the new data in not commited into the database.

Any ideas as to what I am missing here?

Thanks.

--kiran
  anumolu_kiran_at_hotmail.com Received on Fri Jan 21 2000 - 21:25:12 CET

Original text of this message