Home » Developer & Programmer » Forms » fields on a data block not getting refreshed (Oracle forms 10G, XP)
fields on a data block not getting refreshed [message #301953] Fri, 22 February 2008 08:04 Go to next message
bahubcd
Messages: 36
Registered: July 2007
Location: Bangalore
Member
Hi all,
I am developing a form where in there is a search screen and a display screen.

there are some text items on the search screen. There is a refresh button (In the action data block), by the press of which all the fields in the search block should be enabled and cleared (i.e. shud b null).

Has any one come across any instance where in even after assigning a text item to null in the code, the value is still being displayed on the form in the application? Can any one suggest any solution for this issue.

Is this an issue with a block navigation?

below is the piece of code for click of refresh button:
----------------------------------------------------------------
BEGIN
if Get_View_Property('C_tsl_sups_hier',VISIBLE) = 'TRUE' then
Hide_View('C_tsl_sups_hier');
RWIDGET.TURN_ON('B_main.LI_action');
RWIDGET.TURN_OFF('B_action.PB_back');
RWIDGET.TURN_OFF('B_action.PB_ok');
end if;
if :B_main.LI_action in ('VIEW', 'EDIT') then
:B_main.TI_hier_id := NULL;
:B_main.TI_hier_desc := NULL;
:B_main.TI_element_id := NULL;
:B_main.TI_element_desc := NULL;

RWIDGET.TURN_ON('B_main.TI_hier_id');
RWIDGET.TURN_ON('B_main.TI_hier_desc');
RWIDGET.TURN_ON('B_main.TI_element_id');
RWIDGET.TURN_ON('B_main.TI_element_desc');
else
RWIDGET.TURN_OFF('B_main.TI_hier_id');
RWIDGET.TURN_OFF('B_main.TI_hier_desc');
RWIDGET.TURN_OFF('B_main.TI_element_id');
RWIDGET.TURN_OFF('B_main.TI_element_desc');
end if;
Go_Item('B_main.LI_action');
Set_Block_Property('B_action', NEXT_NAVIGATION_BLOCK, 'B_main');
Set_Block_Property('B_action', PREVIOUS_NAVIGATION_BLOCK, 'B_main');
---
EXCEPTION
when FORM_TRIGGER_FAILURE then
raise;
when OTHERS then
emessage(SQLERRM);
raise FORM_TRIGGER_FAILURE;
END;
----------------------------------------------------

RWIDGET.TURN_OFF and RWIDGET.TURN_ON are package functions to turn on and off the items.
--
As one can see in the above code am assigning B_main.TI_hier_id and B_main.TI_element_id to null.

but still the entered values exist on the form in the application.

the worst part of it is when i display the values of hier_id after above code on the application, it is null. But still the data entered in the text item is in tact.

Can any one suggest any probable solution?
Re: fields on a data block not getting refreshed [message #302028 is a reply to message #301953] Fri, 22 February 2008 14:01 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
(there's a button) by the press of which all the fields in the search block should be enabled and cleared (i.e. shud b null).
Did you consider use of the CLEAR_BLOCK built-in?

As of your question: did you try to use SYNCHRONIZE?

Also, do these items "inherit" their values from somewhere else, so - you clear them, but some trigger populates them back?
Re: fields on a data block not getting refreshed [message #302224 is a reply to message #302028] Sun, 24 February 2008 23:41 Go to previous message
bahubcd
Messages: 36
Registered: July 2007
Location: Bangalore
Member
Hi LF,
Thanks for your suggestion. AM sorry Actaully there were some other items on the block which need not be refreshed. I just copied them in to some temp variables and then assigned back after refresh operation. Now my form is working ok.

But my doubt still remains is that even after assigning a text item to null, why does not it gets cleared on the canvas. Its like i enter some value '111111' in that field and click refresh button, and now if i show a message to the user with the field value, the value displayed is NULL. But the value on the field on the application i.e. '111111' still remains in tact.

Any ways. I ll try to do some RnD on this and will reply to this thread in case i figure out the exact cause.

Thanks again for your response Smile
Previous Topic: OLE2 related E-book or Help
Next Topic: Move Cursor/Mouse to specific field on Form
Goto Forum:
  


Current Time: Fri Dec 09 02:25:56 CST 2016

Total time taken to generate the page: 0.18868 seconds