Home » Developer & Programmer » Forms » Setting focus to the previous text item (Oracle Forms 10g)
Setting focus to the previous text item [message #386775] Tue, 17 February 2009 00:05 Go to next message
ashoka_bl
Messages: 398
Registered: November 2006
Location: Bangalore
Senior Member

Hi,

I have one form containing 3 textboxes and 1 command button, when i press the button if no data is entered in the first textbox then the cursor focus should go to the first text box.

Can you please let me know how to do this ?

Regards,
Ashoka BL
Re: Setting focus to the previous text item [message #386779 is a reply to message #386775] Tue, 17 February 2009 00:24 Go to previous messageGo to next message
mm_kanish05
Messages: 487
Registered: January 2007
Location: Chennai
Senior Member


Try for if textbox1 is null

Raise Form_failure_Failure.


kanish
Re: Setting focus to the previous text item [message #386781 is a reply to message #386775] Tue, 17 February 2009 00:29 Go to previous messageGo to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
try RAISE_FORM_TRIGGER_FAILURE;
Re: Setting focus to the previous text item [message #386782 is a reply to message #386775] Tue, 17 February 2009 00:30 Go to previous messageGo to next message
ashoka_bl
Messages: 398
Registered: November 2006
Location: Bangalore
Senior Member

But raise form_trigger_failure, will take you to the focus where the cursor is positioned ( in my case its on Button). It will not take you to the first textbox.

Regards,
Ashoka BL
Re: Setting focus to the previous text item [message #386783 is a reply to message #386782] Tue, 17 February 2009 00:31 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
if :first_text_item is null then
   go_item('first_text_item');
end if;
Re: Setting focus to the previous text item [message #386787 is a reply to message #386775] Tue, 17 February 2009 00:35 Go to previous messageGo to next message
ashoka_bl
Messages: 398
Registered: November 2006
Location: Bangalore
Senior Member

Hi Littlefoot,


Its not setting the focus, do i need to change the properties

i used something like this,

GO_ITEM(':TXT_BOOKNAME');

Regards,
Ashoka BL
Re: Setting focus to the previous text item [message #386789 is a reply to message #386775] Tue, 17 February 2009 00:39 Go to previous messageGo to next message
mm_kanish05
Messages: 487
Registered: January 2007
Location: Chennai
Senior Member

give like

GO_ITEM('TXT_BOOKNAME');


kanish
Re: Setting focus to the previous text item [message #386791 is a reply to message #386775] Tue, 17 February 2009 00:41 Go to previous messageGo to next message
ashoka_bl
Messages: 398
Registered: November 2006
Location: Bangalore
Senior Member

Thank you.........its working fine..

Regards,
Ashoka BL
Re: Setting focus to the previous text item [message #386794 is a reply to message #386787] Tue, 17 February 2009 00:48 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
ashoka_bl
i used something like this,

GO_ITEM(':TXT_BOOKNAME');

LF
go_item('first_text_item');


So, where exactly did you find colon (:)in my example?
Re: Setting focus to the previous text item [message #386796 is a reply to message #386775] Tue, 17 February 2009 00:51 Go to previous messageGo to next message
ashoka_bl
Messages: 398
Registered: November 2006
Location: Bangalore
Senior Member

LF,

Was a mistake, didn't observed properly..

Regards,
Ashoka BL
Re: Setting focus to the previous text item [message #387114 is a reply to message #386782] Tue, 17 February 2009 23:55 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Make the button 'non-navigable'.

David
Previous Topic: Security Module
Next Topic: Alignment Problem
Goto Forum:
  


Current Time: Thu Dec 08 14:23:07 CST 2016

Total time taken to generate the page: 0.07375 seconds